mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
多语言的小调整
This commit is contained in:
@@ -31,7 +31,7 @@ const NotionPage = ({ post, className }) => {
|
||||
// 页面首次打开时执行的勾子
|
||||
useEffect(() => {
|
||||
// 检测当前的url并自动滚动到对应目标
|
||||
autoScrollToTarget()
|
||||
autoScrollToHash()
|
||||
}, [])
|
||||
|
||||
// 页面文章发生变化时会执行的勾子
|
||||
@@ -144,9 +144,9 @@ const processGalleryImg = zoom => {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据url参数自动滚动到指定区域
|
||||
* 根据url参数自动滚动到锚位置
|
||||
*/
|
||||
const autoScrollToTarget = () => {
|
||||
const autoScrollToHash = () => {
|
||||
setTimeout(() => {
|
||||
// 跳转到指定标题
|
||||
const needToJumpToTitle = window.location.hash
|
||||
|
||||
Reference in New Issue
Block a user