田源
2023-08-02 1f3c092f70509645ffa4a7c6b246d3a1fbc6324e
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -88,6 +88,12 @@
      <el-dialog :visible.sync="enumVisible" append-to-body title="枚举注入" :before-close="this.enumBeforeClose">
        <!-- 渲染表格及按钮 -->
        <!-- 渲染表格及按钮 -->
        <el-alert
          title="请新增后点击单元格输入枚举数据"
          type="success"
          style="margin-bottom: 10px;display: inline-block"
          :closable="false">
        </el-alert>
        <div>
          <el-button icon="el-icon-plus" type="primary" @click="addRow">新增</el-button>
          <el-table :data="tableData" style="width: 100%" @cell-click="handleCellClick"
@@ -1799,6 +1805,7 @@
    },
    //枚举注入保存
    enumAddHandle() {
     if(this.tableData.length>=1){
      let hasError = false; // 添加一个变量
      this.tableData.forEach((item, index) => {
        if (item.key === '') {
@@ -1822,6 +1829,9 @@
          this.enumVisible = false;
        }
      }
     }else {
       this.$message.warning('请添加枚举注入数据!')
     }
    },
    // 将正在编辑的行的状态变为 null,即退出编辑状态
    saveRow() {