Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in render: "TypeError: parentVal.concat is not a function" #58

Open
Ge-yuan-jun opened this issue Mar 30, 2021 · 0 comments
Open

Comments

@Ge-yuan-jun
Copy link

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"'

image

what I want

I want to know if the plugin can work if I change export varaible like the demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant