Showing
3 changed files
with
15 additions
and
13 deletions
| ... | @@ -7,7 +7,7 @@ | ... | @@ -7,7 +7,7 @@ |
| 7 | "forin": true, | 7 | "forin": true, |
| 8 | "freeze": true, | 8 | "freeze": true, |
| 9 | "funcscope": true, | 9 | "funcscope": true, |
| 10 | - "futurehostile": true, | 10 | + "futurehostile": false, |
| 11 | "immed": true, | 11 | "immed": true, |
| 12 | "indent": 4, | 12 | "indent": 4, |
| 13 | "latedef": true, | 13 | "latedef": true, | ... | ... |
| ... | @@ -8,26 +8,28 @@ export default new Router({ | ... | @@ -8,26 +8,28 @@ export default new Router({ |
| 8 | { | 8 | { |
| 9 | path: '/about', | 9 | path: '/about', |
| 10 | name: 'about', | 10 | name: 'about', |
| 11 | - // route level code-splitting | 11 | + component: r => { |
| 12 | - // this generates a separate chunk (about.[hash].js) for this route | 12 | + require(['./views/About'], r) |
| 13 | - // which is lazy-loaded when the route is visited. | 13 | + } |
| 14 | - component: () => import(/* webpackChunkName: "about" */ './views/About.vue') | ||
| 15 | }, | 14 | }, |
| 16 | { | 15 | { |
| 17 | path: '/login', | 16 | path: '/login', |
| 18 | name: '登录页', | 17 | name: '登录页', |
| 19 | - // route level code-splitting | 18 | + component: r => { |
| 20 | - // this generates a separate chunk (about.[hash].js) for this route | 19 | + require(['./views/login'], r) |
| 21 | - // which is lazy-loaded when the route is visited. | 20 | + } |
| 22 | - component: () => import(/* webpackChunkName: "about" */ './views/login.vue') | ||
| 23 | }, | 21 | }, |
| 24 | { | 22 | { |
| 25 | path: '/', | 23 | path: '/', |
| 26 | - component: () => import(/* webpackChunkName: "about" */ './views/Home.vue'), | 24 | + component: r => { |
| 25 | + require(['./views/Home'], r) | ||
| 26 | + }, | ||
| 27 | name: '', | 27 | name: '', |
| 28 | children: [{ | 28 | children: [{ |
| 29 | path: '/table', | 29 | path: '/table', |
| 30 | - component: () => import(/* webpackChunkName: "about" */ './views/test.vue') | 30 | + component: r => { |
| 31 | + require(['./views/test'], r) | ||
| 32 | + } | ||
| 31 | }] | 33 | }] |
| 32 | } | 34 | } |
| 33 | ] | 35 | ] | ... | ... |
| ... | @@ -82,9 +82,9 @@ export default { | ... | @@ -82,9 +82,9 @@ export default { |
| 82 | background-clip: padding-box; | 82 | background-clip: padding-box; |
| 83 | margin-bottom: 20px; | 83 | margin-bottom: 20px; |
| 84 | background-color: #F9FAFC; | 84 | background-color: #F9FAFC; |
| 85 | - margin: 120px auto; | 85 | + margin: 150px auto; |
| 86 | padding: 35px 35px 15px 35px; | 86 | padding: 35px 35px 15px 35px; |
| 87 | - width: 400px; | 87 | + width: 350px; |
| 88 | border: 2px solid #FAFAFA; | 88 | border: 2px solid #FAFAFA; |
| 89 | } | 89 | } |
| 90 | </style> | 90 | </style> | ... | ... |
-
Please register or login to post a comment