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事件 */