大佬, 代码如下:
const Page: FC = () => {
const html = `
<h2 style="color: red;">文章标题</h2>
<main>
<article>文章内容</article>
<img src="https://storage.360buyimg.com/cjj-pub-images/taro-daily.jpeg" alt="图片" width="100%" height="auto" />
<p>这是很长一段文字</p>
</main>
`
const [htmlText, setHtmlText] = useState(html)
const handleClick = () => {
setHtmlText(html + `<footer>这里是页脚</footer>`)
}
return (
<View>
<View>我的</View>
<View>
<wxParse nodes={htmlText} />
</View>
<Button type='primary' onClick={handleClick}>改变html</Button>
</View>
)
}
export default Page
当我点击按钮改变html的时候,图片一直会显示loading状态而不显示出图片来,麻烦看下这个bug呢?开源不易 ,万分感谢!
大佬, 代码如下:
当我点击按钮改变html的时候,图片一直会显示loading状态而不显示出图片来,麻烦看下这个bug呢?开源不易 ,万分感谢!