diff --git a/mock/system/menu.ts b/mock/system/menu.ts index 33453fcf..7cddbad7 100644 --- a/mock/system/menu.ts +++ b/mock/system/menu.ts @@ -1,16 +1,6 @@ import { defineMock } from '@alova/mock'; import { resultSuccess } from '../_util'; - -export interface ListDate { - label: string; - key: string; - type: number; - subtitle: string; - openType: number; - auth: string; - path: string; - children?: ListDate[]; -} +import type { ListDate } from '@/api/system/menu'; const menuList = () => { const result: ListDate[] = [ diff --git a/src/api/system/menu.ts b/src/api/system/menu.ts index a0f577ca..f877067d 100644 --- a/src/api/system/menu.ts +++ b/src/api/system/menu.ts @@ -1,5 +1,14 @@ import { Alova } from '@/utils/http/alova/index'; -import { ListDate } from 'mock/system/menu'; +export interface ListDate { + label: string; + key: string; + type: number; + subtitle: string; + openType: number; + auth: string; + path: string; + children?: ListDate[]; +} /** * @description: 根据用户id获取用户菜单 diff --git a/src/views/system/menu/menu.vue b/src/views/system/menu/menu.vue index 78f337e1..da994211 100644 --- a/src/views/system/menu/menu.vue +++ b/src/views/system/menu/menu.vue @@ -132,7 +132,7 @@ import { getMenuList } from '@/api/system/menu'; import { getTreeItem } from '@/utils'; import CreateDrawer from './CreateDrawer.vue'; - import { ListDate } from 'mock/system/menu'; + import type { ListDate } from '@/api/system/menu'; const rules = { label: { diff --git a/src/views/system/role/role.vue b/src/views/system/role/role.vue index 0503525c..e9fc7e84 100644 --- a/src/views/system/role/role.vue +++ b/src/views/system/role/role.vue @@ -75,10 +75,8 @@ import { getTreeAll } from '@/utils'; import CreateModal from './CreateModal.vue'; import EditModal from './EditModal.vue'; - import { useRouter } from 'vue-router'; - import { ListDate } from 'mock/system/menu'; + import type { ListDate } from '@/api/system/menu'; - const router = useRouter(); const message = useMessage(); const actionRef = ref(); const createModalRef = ref();