diff --git a/package.json b/package.json index e1044d8..1395590 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,8 @@ "@unocss/preset-attributify": "^0.58.0", "@unocss/preset-icons": "^0.58.0", "@unocss/preset-uno": "^0.58.0", - "@vue/compiler-sfc": "3.3.9", + "@vue/compiler-sfc": "3.3.11", + "@vue/runtime-core": "3.3.11", "@vitejs/plugin-vue": "4.5.2", "autoprefixer": "10.4.14", "eslint": "8.55.0", diff --git a/src/api/system/client/index.ts b/src/api/system/client/index.ts index 06544da..6b302b0 100644 --- a/src/api/system/client/index.ts +++ b/src/api/system/client/index.ts @@ -64,12 +64,12 @@ export const delClient = (id: string | number | Array) => { /** * 状态修改 - * @param id ID + * @param clientId 客户端id * @param status 状态 */ -export function changeStatus(id: number | string, status: string) { +export function changeStatus(clientId: string, status: string) { const data = { - id, + clientId, status }; return request({ diff --git a/src/api/system/client/types.ts b/src/api/system/client/types.ts index d7cb926..142118d 100644 --- a/src/api/system/client/types.ts +++ b/src/api/system/client/types.ts @@ -7,7 +7,7 @@ export interface ClientVO { /** * 客户端id */ - clientId: string | number; + clientId: string; /** * 客户端key diff --git a/src/components/DictTag/index.vue b/src/components/DictTag/index.vue index e5dd57d..b355a42 100644 --- a/src/components/DictTag/index.vue +++ b/src/components/DictTag/index.vue @@ -29,11 +29,13 @@ diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index 6b7a39b..ae5cd45 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -81,14 +81,14 @@ const imageUploadRef = ref(); watch( () => props.modelValue, - async (val) => { + async (val: string) => { if (val) { // 首先将值转为数组 let list: OssVO[] = []; if (Array.isArray(val)) { list = val as OssVO[]; } else { - const res = await listByIds(val as string); + const res = await listByIds(val); list = res.data; } // 然后将数组转为对象数组 diff --git a/src/components/TopNav/index.vue b/src/components/TopNav/index.vue index 6b416d4..c41177e 100644 --- a/src/components/TopNav/index.vue +++ b/src/components/TopNav/index.vue @@ -43,7 +43,7 @@ const router = useRouter(); // 主题颜色 const theme = computed(() => settingsStore.theme); // 所有的路由信息 -const routers = computed(() => permissionStore.topbarRouters); +const routers = computed(() => permissionStore.getTopbarRoutes()); // 顶部显示菜单 const topMenus = computed(() => { diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index b7c6ef0..2b38a4e 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -12,8 +12,9 @@