diff --git a/src/pages/preview/brand/article/article.tsx b/src/pages/preview/brand/article/article.tsx index ff00e4f..0c4e87c 100644 --- a/src/pages/preview/brand/article/article.tsx +++ b/src/pages/preview/brand/article/article.tsx @@ -21,15 +21,17 @@ const article: FC = () => { const {children} = useMemo(() => parse(articleInfo?.content || ''), [articleInfo]) useEffect(() => { - const query = Taro.createSelectorQuery() - query.select('#childrenNode').boundingClientRect((res) => { - if (!Array.isArray(res)) { - if (res.height !== 240) { - console.log({childrenNode: res}) - setUltra(pageHeight * .45 < res.height) + setTimeout(() => { + const query = Taro.createSelectorQuery() + query.select('#childrenNode').boundingClientRect((res) => { + if (!Array.isArray(res)) { + if (res.height !== 240) { + console.log({childrenNode: res}) + setUltra(pageHeight * .45 <= res.height) + } } - } - }).exec() + }).exec() + }, 300) }, [children]) Taro.useReady(() => {