前端配置菜单初始化
This commit is contained in:
@ -1,14 +1,18 @@
|
||||
import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
import Vue from 'vue';
|
||||
import Router from 'vue-router';
|
||||
|
||||
Vue.use(Router)
|
||||
Vue.use(Router);
|
||||
|
||||
/* Router Modules */
|
||||
import policyPage from './modules/policyPage'
|
||||
import policyPage from './modules/policyPage';
|
||||
import configPage from './modules/configPage';
|
||||
|
||||
export const DynamicRoutes = [
|
||||
// 政策管理
|
||||
// 政策管理
|
||||
policyPage,
|
||||
]
|
||||
// 前端配置
|
||||
configPage
|
||||
// frontEndConfig
|
||||
];
|
||||
|
||||
export default DynamicRoutes
|
||||
export default DynamicRoutes;
|
||||
|
28
src/router/modules/configPage.js
Normal file
28
src/router/modules/configPage.js
Normal file
@ -0,0 +1,28 @@
|
||||
/** When your routing table is too long, you can split it into small modules **/
|
||||
|
||||
import Layout from '@/layout';
|
||||
// 前端配置
|
||||
const nestedRouter = {
|
||||
path: '/front',
|
||||
component: Layout,
|
||||
redirect: 'noRedirect',
|
||||
meta: { title: '前端配置' },
|
||||
children: [
|
||||
{
|
||||
path: 'unscramble',
|
||||
component: resolve =>
|
||||
require(['@/views/front/unscramble/index'], resolve),
|
||||
name: 'unscramble',
|
||||
meta: { title: '政策解读' }
|
||||
},
|
||||
{
|
||||
path: 'expressNews',
|
||||
component: resolve =>
|
||||
require(['@/views/front/expressNews/index'], resolve),
|
||||
name: 'expressNews',
|
||||
meta: { title: '资讯快报' }
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export default nestedRouter;
|
5
src/views/front/expressNews/index.vue
Normal file
5
src/views/front/expressNews/index.vue
Normal file
@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
快报
|
||||
</div>
|
||||
</template>
|
5
src/views/front/unscramble/index.vue
Normal file
5
src/views/front/unscramble/index.vue
Normal file
@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
解读
|
||||
</div>
|
||||
</template>
|
Reference in New Issue
Block a user