src/components/RightToolbar/index.vue
@@ -77,6 +77,7 @@
      title: "显示/隐藏",
      // 是否显示弹出层
      open: false,
      tableKey: 0,
    };
  },
  props: {
@@ -138,11 +139,13 @@
      })
    },
    addDynamicColumn() {
      this.getDyColumn()
      this.showDynamicColumn = true
    },
    saveColumns() {
      editDynamicColumn(this.dynamicColumnList).then(res => {
        this.$message.success("保存成功")
        this.$emit('refreshHeader');
        this.showDynamicColumn = false
      })
    },
@@ -153,14 +156,15 @@
      })
    },
    delColumn(id, index) {
      if (! id) {
        this.dynamicColumnList.splice(index, 1)
        return
      if(id) {
        deleteDynamicColumnById(id).then(res => {
          this.$message.success("删除成功")
          this.getDyColumn();
          this.$emit('refreshHeader');
        })
      }else {
        this.dynamicColumnList.splice(index,1)
      }
      deleteDynamicColumnById(id).then(res => {
        this.$message.success("删除成功")
        this.getDyColumn();
      })
    },
    dynamicColumnClose() {
      this.showDynamicColumn = false