消息框概率性不能触底,用setTimeout后观察效果

This commit is contained in:
bob
2025-01-19 12:05:28 +08:00
parent 2f9c370bf8
commit 05aed8f816

View File

@@ -588,14 +588,13 @@ const onLoadMore = async () => {
* @param behavior smooth 平滑的, instant 立即
*/
const msgListReachBottom = async (behavior = 'smooth') => {
await nextTick() // 经测试在未读消息的session页面刷新时不能到达底部需要再加一个nextTick
nextTick(() => {
setTimeout(() => {
msgListDiv.value?.scrollTo({
top: msgListDiv.value.scrollHeight,
behavior: behavior
})
newMsgTips.value.isShowBottomTips = false
})
}, 0)
}
const onReturnBottom = () => {