安装
yarn add pikaz-vue-auto-router
npm i -S pikaz-vue-auto-router
配置
import Vue from 'vue'
import VueRouter from 'vue-router'
import routesList from 'pikaz-vue-auto-router'
Vue.use(VueRouter)
const routes = [...routesList]
const router = new VueRouter({
mode: 'history',
routes,
})
export default router