From c56935d7085725e609d926b064c146f3ffc29e6e Mon Sep 17 00:00:00 2001
From: YM <479443481@qq.com>
Date: 星期四, 06 六月 2024 19:33:48 +0800
Subject: [PATCH] 1

---
 src/components/headNav/headNav.vue |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/src/components/headNav/headNav.vue b/src/components/headNav/headNav.vue
index 4d99911..503337d 100644
--- a/src/components/headNav/headNav.vue
+++ b/src/components/headNav/headNav.vue
@@ -33,6 +33,7 @@
             width: 2.33rem;
             margin-right: 0.3rem;
             justify-content: flex-end;
+            position: relative;
           "
         >
           <input
@@ -43,6 +44,8 @@
               flex: 1;
               background-color: #fff;
               font-size: 0.13rem;
+              padding-right: 30px;
+              box-sizing: border-box;
             "
             @blur="InputBlur"
             @confirm="toggleSearch"
@@ -50,6 +53,30 @@
             v-model="searchInput"
             placeholder="璇疯緭鍏ユ悳绱㈠唴瀹�"
           />
+          <span
+            class="cleanupBtn"
+            v-if="searchInput"
+            @click="searchInput = ''"
+            style="
+              position: absolute;
+              top: 50%;
+              margin-top: -10px;
+              right: 42px;
+              color: #fff;
+              z-index: 2;
+              display: inline-block;
+              width: 20px;
+              height: 20px;
+              text-align: center;
+              line-height: 20px;
+              background-color: #a5a5a5;
+              font-weight: bold;
+              border-radius: 50%;
+              font-size: 12px;
+              cursor: pointer;
+            "
+            >鉁�</span
+          >
           <view
             title="鎼滅储"
             class="search-logo"

--
Gitblit v1.9.1