mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
tests: update module fixture
This commit is contained in:
parent
a3be3cfe1b
commit
107d36c851
@ -7,3 +7,5 @@ function $reverseStr (str) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Vue.prototype.$reverseStr = $reverseStr
|
Vue.prototype.$reverseStr = $reverseStr
|
||||||
|
|
||||||
|
export default undefined
|
||||||
|
7
test/fixtures/module/router.js
vendored
7
test/fixtures/module/router.js
vendored
@ -3,18 +3,21 @@ import Router from 'vue-router'
|
|||||||
|
|
||||||
Vue.use(Router)
|
Vue.use(Router)
|
||||||
|
|
||||||
|
const indexPage = () => import('~/views/index.vue').then(m => m.default || m)
|
||||||
|
const aboutPage = () => import('~/views/about.vue').then(m => m.default || m)
|
||||||
|
|
||||||
export function createRouter () {
|
export function createRouter () {
|
||||||
return new Router({
|
return new Router({
|
||||||
mode: 'history',
|
mode: 'history',
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
component: require('~/views/index.vue').default,
|
component: indexPage,
|
||||||
name: 'index'
|
name: 'index'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/about',
|
path: '/about',
|
||||||
component: require('~/views/about.vue').default,
|
component: aboutPage,
|
||||||
name: 'about'
|
name: 'about'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user