diff --git a/components/LazyImage.js b/components/LazyImage.js index a5437883406..acfb89c19ee 100644 --- a/components/LazyImage.js +++ b/components/LazyImage.js @@ -41,6 +41,10 @@ export default function LazyImage({ if (typeof onLoad === 'function') { onLoad() // 触发传递的onLoad回调函数 } + // 移除占位符类名 + if (imageRef.current) { + imageRef.current.classList.remove('lazy-image-placeholder') + } } /** * 图片加载失败回调 @@ -53,6 +57,7 @@ export default function LazyImage({ } else { imageRef.current.src = defaultPlaceholderSrc } + imageRef.current.classList.remove('lazy-image-placeholder') } } @@ -141,15 +146,14 @@ export default function LazyImage({ diff --git a/themes/magzine/components/PostItemCardSimple.js b/themes/magzine/components/PostItemCardSimple.js index 1a8b47f81fb..924876e62a5 100644 --- a/themes/magzine/components/PostItemCardSimple.js +++ b/themes/magzine/components/PostItemCardSimple.js @@ -8,7 +8,7 @@ import CategoryItem from './CategoryItem' * @param {*} param0 * @returns */ -const PostItemCardSimple = ({ post, showSummary }) => { +const PostItemCardSimple = ({ post }) => { return (