From 402042e2ee63f1ed5b1d5d6df483270ab996e76e Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Sun, 15 Sep 2024 18:55:42 +0800
Subject: [PATCH] 1

---
 src/components/contract-header/index.vue |   33 +++++++++++++++++++++++++++++++--
 1 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/src/components/contract-header/index.vue b/src/components/contract-header/index.vue
index 37f88ae..86bd758 100644
--- a/src/components/contract-header/index.vue
+++ b/src/components/contract-header/index.vue
@@ -30,7 +30,7 @@
                             @click="jump" />
                     </div> -->
         </div>
-        <div class="flex justify-between pt-34">
+       <!-- <div class="flex justify-between pt-34">
           <button
             class="w-368 h-74 lh-74"
             :class="selectIndex == 1 ? 'select-active' : 'no-select'"
@@ -45,7 +45,7 @@
           >
             {{ $t("期权合约") }}
           </button>
-        </div>
+        </div> -->
       </div>
     </div>
     <!-- 左侧边弹出菜单 -->
@@ -65,6 +65,21 @@
           <span class="font-30">/ USDT</span>
         </div>
       </div>
+	  <div class="inputBoxbg h-60 w-full rounded-full flex items-center" style="background: #f5f5f5;">
+	    <input
+	      style="padding-left: 10px"
+	      type="text"
+	      v-model="keywords"
+	      :placeholder="$t('搜索币种')"
+	      class="h-full flex-1 search-input border-none bg-none"
+	      @input="onInput"
+	    />
+	    <img
+	      src="@/assets/3x/资源 22@3x.png"
+	      alt="logo"
+	      class="w-32 h-32 mx-16"
+	    />
+	  </div>
       <div class="pl-42 pr-40">
         <div class="flex justify-between mb-42 mt-53">
           <div class="flex items-center text-grey">
@@ -164,6 +179,7 @@
       //   selectIndex2:this.selectIndex,
       show: false,
       timeout: null,
+	  keywords:'',
       // title: '',
       list: [
         // { name:"BTC/USDT",close:"22042.28",change_ratio:"2.21"},
@@ -196,6 +212,19 @@
       this.show = true;
       this.fetchList();
     },
+	onInput(e) {
+		this.keywords = e.target.value
+	   this.coins = this.coins.filter(item => item.includes(e.target.value));
+	   if(!this.keywords){
+		   this.coins = this.coinList.map((item) => item.symbol);
+	   }
+	  // this.funds = this.fundsDatra.filter((item) =>
+	  //   item.symbol.includes(e.target.value.toLocaleLowerCase())
+	  // );
+	  // this.fundsDatra[index]["data"] = this.tabList[index]["data"].filter(
+	  //   (item) => item.symbol.includes(e.target.value.toLocaleLowerCase())
+	  // );
+	},
     fetchList() {
       // 获取行情
       const mainArray = this.coins.filter(

--
Gitblit v1.9.3