From 42f04770c4ec06153d1d056b761e45196a4c1a82 Mon Sep 17 00:00:00 2001 From: zhengliming Date: Wed, 20 Mar 2024 20:33:07 +0800 Subject: [PATCH] =?UTF-8?q?[add]=20input=E5=8F=B3=E8=BE=B9=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E7=82=B9=E5=87=BB=E4=BA=8B=E4=BB=B6=E5=9B=9E=E4=BC=A0?= =?UTF-8?q?=EF=BC=8C=E5=8F=AF=E4=BB=A5=E8=AE=BE=E7=BD=AE=E9=98=B2=E6=8A=96?= =?UTF-8?q?=E8=8A=82=E6=B5=81=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tuniao-ui/components/tn-input/tn-input.vue | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tuniao-ui/components/tn-input/tn-input.vue b/tuniao-ui/components/tn-input/tn-input.vue index adf92ba..13a21bd 100644 --- a/tuniao-ui/components/tn-input/tn-input.vue +++ b/tuniao-ui/components/tn-input/tn-input.vue @@ -81,7 +81,7 @@ v-else-if="type === 'text' && !focused && showRightIcon && rightIcon !== ''" class="tn-input__right-icon__item tn-input__right-icon__clear" > - + import Emitter from '../../libs/utils/emitter.js' - + export default { mixins: [Emitter], name: 'tn-input', @@ -239,6 +239,16 @@ rightIcon: { type: String, default: '' + }, + //场景:debounce :防抖模式 throttle:节流模式 + scene:{ + type: String, + default: 'debounce' + }, + // 防抖节流间隔时间(毫秒) + blockTime:{ + type: Number, + default: 500 } }, computed: { @@ -299,6 +309,9 @@ this.$on("on-form-item-error", this.onFormItemError) }, methods: { + rightIconClick(){ + this.$emit('rightClick', this.defaultValue) + }, /** * input事件 */