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() {
|
created() {
|
||||||
this.inputValue = this.$_formateValue(this.$_subValue(this.value + '')).value
|
this.inputValue = this.$_formateValue(this.$_subValue(this.value + '')).value
|
||||||
|
this.$_stopEditInput = debounce(function() {
|
||||||
|
this.isInputEditing = false
|
||||||
|
}, 500)
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.isVirtualKeyboard &&
|
this.isVirtualKeyboard &&
|
||||||
|
@ -423,9 +426,7 @@ export default {
|
||||||
this.isInputEditing = true
|
this.isInputEditing = true
|
||||||
this.$_stopEditInput()
|
this.$_stopEditInput()
|
||||||
},
|
},
|
||||||
$_stopEditInput: debounce(function() {
|
$_stopEditInput: noop,
|
||||||
this.isInputEditing = false
|
|
||||||
}, 500),
|
|
||||||
$_clearInput() {
|
$_clearInput() {
|
||||||
this.inputValue = ''
|
this.inputValue = ''
|
||||||
!this.isTitleLatent && this.focus()
|
!this.isTitleLatent && this.focus()
|
||||||
|
|
Loading…
Reference in New Issue