diff --git a/components/NotionPage.js b/components/NotionPage.js index 0ac8c1c0..a3f1a085 100644 --- a/components/NotionPage.js +++ b/components/NotionPage.js @@ -27,7 +27,7 @@ const NotionPage = ({ post, className }) => { }) const zoomRef = useRef(zoom ? zoom.clone() : null) - + const IMAGE_ZOOM_IN_WIDTH = siteConfig('IMAGE_ZOOM_IN_WIDTH', 1200) // 页面首次打开时执行的勾子 useEffect(() => { // 检测当前的url并自动滚动到对应目标 @@ -64,7 +64,7 @@ const NotionPage = ({ post, className }) => { // 替换为更高清的图像 mutation?.target?.setAttribute( 'src', - compressImage(src, siteConfig('IMAGE_ZOOM_IN_WIDTH', 1200)) + compressImage(src, IMAGE_ZOOM_IN_WIDTH) ) }, 800) }