You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
537 B
26 lines
537 B
|
3 years ago
|
const Home = httpVueLoader('static/vuePage/index.vue');
|
||
|
|
var Header = httpVueLoader('static/vuePage/scanCode.vue');
|
||
|
|
Vue.component('my-header', Header);
|
||
|
|
const Foo = {
|
||
|
|
template: '<div>foo</div>'
|
||
|
|
};
|
||
|
|
const Bar = {
|
||
|
|
template: '<div>bar</div>'
|
||
|
|
};
|
||
|
|
const routes = [{
|
||
|
|
path: '/',
|
||
|
|
component: Home,
|
||
|
|
children: [{
|
||
|
|
path: '/foo',
|
||
|
|
component: Foo
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/bar',
|
||
|
|
component: Bar
|
||
|
|
},
|
||
|
|
]
|
||
|
|
},];
|
||
|
|
const router = new VueRouter({
|
||
|
|
routes // (缩写) 相当于 routes: routes
|
||
|
|
})
|