gpt4 book ai didi

javascript - 在 React Native Webview 中使用本 map 片

转载 作者:行者123 更新时间:2023-12-05 07:50:57 24 4
gpt4 key购买 nike

我想知道如何在 React Native 中使用图像 <WebView> .在文档中有一些有前途的线索,例如 source支柱。

我希望能够做的事情的一个例子:

var MyComponent = React.createClass({
render() {
var html = '<html>
<body>
<h1>Hi</h1>
</body>
<script>
var image = injectedImage
</script>
</html>'

return (
<WebView
html={html}
source={{uri: './images/button.png'}}
</WebView>
)
}
})

最佳答案

我有同样的问题,并且还将在服务器上托管图像并使用 url 引用它作为解决方法。

关于javascript - 在 React Native Webview 中使用本 map 片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35636368/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com