no message
This commit is contained in:
@@ -8,6 +8,8 @@
|
|||||||
ref="input"
|
ref="input"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
:value="value"
|
:value="value"
|
||||||
|
:focus="focusState"
|
||||||
|
:readOnly="readOnly"
|
||||||
@focus="handleFocus"
|
@focus="handleFocus"
|
||||||
@blur="handleBlur"
|
@blur="handleBlur"
|
||||||
@input="handleSend">
|
@input="handleSend">
|
||||||
@@ -43,7 +45,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleFocus () {
|
handleFocus () {
|
||||||
this.$refs.input.focus()
|
|
||||||
this.focusState = true
|
this.focusState = true
|
||||||
},
|
},
|
||||||
handleBlur (e) {
|
handleBlur (e) {
|
||||||
@@ -55,6 +56,12 @@ export default {
|
|||||||
if (e.target.value.length) {
|
if (e.target.value.length) {
|
||||||
this.$emit('handleChange', e.target.value)
|
this.$emit('handleChange', e.target.value)
|
||||||
}
|
}
|
||||||
|
this.focusState = false
|
||||||
|
this.readOnly = true
|
||||||
|
setTimeout(() => {
|
||||||
|
this.readOnly = false
|
||||||
|
}, 200)
|
||||||
|
this.$refs.input.blur()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user