mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 引入soybean-admin-tab、去除vite-plugin-svg-icons,用unplugin-icons实现自定义svg的iconify写法、代码优化
This commit is contained in:
@ -5,10 +5,10 @@ import {
|
||||
getUserInfo,
|
||||
transformAuthRouteToMenu,
|
||||
transformAuthRoutesToVueRoutes,
|
||||
transformRouteToList,
|
||||
transformAuthRoutesToSearchMenus,
|
||||
getCacheRoutes
|
||||
} from '@/utils';
|
||||
import type { GlobalMenuOption } from '@/interface';
|
||||
import type { GlobalMenuOption, SearchMenu } from '@/interface';
|
||||
import { useTabStore } from '../tab';
|
||||
|
||||
interface RouteState {
|
||||
@ -18,7 +18,8 @@ interface RouteState {
|
||||
routeHomeName: AuthRoute.RouteKey;
|
||||
/** 菜单 */
|
||||
menus: GlobalMenuOption[];
|
||||
menusList: AuthRoute.Route[];
|
||||
/** 搜索的菜单 */
|
||||
searchMenus: SearchMenu[];
|
||||
/** 缓存的路由名称 */
|
||||
cacheRoutes: string[];
|
||||
}
|
||||
@ -28,7 +29,7 @@ export const useRouteStore = defineStore('route-store', {
|
||||
isAddedDynamicRoute: false,
|
||||
routeHomeName: 'dashboard_analysis',
|
||||
menus: [],
|
||||
menusList: [],
|
||||
searchMenus: [],
|
||||
cacheRoutes: []
|
||||
}),
|
||||
actions: {
|
||||
@ -45,7 +46,7 @@ export const useRouteStore = defineStore('route-store', {
|
||||
if (data) {
|
||||
this.routeHomeName = data.home;
|
||||
this.menus = transformAuthRouteToMenu(data.routes);
|
||||
this.menusList = transformRouteToList(data.routes);
|
||||
this.searchMenus = transformAuthRoutesToSearchMenus(data.routes);
|
||||
|
||||
const vueRoutes = transformAuthRoutesToVueRoutes(data.routes);
|
||||
vueRoutes.forEach(route => {
|
||||
|
Reference in New Issue
Block a user