提交 05003c99 编写于 作者: 雪洛's avatar 雪洛

fix: input-data的clear改用touchstart、mousedown触发

上级 542ed5fa
......@@ -50,9 +50,7 @@
this.$emit('confirm', this.getValue(this.inputClearValue))
},
blur() {
setTimeout(() => {
this.showClearIcon = false
}, 100)
this.showClearIcon = false
},
focus() {
let inputValue = this.inputClearValue
......@@ -86,7 +84,12 @@
<view class="input-wrapper">
<input class="uni-input" :type="inputType" :value="inputClearValue" :placeholder="title" maxlength="-1" @input="input" @blur="blur"
@focus="focus" />
<image class="input-wrapper_image" src="/static/icons/clear.png" v-if="showClearIcon" @click="clearIcon">
<!-- #ifdef WEB -->
<image class="input-wrapper_image" src="/static/icons/clear.png" v-if="showClearIcon" @touchstart="clearIcon" @mousedown="clearIcon">
<!-- #endif -->
<!-- #ifndef WEB -->
<image class="input-wrapper_image" src="/static/icons/clear.png" v-if="showClearIcon" @touchstart="clearIcon">
<!-- #endif -->
</image>
</view>
</template>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册