新增:css样式支持

This commit is contained in:
2024-08-30 17:51:56 +08:00
parent ecf88b04fd
commit 41ad9a474e
33 changed files with 1458 additions and 180 deletions
@@ -7,6 +7,18 @@
</template>
<span>添加</span>
</a-button>
<a-tree-select
allow-clear
:tree-data="navigationList"
tree-default-expand-all
style="width: 230px"
placeholder="请选择栏目"
:value="where.categoryId || undefined"
:dropdown-style="{ maxHeight: '360px', overflow: 'auto' }"
@update:value="(value?: number) => (where.categoryId = value)"
@change="onCategoryId"
/>
<a-button @click="reset">重置</a-button>
</a-space>
</template>
@@ -14,11 +26,14 @@
import { PlusOutlined } from '@ant-design/icons-vue';
import type { GradeParam } from '@/api/user/grade/model';
import { watch } from 'vue';
import useSearch from "@/utils/use-search";
import type { ArticleParam } from "@/api/cms/article/model";
const props = withDefaults(
defineProps<{
// 选中的角色
selection?: [];
navigationList?: Navigator[];
}>(),
{}
);
@@ -35,6 +50,29 @@
emit('add');
};
// 表单数据
const { where, resetFields } = useSearch<ArticleParam>({
articleId: undefined,
navigationId: undefined,
categoryId: undefined,
merchantId: undefined,
status: undefined,
keywords: ''
});
// 按分类查询
const onCategoryId = (id: number) => {
where.categoryId = id;
emit('search', where);
};
/* 重置 */
const reset = () => {
resetFields();
type.value = '';
reload();
};
watch(
() => props.selection,
() => {}