We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
const routes = [ { name: 'app', path: '/', component: resolve => { require.ensure(['./page/app.vue'], () => { resolve(require('./page/app.vue')) }, 'app') }, children: [ ...homeRouter, ...userRouter, // ...demoRouter, ...settingRouter ] }, ]
我想添加一个demoRouter 到 app 的子路由中 我是这样做的
$router.addRoutes([ { $router.options.routes[0], children: [ $router.options.routes[0].children, ...demoRouter ] } ])
目前这样做不行 报错[vue-router] Duplicate named routes definition: { name: "app", path: "" } 看到 V2.3.0 里有 overrideName 参数 但是感觉还是不太好操作
[vue-router] Duplicate named routes definition: { name: "app", path: "" }
The text was updated successfully, but these errors were encountered:
dup of #1156
Sorry, something went wrong.
之所以会有这个警告是由于 路由中已经存在了这个路由 所以再次添加 会出现这个警告。
vue 中 路由重复添加的会被自动过滤掉,所以只会出现一个 warning.
No branches or pull requests
我想添加一个demoRouter 到 app 的子路由中 我是这样做的
目前这样做不行 报错
[vue-router] Duplicate named routes definition: { name: "app", path: "" }
看到 V2.3.0 里有 overrideName 参数 但是感觉还是不太好操作
The text was updated successfully, but these errors were encountered: