mirror of
https://gitee.com/TSpecific/tuniao-ui.git
synced 2026-06-06 19:44:38 +08:00
[add] tn-input 加入防抖功能
This commit is contained in:
@@ -114,6 +114,9 @@
|
||||
|
||||
<script>
|
||||
import Emitter from '../../libs/utils/emitter.js'
|
||||
import {
|
||||
debounceFun
|
||||
} from '../../libs/function/applyEven.js'
|
||||
|
||||
export default {
|
||||
mixins: [Emitter],
|
||||
@@ -334,7 +337,7 @@
|
||||
/**
|
||||
* input事件
|
||||
*/
|
||||
handleInput(event) {
|
||||
handleInput:debounceFun(function(event){
|
||||
let value = event.detail.value
|
||||
// 是否需要去掉空格
|
||||
if (this.trim) value = this.$tn.string.trim(value)
|
||||
@@ -355,7 +358,7 @@
|
||||
// 发送当前的值到form-item进行校验
|
||||
this.dispatch('tn-form-item','on-form-change', value)
|
||||
}, 40)
|
||||
},
|
||||
},this.blockTime),
|
||||
/**
|
||||
* blur事件
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user