From e01cee0f0c5c5c2eb2d8595eadb3c7a9df2a37fc Mon Sep 17 00:00:00 2001
From: 李凌 <344137771@qq.com>
Date: Wed, 21 Jan 2026 16:37:01 +0800
Subject: [PATCH] 1
---
src/components/Transform/trade-order-area/index.vue | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/src/components/Transform/trade-order-area/index.vue b/src/components/Transform/trade-order-area/index.vue
index c543156..1a4c523 100644
--- a/src/components/Transform/trade-order-area/index.vue
+++ b/src/components/Transform/trade-order-area/index.vue
@@ -91,6 +91,7 @@
import TradeApi from "@/service/trading.js";
import { strToArr } from '@/utils/utis'
import { mapGetters } from "vuex";
+import { getStorage, setStorage } from '@/utils/index.js';
// import PopupConfirmOrder from '@/components/popup-confirm-order'
export default {
name: "perpetualPosition",
@@ -136,6 +137,8 @@
this.title = this.selectData[0].title
this.type = this.selectData[0].type
this.form.order_price_type = 'opponent'
+ // 检查是否有从其他页面传递的卖出参数
+ this.checkSellParams()
},
watch: {
initOpen: { // 处理滚动条初始值
@@ -191,9 +194,26 @@
this.title = this.selectData[0].title
this.type = this.selectData[0].type
this.form.order_price_type = 'opponent'
+ // 检查是否有从其他页面传递的卖出参数
+ this.checkSellParams()
},
methods: {
strToArr,
+ // 检查是否有从其他页面传递的卖出参数
+ checkSellParams() {
+ const sellParams = getStorage('tradeSellParams')
+ if (sellParams && sellParams.mode === 'close' && sellParams.volume) {
+ // 切换到卖出模式
+ this.changeTab('close')
+ // 设置数量
+ this.$nextTick(() => {
+ this.form.volume = sellParams.volume
+ this.isTotal = false
+ })
+ // 清除存储的参数
+ window.localStorage.removeItem('tradeSellParams')
+ }
+ },
checkIsTotal(val) {
this.isTotal = val
this.percentageVal = 0
--
Gitblit v1.9.3