|
@@ -129,7 +129,7 @@
|
|
|
</div>
|
|
|
<template v-if="commentList.length">
|
|
|
<template v-for="item in commentList" :key="item.id">
|
|
|
- <div class="flex mt-10 justify-between">
|
|
|
+ <div class="flex mt-10 justify-between" id="commentsBox">
|
|
|
<div class="w-[32px] h-[32px] bg-[#ddd] rounded-full shrink-0">
|
|
|
<img v-if="item?.headImageUrlDictMap?.name" class="w-full h-full object-cover rounded-full"
|
|
|
:src="item?.headImageUrlDictMap?.name" alt="">
|
|
@@ -461,6 +461,10 @@ async function addComment() {
|
|
|
showToast('评论发布成功')
|
|
|
getComments()
|
|
|
showEmoji.value = false
|
|
|
+ document.querySelector('#commentsBox').scrollIntoView({
|
|
|
+ behavior: 'smooth',
|
|
|
+ block: 'start'
|
|
|
+ })
|
|
|
}).finally(() => canAddComment.value = true, replyComment.value = {}, cursorIndex.value = 0)
|
|
|
}
|
|
|
function pageClick() {
|