1
This commit is contained in:
@@ -214,6 +214,39 @@ export default class uiTool {
|
||||
}
|
||||
|
||||
static getRoutes(Main, ParentView, Page404, HomePage) {
|
||||
// 如果没有传入 HomePage,使用默认的欢迎页面
|
||||
const defaultHomePage = {
|
||||
render: h => h('div', {
|
||||
style: {
|
||||
padding: '20px',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
height: 'calc(100vh - 200px)'
|
||||
}
|
||||
}, [
|
||||
h('div', {
|
||||
style: {
|
||||
textAlign: 'center'
|
||||
}
|
||||
}, [
|
||||
h('h1', {
|
||||
style: {
|
||||
fontSize: '30px',
|
||||
color: '#2d8cf0',
|
||||
marginBottom: '20px'
|
||||
}
|
||||
}, '欢迎使用管理系统'),
|
||||
h('p', {
|
||||
style: {
|
||||
fontSize: '16px',
|
||||
color: '#666'
|
||||
}
|
||||
}, '请从左侧菜单选择功能模块')
|
||||
])
|
||||
])
|
||||
}
|
||||
|
||||
let mainRoute = {
|
||||
path: '/',
|
||||
name: '主视图',
|
||||
@@ -224,10 +257,9 @@ export default class uiTool {
|
||||
{
|
||||
path: '/home',
|
||||
name: '首页',
|
||||
component: HomePage,
|
||||
component: HomePage || defaultHomePage,
|
||||
meta: { title: '首页', notCache: true }
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user