From 717c89a58e5e89c08ca7e3bd7846e9e6fe73191b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Tue, 23 Jul 2024 16:41:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/cms/mp-menu/model/index.ts | 2 + src/views/cms/mp/components/search.vue | 5 +- src/views/cms/mp/index.vue | 6 ++ .../cms/mpDesign/components/mpMenuEdit.vue | 58 ++++++++++++++----- src/views/cms/mpDesign/components/search.vue | 2 +- .../cms/mpDesign/components/simulator.vue | 2 +- src/views/cms/mpDesign/index.vue | 13 +++-- .../cms/mpPages/components/mpPagesEdit.vue | 1 - src/views/cms/mpPages/index.vue | 10 ++-- src/views/system/plug/components/tenant.vue | 16 +++-- src/views/system/plug/detail/index.vue | 9 ++- src/views/system/version/index.vue | 4 +- 12 files changed, 92 insertions(+), 36 deletions(-) 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 @@ >