南昌市物联网技防平台-前端
shuishen
2021-04-23 8d837b97ffb27e4e26f067c1febde353bfdf91cf
src/page/crumbsL/crumbsL.vue
@@ -64,9 +64,9 @@
  methods: {
    loadChange(states) {
      //导航栏进就是一级路由,其他页面push
      if (this.isrf) {
      if (this.isrf) {//刷新读取localStorage
        this.breadListLast = JSON.parse(localStorage.getItem("crumbsl"));
      } else {
      } else {//关闭重写
        var path = this.$route.path,
          p = path.split("/").pop(),
          n = this.$route.name,
@@ -92,11 +92,15 @@
          //判断是否有重复项,有则删除其后路由↓
          var ourP = this.breadListLast;
          for (var os in ourP) {
            if(n == '首页'){
              n = '数据模式'
            }
            if (ourP[os].name == n && os != ourP.length - 1) {
              this.breadListLast.splice(
                +os + 1,
                this.breadListLast.length - os - 1
              );
              // console.log(+os + 1, ourP[os].name, "删除重复面包屑");
            }
          }
          // console.log(p, n, "写入多级面包屑");