no message

This commit is contained in:
蔡玲
2024-10-17 15:34:20 +08:00
parent b86b4d20bc
commit 5afd1bc1db

View File

@@ -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()
}
}
}