5.10航天ui交易所pc端,代码jiem-pc
lxf
2025-06-20 bb4bf63aed5e87e23052a3c060dd7fa294a070ed
bug: 偶尔出现不显示数量
1 files modified
17 ■■■■ changed files
src/components/constract/PerpetualContract/orderCom/amountSlider.vue 17 ●●●● patch | view | raw | blame | history
src/components/constract/PerpetualContract/orderCom/amountSlider.vue
@@ -12,7 +12,6 @@
        v-model="amount"
        step-strictly="true"
        :min="0"
        :max="maxAmount"
        @change="inputChange"
      />
@@ -157,7 +156,9 @@
    //滑块事件
    sliderAmountChange(val) {
      let data;
      if (this.maxAmount) {
      console.log(val, "sliderAmountChange");
      // if (val) {
        // if (val == 0) {
        //   this.amount = undefined;
        // } else {
@@ -185,22 +186,22 @@
        // const maxAmount =
        // this.walletMoney * this.initOpen.amount * this.lever_rate;
        const maxAmount =
          Math.floor(this.walletMoney / (1 + sxf)) * this.lever_rate;
        const fl = maxAmount * sxf;
        console.log(maxAmount * rate, fl);
        Math.floor((this.walletMoney / (1 + sxf)) * rate) * this.lever_rate;
      // const fl = maxAmount * sxf;
      console.log(maxAmount * rate);
        // data = maxAmount * rate - fl;
        data = maxAmount;
      // this.maxAmount = maxAmount;
        // if (this.lever_rate) {
        //   data = math.format((this.maxAmount * rate), 2);
        // } else {
        //   data = math.format((this.maxAmount * rate) / 1, 2);
        // }
        this.amount = parseInt(data);
      this.amount = data;
        // }
        this.$emit("getAmount", this.amount);
      }
      // }
    },
    emptyValue() {
      this.sliderAmount = 0;