vue路由和组件

import Vue from 'vue';
import Router from 'vue-router';
import store from '@/store/index';

Vue.use(Router);

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import(/* webpackChunkName: "home" */ 'viewsDif/Home.vue')
  },
  {
    path: '/solutions',
    name: 'solutions',
    component: () =>
      import(/* webpackChunkName: "solutions" */ 'viewsDif/Solutions.vue')
  }
];

export default new Router({
  mode: 'history',
  routes: routes
});

猜你喜欢

转载自www.cnblogs.com/xuzhenlei/p/12421535.html
今日推荐