From c2a1a725ad13212723e0fddd078616d0af67d5c7 Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Sun, 06 Jul 2025 14:26:14 +0800
Subject: [PATCH] 开空开多容易混乱问题
---
src/components/constract/PerpetualContract/orderCom/openDialog.vue | 5 +++--
src/components/constract/PerpetualContract/createOrder.vue | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/components/constract/PerpetualContract/createOrder.vue b/src/components/constract/PerpetualContract/createOrder.vue
index 6dabecb..ec2172d 100644
--- a/src/components/constract/PerpetualContract/createOrder.vue
+++ b/src/components/constract/PerpetualContract/createOrder.vue
@@ -530,10 +530,10 @@
}
if (this.isActive === 0) {
// 开仓弹窗 不弹出直接确认
- this.$refs.openDialog.handleSubmit();
+ this.$refs.openDialog.handleSubmit(type);
} else {
// 平仓弹窗
- this.$refs.closeDialog.handleSubmit();
+ this.$refs.closeDialog.handleSubmit(type);
}
}
},
diff --git a/src/components/constract/PerpetualContract/orderCom/openDialog.vue b/src/components/constract/PerpetualContract/orderCom/openDialog.vue
index 726ea64..8f20623 100644
--- a/src/components/constract/PerpetualContract/orderCom/openDialog.vue
+++ b/src/components/constract/PerpetualContract/orderCom/openDialog.vue
@@ -134,9 +134,10 @@
close() {
this.isShow = false;
},
- handleSubmit() {
+ handleSubmit(type) {
+ console.log("handleSubmit: ", type, this.sellOrBuy);
const data = {
- direction: this.sellOrBuy,
+ direction: type || this.sellOrBuy,
price_type: this.type,
...this.info, //价格,数量,杠杆,symbol
};
--
Gitblit v1.9.3