chore: 生产环境隐藏用户不需要考虑的页面
This commit is contained in:
parent
5db64525a4
commit
fb2877ff2c
@ -113,7 +113,8 @@ function setupAccessGuard(router: Router) {
|
||||
// ? userInfo.homePath || DEFAULT_HOME_PATH
|
||||
// : to.fullPath)) as string;
|
||||
|
||||
const redirectPath = DEFAULT_HOME_PATH;
|
||||
// const redirectPath = DEFAULT_HOME_PATH;
|
||||
const redirectPath = '/example/echart';
|
||||
|
||||
return {
|
||||
...router.resolve(decodeURIComponent(redirectPath)),
|
||||
|
@ -1,7 +1,5 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
import { DEFAULT_HOME_PATH } from '@vben/constants';
|
||||
|
||||
import { BasicLayout } from '#/layouts';
|
||||
|
||||
/** 全局404页面 */
|
||||
@ -32,7 +30,8 @@ const coreRoutes: RouteRecordRaw[] = [
|
||||
},
|
||||
name: 'Root',
|
||||
path: '/',
|
||||
redirect: DEFAULT_HOME_PATH,
|
||||
// redirect: DEFAULT_HOME_PATH,
|
||||
redirect: '/example/echart',
|
||||
children: [],
|
||||
},
|
||||
// {
|
||||
|
@ -2,7 +2,7 @@ import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
import WujieVueRendererAdapter from '@sy/wujie-vue3-renderer-adapter';
|
||||
|
||||
import { LOW_CODE_PROJECT_ID, VITE_RENDERER_URL } from '#/constants';
|
||||
import { isDevMode, LOW_CODE_PROJECT_ID, VITE_RENDERER_URL } from '#/constants';
|
||||
|
||||
const moduleName = 'acl';
|
||||
|
||||
@ -12,6 +12,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
name: moduleName,
|
||||
redirect: '/acl/list',
|
||||
meta: {
|
||||
hideInMenu: !isDevMode,
|
||||
title: '用户管理',
|
||||
icon: 'ant-design:user-outlined',
|
||||
},
|
||||
|
53
apps/platform/src/router/routes/modules/example.ts
Normal file
53
apps/platform/src/router/routes/modules/example.ts
Normal file
@ -0,0 +1,53 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
import WujieVueRendererAdapter from '@sy/wujie-vue3-renderer-adapter';
|
||||
|
||||
import { VITE_RENDERER_URL } from '#/constants';
|
||||
|
||||
const routes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/example',
|
||||
name: 'Example',
|
||||
redirect: '/example/echart',
|
||||
meta: {
|
||||
title: '示例',
|
||||
icon: 'ant-design:edit-outlined',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/example/echart',
|
||||
name: 'Echart',
|
||||
meta: {
|
||||
// 移除 hideInMenu: true 或将其设置为 false
|
||||
hideInMenu: false,
|
||||
title: 'Echart 图表',
|
||||
icon: 'ant-design:list',
|
||||
},
|
||||
component: WujieVueRendererAdapter,
|
||||
props: {
|
||||
url: `${VITE_RENDERER_URL}`,
|
||||
fileId: '13a9dmbz',
|
||||
projectId: 22,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/example/table',
|
||||
name: 'Table',
|
||||
meta: {
|
||||
// 移除 hideInMenu: true 或将其设置为 false
|
||||
hideInMenu: false,
|
||||
title: 'Table 表格',
|
||||
icon: 'ant-design:list',
|
||||
},
|
||||
component: WujieVueRendererAdapter,
|
||||
props: {
|
||||
url: `${VITE_RENDERER_URL}`,
|
||||
fileId: '13a9dmbz',
|
||||
projectId: 22,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export default routes;
|
@ -16,6 +16,7 @@ const routes: RouteRecordRaw[] = [
|
||||
meta: {
|
||||
title: '微应用容器',
|
||||
icon: 'ant-design:appstore-outlined',
|
||||
hideInMenu: !isDevMode,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user