燕鹏
před 4 roky
9 změnil soubory, kde provedl 76 přidání a 3 odebrání
@ -1,12 +1,20 @@ |
|||
import Vue from 'vue' |
|||
import { RouterFactory, nativeScrollBehavior } from 'meteor/akryum:vue-router2' |
|||
|
|||
import '../imports/ui/plugins' |
|||
import './routes' |
|||
|
|||
import App from '../imports/ui/App.vue' |
|||
|
|||
Meteor.startup(() => { |
|||
const routerFactory = new RouterFactory({ |
|||
mode: 'history', |
|||
scrollBehavior: nativeScrollBehavior, |
|||
}) |
|||
const router = routerFactory.create() |
|||
new Vue({ |
|||
el: '#app', |
|||
router: router, |
|||
...App, |
|||
}) |
|||
}) |
|||
|
@ -0,0 +1,21 @@ |
|||
// Import the router
|
|||
import { RouterFactory } from 'meteor/akryum:vue-router2' |
|||
|
|||
// Components
|
|||
import Home from '/imports/ui/views/Home' |
|||
import Page from '/imports/ui/views/Page.vue' |
|||
|
|||
RouterFactory.configure(factory => { |
|||
factory.addRoutes([ |
|||
{ |
|||
path: '/', |
|||
name: 'home', |
|||
component: Home, |
|||
}, |
|||
{ |
|||
path: '/page', |
|||
name: 'page', |
|||
component: Page, |
|||
}, |
|||
]) |
|||
}) |
@ -0,0 +1,15 @@ |
|||
<template> |
|||
<div> |
|||
home |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "Home" |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
@ -0,0 +1,15 @@ |
|||
<template> |
|||
<div> |
|||
page |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "Page" |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
Načítá se…
Odkázat v novém úkolu