Explorar el Código

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

suwenjiang hace 2 meses
padre
commit
0738c635f3
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  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
-  textareaRef.value?.focus()
+
+  nextTick(() => {
+    textareaRef.value?.focus()
+  })
+
   replyComment.value = item
 
   parentId && (replyComment.value.parentId = parentId)