Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mould-vuecli3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lhfe
mould-vuecli3
Commits
bf4b07e8
Commit
bf4b07e8
authored
Aug 30, 2020
by
lipengcheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化路由
parent
54967fda
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
home.router.js
src/router/home.router.js
+3
-0
page1.router.js
src/router/page1.router.js
+1
-1
page2.router.js
src/router/page2.router.js
+1
-4
No files found.
src/router/home.router.js
View file @
bf4b07e8
...
@@ -5,5 +5,8 @@ export default {
...
@@ -5,5 +5,8 @@ export default {
layout
:
'DefaultLayout'
,
layout
:
'DefaultLayout'
,
title
:
'首页'
title
:
'首页'
},
},
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component
:
()
=>
import
(
/* webpackChunkName: "about" */
'@/views/home.vue'
)
component
:
()
=>
import
(
/* webpackChunkName: "about" */
'@/views/home.vue'
)
}
}
src/router/page1.router.js
View file @
bf4b07e8
export
default
{
export
default
{
path
:
'/page1'
,
path
:
'/page1'
,
name
:
'Page1'
,
name
:
'Page1'
,
component
:
()
=>
import
(
/* webpackChunkName: "
about
" */
'../views/page1.vue'
)
component
:
()
=>
import
(
/* webpackChunkName: "
page1
" */
'../views/page1.vue'
)
}
}
src/router/page2.router.js
View file @
bf4b07e8
...
@@ -5,8 +5,5 @@ export default {
...
@@ -5,8 +5,5 @@ export default {
layout
:
'layout-a'
,
layout
:
'layout-a'
,
title
:
'页面2'
title
:
'页面2'
},
},
// route level code-splitting
component
:
()
=>
import
(
/* webpackChunkName: "page2" */
'../views/page2.vue'
)
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component
:
()
=>
import
(
/* webpackChunkName: "about" */
'../views/page2.vue'
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment