From 716c5c3a69e23dc5aa60192bde69046726fd6d9b Mon Sep 17 00:00:00 2001 From: luyisha Date: Wed, 16 Aug 2023 17:21:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i18n/lang/en.json | 4 ++-- pages/exchange/open-position.vue | 28 +++++++++++++++++++++------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/i18n/lang/en.json b/i18n/lang/en.json index c0fbd30..2be0d98 100644 --- a/i18n/lang/en.json +++ b/i18n/lang/en.json @@ -261,7 +261,7 @@ "c3": "Buy", "c4": "Sell", "c5": "Quantity", - "c6": "Best market transaction", + "c6": "Market price", "c7": "Total Price", "c8": "Available Quantity", "c9": "Total Value", @@ -750,7 +750,7 @@ "a3":"TP/SL for position", "a4":"Best market transaction", "a5":"Positions", - "a6":"Order management", + "a6":"Order Management", "a7":"Open Orders", "a8":"Order History", "a9":"multiple", diff --git a/pages/exchange/open-position.vue b/pages/exchange/open-position.vue index a1b72c8..5e00dc7 100644 --- a/pages/exchange/open-position.vue +++ b/pages/exchange/open-position.vue @@ -115,8 +115,9 @@ @@ -866,13 +867,26 @@ export default { // #ifdef APP-PLUS return plus.os.name // #endif - } + }, + marginCheck(){ + return parseInt(this.margin); + } }, watch: { - maxNum(n){ - this.form.amount = Math.round((this.maxNum * this.sliderActive1) / 100); - this.margin=(this.form.amount/this.form.lever_rate) - }, + marginCheck: { + handler(n){ + // console.log(n, '-1----'); + if(n===0){ + this.margin = ''; + // console.log(this.margin, '--2---'); + } + }, + immediate: true + }, + maxNum(n){ + this.form.amount = Math.round((this.maxNum * this.sliderActive1) / 100); + this.margin=(this.form.amount/this.form.lever_rate) + }, symbol() { this.$emit("symbols",this.symbol) if (this.unSymbol) {