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
头部需要固定显示tags view ,路由层级为三级路由,标签可以显示,但是点过去就是404,路由的路径没有正确生成
//路由的路径没有正确生成,作者说了 不太主张使用tagsview 可能是大意了
filterAffixTags(routes, basePath = '/') { let tags = [] routes.forEach(route => { if (route.meta && route.meta.affix) { const tagPath = path.resolve(basePath, route.path) tags.push({ fullPath: tagPath, path: tagPath, name: route.name, meta: { ...route.meta } }) } if (route.children) { const tempTags = this.filterAffixTags(route.children, route.path)// 此处都只会把当前级的路由传到下级,父级路由会造成丢失 if (tempTags.length >= 1) { tags = [...tags, ...tempTags] } } }) return tags },
filterAffixTags(routes, basePath = '/') { let tags = [] routes.forEach((route) => { if (route.meta && route.meta.affix) { const tagPath = path.resolve(basePath, route.path) tags.push({ fullPath: tagPath, path: tagPath, name: route.name, meta: { ...route.meta } }) } if (route.children) { const tempTags = this.filterAffixTags( route.children, path.resolve(basePath, route.path) //在此处把父级页面路径保存 作者的 原方法是route.path ,路由层级超过二级 就会丢失父级路由 ) if (tempTags.length >= 1) { tags = [...tags, ...tempTags] } } }) return tags },
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug report(问题描述)
头部需要固定显示tags view ,路由层级为三级路由,标签可以显示,但是点过去就是404,路由的路径没有正确生成
Steps to reproduce(问题所在地方)
//路由的路径没有正确生成,作者说了 不太主张使用tagsview 可能是大意了
问题解决办法
The text was updated successfully, but these errors were encountered: