Browse Source

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

lq 1 tháng trước cách đây
mục cha
commit
ad62816532
1 tập tin đã thay đổi với 12 bổ sung12 xóa
  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">
         <el-table-column :label="$t.value.Action">
           <template #default="scope">
           <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>
           </template>
         </el-table-column>
         </el-table-column>
       </el-table>
       </el-table>