增加了两套演示空白页面
Former-commit-id: 8e223ee236a3b795298a7223c7c1b8577b48dce3
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -1,3 +1,33 @@
|
|||||||
|
const businessClass1 = {
|
||||||
|
path: '/business/class1',
|
||||||
|
title: '功能 1',
|
||||||
|
icon: 'cube',
|
||||||
|
children: (pre => [
|
||||||
|
{ path: `${pre}index`, title: '首页', icon: 'home' },
|
||||||
|
{ path: `${pre}page1`, title: '页面 1', icon: 'paperclip' },
|
||||||
|
{ path: `${pre}page2`, title: '页面 2', icon: 'paperclip' },
|
||||||
|
])('/business/class1/'),
|
||||||
|
};
|
||||||
|
|
||||||
|
const businessClass2 = {
|
||||||
|
path: '/business/class2',
|
||||||
|
title: '功能 2',
|
||||||
|
icon: 'cube',
|
||||||
|
children: (pre => [
|
||||||
|
{ path: `${pre}index`, title: '首页', icon: 'home' },
|
||||||
|
{
|
||||||
|
title: '功能 2-1',
|
||||||
|
icon: 'cube',
|
||||||
|
children: [
|
||||||
|
{ path: `${pre}class2-1/page1`, title: '页面 1', icon: 'paperclip' },
|
||||||
|
{ path: `${pre}class2-1/page2`, title: '页面 2', icon: 'paperclip' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{ path: `${pre}page1`, title: '页面 1', icon: 'paperclip' },
|
||||||
|
{ path: `${pre}page2`, title: '页面 2', icon: 'paperclip' },
|
||||||
|
])('/business/class2/'),
|
||||||
|
};
|
||||||
|
|
||||||
const setting = {
|
const setting = {
|
||||||
path: '/core/setting',
|
path: '/core/setting',
|
||||||
title: '设置',
|
title: '设置',
|
||||||
@@ -10,6 +40,8 @@ const setting = {
|
|||||||
|
|
||||||
// 菜单 侧边栏
|
// 菜单 侧边栏
|
||||||
export const side = [
|
export const side = [
|
||||||
|
businessClass1,
|
||||||
|
businessClass2,
|
||||||
setting,
|
setting,
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -20,5 +52,7 @@ export default [
|
|||||||
title: '首页',
|
title: '首页',
|
||||||
icon: 'home',
|
icon: 'home',
|
||||||
},
|
},
|
||||||
|
businessClass1,
|
||||||
|
businessClass2,
|
||||||
setting,
|
setting,
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container type="full">
|
||||||
|
<d2-page-cover
|
||||||
|
title="功能 1"
|
||||||
|
sub-title="business class 1">
|
||||||
|
<img src="@/assets/image/logo/business.png">
|
||||||
|
</d2-page-cover>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container type="full">
|
||||||
|
<h1 class="d2-mt-0">
|
||||||
|
功能 1 <d2-icon name="caret-right"/> 页面 1
|
||||||
|
</h1>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container type="full">
|
||||||
|
<h1 class="d2-mt-0">
|
||||||
|
功能 1 <d2-icon name="caret-right"/> 页面 2
|
||||||
|
</h1>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container type="full">
|
||||||
|
<h1 class="d2-mt-0">
|
||||||
|
功能 2-1 <d2-icon name="caret-right"/> 页面 1
|
||||||
|
</h1>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container type="full">
|
||||||
|
<h1 class="d2-mt-0">
|
||||||
|
功能 2-1 <d2-icon name="caret-right"/> 页面 2
|
||||||
|
</h1>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container type="full">
|
||||||
|
<d2-page-cover
|
||||||
|
title="功能 2"
|
||||||
|
sub-title="business class 2">
|
||||||
|
<img src="@/assets/image/logo/business.png">
|
||||||
|
</d2-page-cover>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container type="full">
|
||||||
|
<h1 class="d2-mt-0">
|
||||||
|
功能 2 <d2-icon name="caret-right"/> 页面 1
|
||||||
|
</h1>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container type="full">
|
||||||
|
<h1 class="d2-mt-0">
|
||||||
|
功能 2 <d2-icon name="caret-right"/> 页面 2
|
||||||
|
</h1>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
+1
-1
@@ -19,7 +19,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
// 验证当前路由所有的匹配中是否需要有登陆验证的
|
// 验证当前路由所有的匹配中是否需要有登陆验证的
|
||||||
if (to.matched.some(r => r.meta.requiresAuth)) {
|
if (to.matched.some(r => r.meta.requiresAuth)) {
|
||||||
// 这里暂时将cookie里是否存有token作为验证是否登陆的条件
|
// 这里暂时将cookie里是否存有token作为验证是否登陆的条件
|
||||||
// 请根据自身业务需要修改
|
// 请根据自身功能需要修改
|
||||||
if (Cookies.get('token')) {
|
if (Cookies.get('token')) {
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+48
-6
@@ -4,7 +4,7 @@ const meta = { requiresAuth: true };
|
|||||||
* 在主框架内显示
|
* 在主框架内显示
|
||||||
*/
|
*/
|
||||||
const frameIn = [
|
const frameIn = [
|
||||||
// 首页
|
//
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
redirect: { name: 'index' },
|
redirect: { name: 'index' },
|
||||||
@@ -14,7 +14,7 @@ const frameIn = [
|
|||||||
path: 'index',
|
path: 'index',
|
||||||
name: 'index',
|
name: 'index',
|
||||||
meta,
|
meta,
|
||||||
component: () => import('@/pages/core/index'),
|
component: () => import('@/pages/d2admin/index'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -26,13 +26,55 @@ const frameIn = [
|
|||||||
component: () => import('@/components/core/d2-layout-main'),
|
component: () => import('@/components/core/d2-layout-main'),
|
||||||
children: (pre => [
|
children: (pre => [
|
||||||
{
|
{
|
||||||
path: 'index', name: `${pre}index`, component: () => import('@/pages/core/setting/index'), meta: { ...meta, title: '设置首页' },
|
path: 'index', name: `${pre}index`, component: () => import('@/pages/d2admin/setting/index'), meta: { ...meta, title: '设置首页' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'releases', name: `${pre}releases`, component: () => import('@/pages/core/setting/releases'), meta: { ...meta, title: '版本' },
|
path: 'releases', name: `${pre}releases`, component: () => import('@/pages/d2admin/setting/releases'), meta: { ...meta, title: '版本' },
|
||||||
},
|
},
|
||||||
])('core-setting-'),
|
])('core-setting-'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/business/class1',
|
||||||
|
name: 'business-class1',
|
||||||
|
meta,
|
||||||
|
redirect: { name: 'business-class1-index' },
|
||||||
|
component: () => import('@/components/core/d2-layout-main'),
|
||||||
|
children: (pre => [
|
||||||
|
{
|
||||||
|
path: 'index', name: `${pre}index`, component: () => import('@/pages/business/class1/index'), meta: { ...meta, title: '功能 1' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'page1', name: `${pre}page1`, component: () => import('@/pages/business/class1/page1'), meta: { ...meta, title: '功能 1 页面 1' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'page2', name: `${pre}page2`, component: () => import('@/pages/business/class1/page2'), meta: { ...meta, title: '功能 1 页面 2' },
|
||||||
|
},
|
||||||
|
])('business-class1-'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/business/class2',
|
||||||
|
name: 'business-class2',
|
||||||
|
meta,
|
||||||
|
redirect: { name: 'business-class2-index' },
|
||||||
|
component: () => import('@/components/core/d2-layout-main'),
|
||||||
|
children: (pre => [
|
||||||
|
{
|
||||||
|
path: 'index', name: `${pre}index`, component: () => import('@/pages/business/class2/index'), meta: { ...meta, title: '功能 2' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'class2-1/page1', name: `${pre}class2-1-page1`, component: () => import('@/pages/business/class2/class2-1/page1'), meta: { ...meta, title: '功能 2-1 页面 1' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'class2-1/page2', name: `${pre}class2-1-page2`, component: () => import('@/pages/business/class2/class2-1/page2'), meta: { ...meta, title: '功能 2-1 页面 2' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'page1', name: `${pre}page1`, component: () => import('@/pages/business/class2/page1'), meta: { ...meta, title: '功能 2 页面 1' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'page2', name: `${pre}page2`, component: () => import('@/pages/business/class2/page2'), meta: { ...meta, title: '功能 2 页面 2' },
|
||||||
|
},
|
||||||
|
])('business-class2-'),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,7 +85,7 @@ const errorPage = [
|
|||||||
{
|
{
|
||||||
path: '*',
|
path: '*',
|
||||||
name: '404',
|
name: '404',
|
||||||
component: () => import('@/pages/core/404'),
|
component: () => import('@/pages/d2admin/404'),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -55,7 +97,7 @@ const frameOut = [
|
|||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
name: 'login',
|
name: 'login',
|
||||||
component: () => import('@/pages/core/login'),
|
component: () => import('@/pages/d2admin/login'),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user