From 3f3e2d5977787b0c6e09cd5cba7b41e5fb7d3fd0 Mon Sep 17 00:00:00 2001
From: zzzz <690498789@qq.com>
Date: Sun, 21 Apr 2024 15:59:28 +0800
Subject: [PATCH] first

---
 src/components/perpetual-open/index.vue |   55 +++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 41 insertions(+), 14 deletions(-)

diff --git a/src/components/perpetual-open/index.vue b/src/components/perpetual-open/index.vue
index 3b18666..bba2761 100644
--- a/src/components/perpetual-open/index.vue
+++ b/src/components/perpetual-open/index.vue
@@ -2,20 +2,42 @@
   <!-- 永续合约开仓页 -->
   <div class="perpetual-open">
     <!-- 隐藏杠杠   全仓     k 线图入口 -->
-    <!-- <div class="flex header-open">
+    <div class="flex header-open">
       <div class="flex flex-1 pt-34">
-        <div class="w-180 h-60 lh-60 text-center rounded inputBackground textColor">
+        <div
+          class="w-180 h-60 lh-60 text-center rounded inputBackground textColor"
+        >
           {{ $t("全仓") }}
         </div>
-        <div class="w-140 h-60 lh-60 ml-29 rounded tabBackground textColor" v-if="selectIndex / 1 === 1">
-          <div @click="showOptions = !showOptions" style="height: 100%; box-sizing: border-box"
-            class="relative word-30 pl-28 pr-10 w-140 h-60 select-wrap flex justify-between items-center">
+        <div
+          class="w-140 h-60 lh-60 ml-29 rounded tabBackground textColor"
+          v-if="selectIndex / 1 === 1"
+        >
+          <div
+            @click="showOptions = !showOptions"
+            style="height: 100%; box-sizing: border-box"
+            class="relative word-30 pl-28 pr-10 w-140 h-60 select-wrap flex justify-between items-center"
+          >
             {{ form.lever_rate }}x
-            <img src="../../assets/image/public/grey-select.png" alt="select-icon" class="w-22 h-11" />
-            <div v-if="showOptions" class="options w-140 absolute top-97 left-0 z-10">
-              <div class="w-full" @click.stop="handleChoose(item)" :class="{
-                'option-active': form.lever_rate === item.lever_rate,
-              }" :value="item.lever_rate" v-for="item in initData.lever" :key="item.id">
+            <img
+              src="../../assets/image/public/grey-select.png"
+              alt="select-icon"
+              class="w-22 h-11"
+            />
+            <div
+              v-if="showOptions"
+              class="options w-140 absolute top-97 left-0 z-10"
+            >
+              <div
+                class="w-full"
+                @click.stop="handleChoose(item)"
+                :class="{
+                  'option-active': form.lever_rate === item.lever_rate,
+                }"
+                :value="item.lever_rate"
+                v-for="item in initData.lever"
+                :key="item.id"
+              >
                 {{ item.lever_rate }}x
               </div>
             </div>
@@ -23,9 +45,14 @@
         </div>
       </div>
       <div>
-        <img src="../../assets/image/public/k-line.png" alt="line-img" class="w-38 h-35" @click="jump" />
+        <img
+          src="../../assets/image/public/k-line.png"
+          alt="line-img"
+          class="w-38 h-35"
+          @click="jump"
+        />
       </div>
-    </div> -->
+    </div>
     <div class="pt-30 pb-20">
       <div class="flex">
         <div class="mr-30">
@@ -36,7 +63,7 @@
             </div>
             <div class="text-right items-end justify-end">
               <div class="">{{ $t("数量") }}</div>
-              <div class="mt-4">({{ symbol.toUpperCase() || "--" }})</div>
+              <div class="mt-4">({{ symbol | _symbolName() }})</div>
             </div>
           </div>
           <div
@@ -559,7 +586,7 @@
         this.form.price = val;
       }
       this.form.para_id =
-        this.initFutrue.para && this.initFutrue.para[this.paraIndex].para_id; // 不优雅,不可靠
+        this.initFutrue.para && this.initFutrue.para[this.paraIndex]?.para_id; // 不优雅,不可靠
       // this.form.symbol = this.symbol.toLowerCase()
     },
     initOpen: {

--
Gitblit v1.9.3