Преглед изворни кода

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

liujt пре 6 месеци
родитељ
комит
8ae780d2b8
1 измењених фајлова са 3 додато и 2 уклоњено
  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">
           <el-input
             @blur="checkedValue(scope.row.code)"
-            :disabled="isUpdate"
+            :disabled="isUpdate && scope.row.id"
             v-model="scope.row.code"
             placeholder=""
           ></el-input>
@@ -156,9 +156,10 @@
           </el-radio-group>
         </template>
       </el-table-column>
-      <el-table-column v-if="!isUpdate" align="center" label="操作">
+      <el-table-column align="center" label="操作">
         <template slot-scope="scope">
           <el-popconfirm
+            v-if="!isUpdate || (!scope.row.id && isUpdate)"
             class="ele-action"
             title="确定要删除此字典项吗?"
             @confirm="removeArr(scope)"