Fix(评论):苹果13 15 16,点击回复的时候光标是停留在@符号后面,要再点击一次光标才会停留到整个昵称后面

This commit is contained in:
lifizer
2025-07-16 10:20:27 +08:00
parent 4aeed9292b
commit 498e62b289
+1 -1
View File
@@ -185,12 +185,12 @@ export default {
this.showBtn = true this.showBtn = true
this.currentComment = item this.currentComment = item
this.content = '@' + item.senderUserNickname + ' ' this.content = '@' + item.senderUserNickname + ' '
this.cursorIndex = this.content.length
this.$nextTick(() => { this.$nextTick(() => {
// 延迟100ms,否则无法聚焦 // 延迟100ms,否则无法聚焦
setTimeout(() => { setTimeout(() => {
// 自动聚焦 // 自动聚焦
this.autoFocus = true this.autoFocus = true
this.cursorIndex = this.content.length
}, 100) }, 100)
}) })
}, },