Jelajahi Sumber

fix(字典编辑): 修复更新模式下字典项操作按钮显示问题

liujt 6 bulan lalu
induk
melakukan
8ae780d2b8
1 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 3 2
      src/views/system/dictionary/components/dict-edit.vue

+ 3 - 2
src/views/system/dictionary/components/dict-edit.vue

@@ -127,7 +127,7 @@
         <template slot-scope="scope">
         <template slot-scope="scope">
           <el-input
           <el-input
             @blur="checkedValue(scope.row.code)"
             @blur="checkedValue(scope.row.code)"
-            :disabled="isUpdate"
+            :disabled="isUpdate && scope.row.id"
             v-model="scope.row.code"
             v-model="scope.row.code"
             placeholder=""
             placeholder=""
           ></el-input>
           ></el-input>
@@ -156,9 +156,10 @@
           </el-radio-group>
           </el-radio-group>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column v-if="!isUpdate" align="center" label="操作">
+      <el-table-column align="center" label="操作">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <el-popconfirm
           <el-popconfirm
+            v-if="!isUpdate || (!scope.row.id && isUpdate)"
             class="ele-action"
             class="ele-action"
             title="确定要删除此字典项吗?"
             title="确定要删除此字典项吗?"
             @confirm="removeArr(scope)"
             @confirm="removeArr(scope)"