feat: 配置管理由后端管理
This commit is contained in:
parent
86de109431
commit
8a8e5d12ac
@ -26,9 +26,13 @@ UPDATE `sys_menu` SET `icon` = 'carbon:operations-record' WHERE `menu_id` = 500;
|
||||
UPDATE `sys_menu` SET `icon` = 'tabler:login-2' WHERE `menu_id` = 501;
|
||||
UPDATE `sys_menu` SET `icon` = 'gg:debug' WHERE `menu_id` = 1500;
|
||||
UPDATE `sys_menu` SET `icon` = 'gg:debug' WHERE `menu_id` = 1506;
|
||||
UPDATE `sys_menu` SET `path` = 'oss/config', `component` = 'system/oss-config/index', `icon` = 'hugeicons:configuration-01' WHERE `menu_id` = 133;
|
||||
|
||||
-- IFrame 类型
|
||||
UPDATE `sys_menu` SET `component` = 'FrameView', `query_param` = 'https://ruoyi.xlsea.cn/admin/', `is_frame` = 2, `icon` = 'bx:bxl-spring-boot' WHERE `menu_id` = 117;
|
||||
UPDATE `sys_menu` SET `component` = 'FrameView', `query_param` = 'https://preview.snailjob.opensnail.com/', `is_frame` = 2, `icon` = 'gridicons:scheduled' WHERE `menu_id` = 120;
|
||||
-- 外链类型
|
||||
UPDATE `sys_menu` SET `path` = 'https://gitee.com/xlsea/ruoyi-plus-soybean', `component` = 'FrameView', `icon` = 'local-icon-gitee' WHERE `menu_id` = 4;
|
||||
|
||||
-- plus-ui 需要禁用的页面
|
||||
UPDATE `sys_menu` SET `status` = '1' WHERE `menu_id` IN ( '116', '130', '131', '132', '11700', '11701' );
|
||||
|
@ -123,32 +123,6 @@ const dynamicConstantRoutes: ElegantRoute[] = [
|
||||
icon: 'material-symbols:account-circle-full',
|
||||
hideInMenu: true
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'system',
|
||||
path: '/system',
|
||||
component: 'layout.base',
|
||||
meta: {
|
||||
title: 'system',
|
||||
i18nKey: 'route.system',
|
||||
localIcon: 'menu-system',
|
||||
order: 1,
|
||||
hideInMenu: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'system_oss-config',
|
||||
path: '/system/oss-config',
|
||||
component: 'view.system_oss-config',
|
||||
meta: {
|
||||
title: 'system_oss-config',
|
||||
i18nKey: 'route.system_oss-config',
|
||||
constant: true,
|
||||
hideInMenu: true,
|
||||
icon: 'hugeicons:configuration-01'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -100,6 +100,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
||||
authRoutes.value = Array.from(authRoutesMap.values());
|
||||
}
|
||||
|
||||
// eslint-disable-next-line complexity
|
||||
function parseRouter(route: ElegantConstRoute, parent?: ElegantConstRoute) {
|
||||
route.meta = route.meta ? route.meta : { title: route.name };
|
||||
const isLayout = route.component === 'Layout';
|
||||
@ -129,6 +130,10 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
||||
|
||||
// @ts-expect-error no hidden field
|
||||
route.meta.hideInMenu = route.hidden;
|
||||
if (route.meta.hideInMenu) {
|
||||
// @ts-expect-error parent.name is activeMenu type
|
||||
route.meta.activeMenu = parent ? parent.name : null;
|
||||
}
|
||||
// 是否需要keepAlive
|
||||
route.meta.keepAlive = !route.meta.noCache;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user