【问题标题】:React Native Webview not working when loading html / script加载 html / 脚本时 React Native Webview 不起作用
【发布时间】:2021-12-17 07:37:25
【问题描述】:

我正在尝试使用“react-native-webview”库加载小部件。我相信我这样做是正确的,但小部件没有加载,我试图在 webview 本身上设置断点,它看起来像它的构建,有什么建议吗?

<WebView
          source={{
            html: `<!DOCTYPE html>
            <html>

              <body>
              <script src="https://widgets.coingecko.com/coingecko-coin-price-marquee-widget.js"></script>
              <coingecko-coin-price-marquee-widget  coin-ids="bitcoin,ethereum,eos,ripple,litecoin" currency="usd" background-color="#ffffff" locale="en">
              </coingecko-coin-price-marquee-widget>
              </body>
            </html>`,
          }}
        />

【问题讨论】:

    标签: javascript html react-native


    【解决方案1】:

    解决方案 - 我需要给 react-native-webview 一个宽度。

    【讨论】:

      猜你喜欢
      • 2017-04-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-06
      • 1970-01-01
      • 2017-09-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多