feat:【antd】【mall】diy-editor 代码风格统一 & 逐个测试 20%
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export { default as ProductCategorySelect } from './select.vue';
|
||||
@@ -11,26 +11,25 @@ import { getCategoryList } from '#/api/mall/product/category';
|
||||
defineOptions({ name: 'ProductCategorySelect' });
|
||||
|
||||
const props = defineProps({
|
||||
// 选中的ID
|
||||
modelValue: {
|
||||
type: [Number, Array<Number>],
|
||||
default: undefined,
|
||||
},
|
||||
// 是否多选
|
||||
}, // 选中的 ID
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 上级品类的编号
|
||||
}, // 是否多选
|
||||
parentId: {
|
||||
type: Number,
|
||||
default: undefined,
|
||||
},
|
||||
}, // 上级品类的编号
|
||||
});
|
||||
|
||||
/** 分类选择 */
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
|
||||
const categoryList = ref<any[]>([]); // 分类树
|
||||
|
||||
/** 选中的分类 ID */
|
||||
const selectCategoryId = computed({
|
||||
get: () => {
|
||||
@@ -42,7 +41,6 @@ const selectCategoryId = computed({
|
||||
});
|
||||
|
||||
/** 初始化 */
|
||||
const categoryList = ref<any[]>([]); // 分类树
|
||||
onMounted(async () => {
|
||||
const data = await getCategoryList({
|
||||
parentId: props.parentId,
|
||||
Reference in New Issue
Block a user