-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
demo link
Repeatable demo link: https://github.com/Ge-yuan-jun/vue-routing-demo
expectation
change code in router/index.js & main.js, the plugin should still work
When I use this plugin by default config, It works.
But when I change the router config, modify the index.js in router folder like this:
router/index.js
import routes from 'vue-auto-routing'
import { createRouterLayout } from 'vue-router-layout'
const RouterLayout = createRouterLayout(layout => {
return import('@/layouts/' + layout + '.vue')
})
const generateRoutes = [
{
path: '/',
component: RouterLayout,
children: routes
}
]
export default generateRoutes
and add cde like this in main.js
import Vue from 'vue'
import Router from 'vue-router'
import App from './App.vue'
import routes from './router'
Vue.use(Router)
Vue.config.productionTip = false
const router = new Router({
routes
})
new Vue({
router,
render: h => h(App)
}).$mount('#app')
result
when I load the page, it shows the error 'Error in render: "TypeError: parentVal.concat is not a function"'
what I want
I want to know if the plugin can work if I change export varaible like the demo
Metadata
Metadata
Assignees
Labels
No labels