|
@@ -2,7 +2,7 @@ import { AuthState } from '@/stores/interface'
|
|
|
import { getRoutersApi } from '@/api/modules/system/menu'
|
|
|
import { getFlatMenuList, getShowMenuList, getAllBreadcrumbList } from '@/utils'
|
|
|
// 动态路由
|
|
|
-import staticRouterList from '@/routers/modules/dynamicRouter.json'
|
|
|
+import dynamicRouterList from '@/routers/modules/dynamicRouter.json'
|
|
|
|
|
|
export const useAuthStore = defineStore('admin-auth', {
|
|
|
state: (): AuthState => ({
|
|
@@ -29,7 +29,7 @@ export const useAuthStore = defineStore('admin-auth', {
|
|
|
// Get AuthMenuList
|
|
|
async getAuthMenuList() {
|
|
|
const { data } = await getRoutersApi()
|
|
|
- this.authMenuList = [...staticRouterList.data, ...data] as any[]
|
|
|
+ this.authMenuList = [...dynamicRouterList.data, ...data] as any[]
|
|
|
},
|
|
|
// Set RouteName
|
|
|
async setRouteName(name: string) {
|