报错: A route named “首页,1539240033666875393” has been added as a child of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.
解决方式一:

降低 vue-router 从 4.5.04.4.5,解决 路由 重复的问题

在这里插入图片描述

解决方式二:

this.$router.$avueRouter.formatRoutes(data, true);
Router.$avueRouter.formatRoutes(Store.getters.menuAll, true);
调整为
this.$router.$avueRouter.formatRoutes(data, false);
Router.$avueRouter.formatRoutes(Store.getters.menuAll, false);

true/false这个参数表示是否需要将转换后的路由与现有路由合并。比如,`false`表示替换现有路由,而`true`表示追加。
Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐