소스 검색

fix: 系统内置车辆类型隐藏编辑删除按钮——v-if替代disabled

lq 2 달 전
부모
커밋
ad62816532
1개의 변경된 파일12개의 추가작업 그리고 12개의 파일을 삭제
  1. 12 12
      frontend/src/view/parking/carInfo.vue

+ 12 - 12
frontend/src/view/parking/carInfo.vue

@@ -263,18 +263,18 @@
         />
         <el-table-column :label="$t.value.Action">
           <template #default="scope">
-            <el-button
-              text
-              type="primary"
-              :disabled="scope.row.is_system"
-              @click="openTypeForm($t.value.modify, scope.row)"
-            >{{ $t.value.modify }}</el-button>
-            <el-button
-              text
-              type="danger"
-              :disabled="scope.row.is_system"
-              @click="deleteType(scope.row.ID)"
-            >{{ $t.value.remove }}</el-button>
+            <template v-if="!scope.row.is_system">
+              <el-button
+                text
+                type="primary"
+                @click="openTypeForm($t.value.modify, scope.row)"
+              >{{ $t.value.modify }}</el-button>
+              <el-button
+                text
+                type="danger"
+                @click="deleteType(scope.row.ID)"
+              >{{ $t.value.remove }}</el-button>
+            </template>
           </template>
         </el-table-column>
       </el-table>