RuoYi
2022-06-16 56563b4f8e5b48f54fb5fc05edcf9af7ee55a859
修复关闭左侧标签报错问题
已修改1个文件
27 ■■■■■ 文件已修改
src/store/modules/tagsView.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/tagsView.js
@@ -132,19 +132,22 @@
        })
      },
      delLeftTags(view) {
        const index = this.visitedViews.findIndex(v => v.path === view.path)
        if (index === -1) {
          return
        }
        this.visitedViews = this.visitedViews.filter((item, idx) => {
          if (idx >= index || (item.meta && item.meta.affix)) {
            return true
        return new Promise(resolve => {
          const index = this.visitedViews.findIndex(v => v.path === view.path)
          if (index === -1) {
            return
          }
          const i = this.cachedViews.indexOf(item.name)
          if (i > -1) {
            this.cachedViews.splice(i, 1)
          }
          return false
          this.visitedViews = this.visitedViews.filter((item, idx) => {
            if (idx >= index || (item.meta && item.meta.affix)) {
              return true
            }
            const i = this.cachedViews.indexOf(item.name)
            if (i > -1) {
              this.cachedViews.splice(i, 1)
            }
            return false
          })
          resolve([...this.visitedViews])
        })
      }
    }