fix(input-item): create debounce method dynamically
variables inner debounce will be shared by multiple component instance
This commit is contained in:
parent
e7ecca6fee
commit
2a70900dba
|
@ -324,6 +324,9 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.inputValue = this.$_formateValue(this.$_subValue(this.value + '')).value
|
||||
this.$_stopEditInput = debounce(function() {
|
||||
this.isInputEditing = false
|
||||
}, 500)
|
||||
},
|
||||
mounted() {
|
||||
this.isVirtualKeyboard &&
|
||||
|
@ -423,9 +426,7 @@ export default {
|
|||
this.isInputEditing = true
|
||||
this.$_stopEditInput()
|
||||
},
|
||||
$_stopEditInput: debounce(function() {
|
||||
this.isInputEditing = false
|
||||
}, 500),
|
||||
$_stopEditInput: noop,
|
||||
$_clearInput() {
|
||||
this.inputValue = ''
|
||||
!this.isTitleLatent && this.focus()
|
||||
|
|
Loading…
Reference in New Issue