lxf
2025-07-11 fd66f3c47027795370f363d74f2258491dd38542
src/components/Transform/trade-order-area/index.vue
@@ -1,5 +1,5 @@
<template>
  <div class="flex flex-col flex-1 font-28">
  <div class="flex flex-col flex-1 font-28" style="width: 280px;">
    <div class="flex items-center h-66 tabBackground text-grey">
      <p class="font-28 flex-1 flex items-center justify-center h-66 buy-item"
        :class="currentType == 'open' ? 'open' : ''" @click="changeTab('open')">{{ $t('买入') }}</p>
@@ -30,9 +30,9 @@
      <div class="total-div" :class="[!isTotal ? 'active-bg' : '']" @click="checkIsTotal(false)">
        {{ $t('数量') }}
      </div>
      <div class="total-div" :class="[isTotal ? 'active-bg' : '']" @click="checkIsTotal(true)">
      <!-- <div class="total-div" :class="[isTotal ? 'active-bg' : '']" @click="checkIsTotal(true)">
        {{ $t('总额') }}
      </div>
      </div> -->
    </div>
    <div v-if="!isTotal" class="h-70 lh-70 inputBackground mb-36 flex justify-center px-16">
      <input :placeholder="$t('数量')" class=" w-full h-70 border-none textColor font-28" v-model="form.volume"
@@ -90,6 +90,7 @@
    [Tab.name]: Tab
  },
  props: {
    symbol: {
      type: String,
      default: ''
@@ -166,7 +167,7 @@
        order_price_type: 'opponent', // 市价or限价
      },
      type: "1",//选中市价或限价类型
      currentType: "open", //开仓类型
      // currentType: "close", //开仓类型
      interval: 0.001,
      marks: (val) => val % 25 === 0,
      isTotal: false,
@@ -180,6 +181,7 @@
    ]
    this.title = this.selectData[0].title
    this.type = this.selectData[0].type
   // this.currentType = this.currentTypes
    this.form.order_price_type = 'opponent'
  },
  methods: {
@@ -470,15 +472,17 @@
}
.open {
  background-color: $green;
  background: url(@/assets/image/public/open-bg.png) no-repeat right center;
  // background-color: $green;
  background-color: #2EBD85;
  // background: url(@/assets/image/public/open-bg.png) no-repeat right center;
  background-size: 100% 100%;
  color: white;
}
.close {
  background-color: $green;
  background: url(@/assets/image/public/close-bg.png) no-repeat left center;
  background-color: #DE5D56;
  // background: url(@/assets/image/public/close-bg.png) no-repeat left center;
  background-size: 100% 100%;
  color: white;
}