فهرست منبع

fix:我的评论页面的 回复输入框的优化

suwenjiang 2 ماه پیش
والد
کامیت
0738c635f3
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      src/pages/profile/my-comment.vue

+ 5 - 1
src/pages/profile/my-comment.vue

@@ -422,7 +422,11 @@ function addReply(item, parentId) {
   }
   }
 
 
   showInput.value = true
   showInput.value = true
-  textareaRef.value?.focus()
+
+  nextTick(() => {
+    textareaRef.value?.focus()
+  })
+
   replyComment.value = item
   replyComment.value = item
 
 
   parentId && (replyComment.value.parentId = parentId)
   parentId && (replyComment.value.parentId = parentId)