研发图纸文件管理系统-前端项目
iczer
2020-06-28 9dcf6557cf8d437f12b927025a106918dfb991ac
fix: the problem of page not switching when closing the current tab;:bug: #82
修复:关闭当前页签时页面不切换的问题;
1个文件已修改
9 ■■■■■ 已修改文件
src/layouts/MenuView.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layouts/MenuView.vue
@@ -78,8 +78,8 @@
  },
  methods: {
    changePage (key) {
      this.$router.push(key)
      this.activePage = key
      this.$router.push(key)
    },
    editPage (key, action) {
      this[action](key)
@@ -92,8 +92,11 @@
      this.pageList = this.pageList.filter(item => item.fullPath !== key)
      let index = this.linkList.indexOf(key)
      this.linkList = this.linkList.filter(item => item !== key)
      index = index >= this.linkList.length ? this.linkList.length - 1 : index
      this.activePage = this.linkList[index]
      if (key == this.activePage) {
        index = index >= this.linkList.length ? this.linkList.length - 1 : index
        this.activePage = this.linkList[index]
        this.$router.push(this.activePage)
      }
    },
    onContextmenu (e) {
      const pagekey = this.getPageKey(e.target)