|
@@ -3,7 +3,7 @@
|
|
|
* @Author: 空白格
|
|
|
* @Date: 2022-08-11 13:44:08
|
|
|
* @LastEditors: 空白格
|
|
|
- * @LastEditTime: 2022-08-25 13:46:59
|
|
|
+ * @LastEditTime: 2022-08-26 11:42:04
|
|
|
* @FilePath: \veterans_client_web\src\components\BannerBreadcrumb\index.vue
|
|
|
* @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
|
|
|
-->
|
|
@@ -75,11 +75,15 @@ export default {
|
|
|
let path = this.$router.currentRoute.path.slice(1),
|
|
|
routerOptions = this.$router.options.routes[0].children,
|
|
|
breadcrumbList = [],
|
|
|
- pathList;
|
|
|
+ pathList,
|
|
|
+ newPathList = [];
|
|
|
if (path) {
|
|
|
pathList = path.split("/").filter((item) => item && item.trim());
|
|
|
- pathList[pathList.length - 1] = path;
|
|
|
- pathList.forEach((item) => {
|
|
|
+ newPathList.push(pathList[0])
|
|
|
+ for(let i = 1; i < pathList.length; i++) {
|
|
|
+ newPathList.push(newPathList[i-1] + '/' + pathList[i])
|
|
|
+ }
|
|
|
+ newPathList.forEach((item) => {
|
|
|
routerOptions.forEach((jitem) => {
|
|
|
if (item === jitem.path) {
|
|
|
breadcrumbList.push({
|