From 155f2b80f2a9b6f900c73f6e4461e9cebb7cd028 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期二, 10 十月 2023 17:12:20 +0800
Subject: [PATCH] #
---
components/y-input/y-input.vue | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/components/y-input/y-input.vue b/components/y-input/y-input.vue
index b05ec16..ccfe5c5 100644
--- a/components/y-input/y-input.vue
+++ b/components/y-input/y-input.vue
@@ -1,17 +1,14 @@
<template>
<view>
<view class="main">
- <view style="display: flex;align-items: center;">
- <y-title :title="titleText"/>
- </view>
+ <y-title :title="titleText"/>
<view :class="zBig">
<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>
@@ -50,9 +47,6 @@
placeholderText() {
return this.placeholder
},
- // val() {
- // return this.inputVal || t("uni-popup.inputVal")
- // }
},
data() {
return {
@@ -64,7 +58,7 @@
backgroundColor: '#cccddd'
},
- zBig: 'big',
+ zBig: 'small',
pps: {
fontSize: '24rpx',
}
@@ -73,7 +67,12 @@
methods: {
input() {
this.$emit('input',this.val);
+ },
+ clear() {
+ this.val = ''
+ this.input()
}
+
}
}
</script>
--
Gitblit v1.9.1