Fix(评论):苹果13 15 16,点击回复的时候光标是停留在@符号后面,要再点击一次光标才会停留到整个昵称后面
This commit is contained in:
@@ -183,14 +183,16 @@ export default {
|
|||||||
showSendBtn(item) {
|
showSendBtn(item) {
|
||||||
// 显示发送按钮
|
// 显示发送按钮
|
||||||
this.showBtn = true
|
this.showBtn = true
|
||||||
// 延迟100ms,否则无法聚焦
|
this.currentComment = item
|
||||||
setTimeout(() => {
|
this.content = '@' + item.senderUserNickname + ' '
|
||||||
// 自动聚焦
|
this.$nextTick(() => {
|
||||||
this.autoFocus = true
|
// 延迟100ms,否则无法聚焦
|
||||||
this.currentComment = item
|
setTimeout(() => {
|
||||||
this.content = '@' + item.senderUserNickname + ' '
|
// 自动聚焦
|
||||||
this.cursorIndex = this.content.length
|
this.autoFocus = true
|
||||||
}, 100)
|
this.cursorIndex = this.content.length
|
||||||
|
}, 100)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 失焦
|
* 失焦
|
||||||
|
|||||||
Reference in New Issue
Block a user