huangbin 4 年之前
父節點
當前提交
310e49474c

+ 5 - 1
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/post-buying/addPermance.vue

@@ -69,6 +69,7 @@
               <a-col :span="4">
                 <svg class="icon svg-icon"
                      @click="deleteTemp(index)"
+                     v-if="showDeleteTemp(index)"
                      aria-hidden="true">
                   <use xlink:href="#icon-shanchu" />
                 </svg>
@@ -139,7 +140,10 @@ const useDeleteTemp = (formState: UnwrapRef<PermanceTempForm>) => {
     function deleteTemp(index: number) {
         formState.domains.splice(index, 1);
     }
-    return { deleteTemp };
+    function showDeleteTemp(index: number) {
+        return index !== 0;
+    }
+    return { deleteTemp, showDeleteTemp };
 };
 
 // 编辑 模板