From 258c7fb2632175f63c7b1602e56721e7f9ca741a Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Sun, 28 Sep 2025 15:08:02 +0800
Subject: [PATCH] 2

---
 src/views/home/components/HomeLb.vue |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/views/home/components/HomeLb.vue b/src/views/home/components/HomeLb.vue
index 3003d4f..67b8e11 100644
--- a/src/views/home/components/HomeLb.vue
+++ b/src/views/home/components/HomeLb.vue
@@ -8,6 +8,7 @@
     </div>
 
     <div class="order_list" v-if="activeName == '0'">
+      <el-button type="primary" style="margin-left: 16px;" @click="CloseAll">{{ $t("一鍵平倉") }}</el-button>
       <el-table height="100%" :data="tableData" style="width: 100%" size="small" empty-text="No Data"
         @row-click="Choice">
         <el-table-column prop="stockSpell" :label="$t('hj313')">
@@ -229,6 +230,15 @@
         times = null;
       }
     },
+    // 一键平仓
+    async CloseAll() {
+      const res = await api.allsell();
+      if (res.status === 0) {
+        this.$message.success(res.msg);
+      } else {
+        this.$message.error(res.msg);
+      }
+    }
   },
 };
 </script>

--
Gitblit v1.9.3