diff --git a/src/api/cms/mp-menu/model/index.ts b/src/api/cms/mp-menu/model/index.ts index 1a29155..8d94058 100644 --- a/src/api/cms/mp-menu/model/index.ts +++ b/src/api/cms/mp-menu/model/index.ts @@ -24,6 +24,8 @@ export interface MpMenu { icon?: string; // 图标颜色 color?: string; + // 上传图标 + avatar?: string; // 所在行 rows?: number; // 是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单) diff --git a/src/views/cms/mp/components/search.vue b/src/views/cms/mp/components/search.vue index 82fea9d..287ab59 100644 --- a/src/views/cms/mp/components/search.vue +++ b/src/views/cms/mp/components/search.vue @@ -1,11 +1,11 @@ @@ -19,6 +19,7 @@ defineProps<{ // 选中的角色 selection?: []; + count?: 0; }>(), {} ); diff --git a/src/views/cms/mp/index.vue b/src/views/cms/mp/index.vue index f73d994..cc2cdaf 100644 --- a/src/views/cms/mp/index.vue +++ b/src/views/cms/mp/index.vue @@ -15,6 +15,7 @@ ([]); + const count = ref(0); // 当前编辑数据 const current = ref(null); // 是否显示编辑弹窗 @@ -213,6 +215,10 @@ /* 查询 */ const query = () => { loading.value = true; + pageMp({}).then((res) => { + console.log(res?.count); + count.value = res?.count; + }); }; /* 自定义行属性 */ diff --git a/src/views/cms/mpDesign/components/mpMenuEdit.vue b/src/views/cms/mpDesign/components/mpMenuEdit.vue index a6205ef..b30d0d1 100644 --- a/src/views/cms/mpDesign/components/mpMenuEdit.vue +++ b/src/views/cms/mpDesign/components/mpMenuEdit.vue @@ -33,7 +33,26 @@ v-model:value="form.path" /> - + + + + + + + + + + + + + + + + - - - { images.value.splice(index, 1); - form.icon = ''; + form.avatar = ''; }; const chooseGroupId = (item: DictData) => { @@ -273,10 +287,10 @@ } if (props.data) { assignObject(form, props.data); - if (props.data.icon) { + if (props.data.avatar) { images.value.push({ uid: uuid(), - url: props.data.icon, + url: props.data.avatar, status: 'done' }); } @@ -291,3 +305,21 @@ { immediate: true } ); + + diff --git a/src/views/cms/mpDesign/components/search.vue b/src/views/cms/mpDesign/components/search.vue index 17eb53e..e0e3a09 100644 --- a/src/views/cms/mpDesign/components/search.vue +++ b/src/views/cms/mpDesign/components/search.vue @@ -5,7 +5,7 @@ - 添加图标 + 添加菜单 - + {{ item.title }} diff --git a/src/views/cms/mpDesign/index.vue b/src/views/cms/mpDesign/index.vue index c94039f..ee2f129 100644 --- a/src/views/cms/mpDesign/index.vue +++ b/src/views/cms/mpDesign/index.vue @@ -41,8 +41,9 @@ >