mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-24 07:26:50 +00:00
优化跳转到评论逻辑
This commit is contained in:
@@ -36,11 +36,11 @@ const WalineComponent = (props) => {
|
||||
const type = mutation.type
|
||||
if (type === 'childList') {
|
||||
const anchorElement = document.getElementById(anchor.substring(1))
|
||||
if (anchorElement) {
|
||||
if (anchorElement && anchorElement.className === 'wl-item') {
|
||||
anchorElement.scrollIntoView({ block: 'end', behavior: 'smooth' })
|
||||
setTimeout(() => {
|
||||
anchorElement.classList.add('animate__animated')
|
||||
anchorElement.classList.add('animate__bounceIn')
|
||||
anchorElement.classList.add('animate__bounceInRight')
|
||||
observer.disconnect()
|
||||
}, 300)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user