1
jhzh
2024-09-15 402042e2ee63f1ed5b1d5d6df483270ab996e76e
src/components/perpetual-open/index.vue
@@ -64,7 +64,12 @@
            </div>
            <div class="text-right items-end justify-end">
              <div class="">{{ $t("数量") }}</div>
              <div class="mt-4" v-if="symbol=='love'">(ORBITAL)</div>
              <div class="mt-4" v-if="symbol=='MOTHER'">(ORBITAL)</div>
           <div class="mt-4" v-else-if="symbol=='ZKP'">(ZYD)</div>
           <div class="mt-4" v-else-if="symbol=='DEA'">(DIA)</div>
           <div class="mt-4" v-else-if="symbol=='AXFD'">(XETA)</div>
           <div class="mt-4" v-else-if="symbol=='SMK'">(OG)</div>
           <div class="mt-4" v-else-if="symbol=='FPP'">(FIL)</div>
           <div class="mt-4" v-else>({{ symbol | _symbolName() }})</div>
            </div>
          </div>
@@ -225,12 +230,16 @@
          
          <div style="border: 1px solid #a6a6a6; border-radius: 4px;"  class="h-76 lh-76 inputBackground2 mb-30 flex pr-20 justify-center rounded-lg textColor"
            v-if="selectIndex == 1">
         <input v-if="type / 1 === 1" :placeholder="$t('价格最优')" class="w-full pl-20 h-76 border-none text-left rounded-lg"
         <!-- <input v-if="type / 1 === 1" :placeholder="$t('价格最优')" class="w-full pl-20 h-76 border-none text-left rounded-lg"
           :disabled="type / 1 === 1" @focus="focus = true" />
           <input v-else class="w-full pl-20 h-76 border-none text-left rounded-lg"
             :disabled="type / 1 === 1" @focus="focus = true" v-model="form.price" />
             :disabled="type / 1 === 1" @focus="focus = true" v-model="form.price" /> -->
              <input  class="w-full pl-20 h-76 border-none text-left rounded-lg"
                :disabled="type / 1 === 1" @focus="focus = true" v-model="form.price" />
            <span class="ml-20">USDT</span>
          </div>
          <div v-if="selectIndex == 2"  class="w-440 flex items-center inputBackground2 h-76 lh-76 rounded-lg">
            <div v-if="selectIndex == 1" class="w-80 flex items-center justify-center" style="height: 100%"
              @click="onReduce">
@@ -252,7 +261,7 @@
            </div>
          </div>
          <template v-if="selectIndex == 1">
            <div class="mt-50 w-full flex justify-between items-center">
            <div class="mb-20 w-full flex justify-between items-center">
              <span class="font-22 font-400 newcolor1">{{
                $t("可开张数")
              }}</span>
@@ -261,6 +270,16 @@
                U
              </span>
            </div>
         <div style="border: 1px solid #a6a6a6; border-radius: 4px;"  class="h-76 lh-76 inputBackground2 mb-30 flex pr-20 justify-center rounded-lg textColor"
           v-if="selectIndex == 1">
            <input :placeholder="selectIndex == 1 ? $t('交易数量')
              : $t('最少') + initFutrue && initFutrue.para
                ? $t('最小金额') + initFutrue.para[paraIndex].buy_min
                : ''
              " class="border-none text-center textColor" style="width: 156px" v-model="form.amount"
              type="number" @input="onInput" />
         </div>
         <!-- <div
           class="h-76 lh-76 inputBackground mb-30 flex pr-20 justify-center rounded-lg textColor" style="margin-top:20px"
         >
@@ -650,7 +669,7 @@
        obj = this.initOpen;
        if (!obj.lever || !obj.lever.length) {
          // 倍数
          obj.lever = [{ id: 1, lever_rate: 1 }];
          obj.lever = [{ id: 1, lever_rate: 100 }];
        }
        return obj;
      }
@@ -691,7 +710,7 @@
        session_token: "",
        direction: "buy", // 买or卖
        price_type: "opponent", // 市价or限价
        lever_rate: 1, // 杠杆
        lever_rate: 100, // 杠杆
        stop_price_profit: "",
        stop_price_loss: "",
        price: "",