From c4383c19781df1b3667df72453c4dcd3388ec6d1 Mon Sep 17 00:00:00 2001
From: whycq <you@example.com>
Date: 星期五, 23 九月 2022 12:03:26 +0800
Subject: [PATCH] #

---
 components/y-input/y-input.vue |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/components/y-input/y-input.vue b/components/y-input/y-input.vue
index b05ec16..1823a00 100644
--- a/components/y-input/y-input.vue
+++ b/components/y-input/y-input.vue
@@ -8,10 +8,9 @@
 				<view style="display: flex;" class="input">
 					<input type="text" :placeholder="placeholderText" @input="input"
 					 placeholder-style="font-size:22rpx" v-model="val">
-					 <view class="icons">
+					 <view class="icons" v-if="val.length" @click="clear">
 						 <uni-icons type="close"></uni-icons>
 					 </view>
-					
 				</view>
 			</view>
 		</view>
@@ -64,7 +63,7 @@
 					backgroundColor: '#cccddd'
 					
 				},
-				zBig: 'big',
+				zBig: 'small',
 				pps: {
 					fontSize: '24rpx',
 				}
@@ -73,7 +72,11 @@
 		methods: {
 			input() {
 				this.$emit('input',this.val);
+			},
+			clear() {
+				this.val = ''
 			}
+			
 		}
 	}
 </script>

--
Gitblit v1.9.1