|
|
@ -21,15 +21,17 @@ const article: FC = () => { |
|
|
|
const {children} = useMemo(() => parse(articleInfo?.content || ''), [articleInfo]) |
|
|
|
const {children} = useMemo(() => parse(articleInfo?.content || ''), [articleInfo]) |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
const query = Taro.createSelectorQuery() |
|
|
|
setTimeout(() => { |
|
|
|
query.select('#childrenNode').boundingClientRect((res) => { |
|
|
|
const query = Taro.createSelectorQuery() |
|
|
|
if (!Array.isArray(res)) { |
|
|
|
query.select('#childrenNode').boundingClientRect((res) => { |
|
|
|
if (res.height !== 240) { |
|
|
|
if (!Array.isArray(res)) { |
|
|
|
console.log({childrenNode: res}) |
|
|
|
if (res.height !== 240) { |
|
|
|
setUltra(pageHeight * .45 < res.height) |
|
|
|
console.log({childrenNode: res}) |
|
|
|
|
|
|
|
setUltra(pageHeight * .45 <= res.height) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}).exec() |
|
|
|
}).exec() |
|
|
|
}, 300) |
|
|
|
}, [children]) |
|
|
|
}, [children]) |
|
|
|
|
|
|
|
|
|
|
|
Taro.useReady(() => { |
|
|
|
Taro.useReady(() => { |
|
|
|