no message
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
ref="input"
|
||||
:placeholder="placeholder"
|
||||
:value="value"
|
||||
:focus="focusState"
|
||||
:readOnly="readOnly"
|
||||
@focus="handleFocus"
|
||||
@blur="handleBlur"
|
||||
@input="handleSend">
|
||||
@@ -43,7 +45,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleFocus () {
|
||||
this.$refs.input.focus()
|
||||
this.focusState = true
|
||||
},
|
||||
handleBlur (e) {
|
||||
@@ -55,6 +56,12 @@ export default {
|
||||
if (e.target.value.length) {
|
||||
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