From 824efa6b51ed4f1b856e291c587ddf1f2d0f8cf7 Mon Sep 17 00:00:00 2001 From: Bunny <1319900154@qq.com> Date: Sat, 5 Oct 2024 21:10:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=9A=80=20=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eslint.config.js | 1 + src/api/v1/menuIcon.ts | 8 ++ src/assets/svg/loading.svg | 12 ++ src/views/system/adminUser/utils/hooks.tsx | 4 +- src/views/system/menuIcon/index.vue | 6 +- .../system/menuIcon/menu-icon-dialog.vue | 3 +- .../menuIcon/menu-icon-select-icon-name.vue | 135 ++++++++++++++++++ src/views/system/menuIcon/utils/types.ts | 2 + 8 files changed, 165 insertions(+), 6 deletions(-) create mode 100644 src/assets/svg/loading.svg create mode 100644 src/views/system/menuIcon/menu-icon-select-icon-name.vue diff --git a/eslint.config.js b/eslint.config.js index faab037..1296cbf 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -153,6 +153,7 @@ export default defineFlatConfig([ 'no-undef': 'off', 'no-unused-vars': 'off', 'vue/no-v-html': 'off', + 'vue/no-mutating-props': 'off', 'vue/require-default-prop': 'off', 'vue/require-explicit-emits': 'off', 'vue/multi-word-component-names': 'off', diff --git a/src/api/v1/menuIcon.ts b/src/api/v1/menuIcon.ts index cccb078..b408df2 100644 --- a/src/api/v1/menuIcon.ts +++ b/src/api/v1/menuIcon.ts @@ -28,3 +28,11 @@ export const fetchUpdateMenuIcon = (data: any) => { export const fetchDeleteMenuIcon = (data: any) => { return http.request>('delete', 'menuIcon/deleteMenuIcon', { data }); }; + +/** + * 系统菜单图标---根据iconName搜索menuIc + * @param data + */ +export const fetchGetIconNameList = (data: any) => { + return http.request>('get', 'menuIcon/getIconNameList', { params: data }); +}; diff --git a/src/assets/svg/loading.svg b/src/assets/svg/loading.svg new file mode 100644 index 0000000..8400a07 --- /dev/null +++ b/src/assets/svg/loading.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/src/views/system/adminUser/utils/hooks.tsx b/src/views/system/adminUser/utils/hooks.tsx index 8c16efa..5629359 100644 --- a/src/views/system/adminUser/utils/hooks.tsx +++ b/src/views/system/adminUser/utils/hooks.tsx @@ -14,13 +14,13 @@ import userAvatar from '@/assets/user.jpg'; import { fetchForcedOffline, fetchUploadAvatarByAdmin } from '@/api/v1/user'; import { useUserStore } from '@/store/system/user'; +const adminUserStore = useAdminUserStore(); +const userStore = useUserStore(); export const formRef = ref(); const cropRef = ref(); const assignRolesRef = ref(); -const userStore = useUserStore(); // 上传头像信息 const avatarInfo = ref(); -const adminUserStore = useAdminUserStore(); // 重置密码表单校验Ref const ruleFormByRestPasswordRef = ref(); // 重置密码表单 diff --git a/src/views/system/menuIcon/index.vue b/src/views/system/menuIcon/index.vue index 6653435..64a4cad 100644 --- a/src/views/system/menuIcon/index.vue +++ b/src/views/system/menuIcon/index.vue @@ -105,9 +105,9 @@ onMounted(() => { @page-current-change="onCurrentPageChange" @selection-change="onSelectionChange" > -