main.js 326 B

123456789101112131415161718192021
  1. import Vue from 'vue'
  2. import VueRouter from 'vue-router'
  3. import App from './App'
  4. import Index from './components/routes/Index'
  5. Vue.use(VueRouter)
  6. const router = new VueRouter({
  7. routes: [
  8. { path: '/', component: Index }
  9. ],
  10. mode: 'history'
  11. })
  12. new Vue({
  13. el: '#app',
  14. template: '<App/>',
  15. components: { App },
  16. router
  17. })