一、问题

在rn项目里引用的时候,本该显示图表的界面显示出了一堆html...

二、原因

官方没给配置好

三、解决

1./node_modules/native-echarts/src/components/Echarts/ 目录下的tpl.html 拷贝一份 
2./android/app/src/main 创建 assets文件夹
3.把第一步拷贝的文件放到第二步创建的assets文件夹下
4.进入Echarts文件(/node_modules/native-echarts/src/components/Echarts/index) 把WebView的source改为

source={{uri: 'file:///android_asset/tpl.html'}}

参考文献:https://segmentfault.com/a/1190000015758777

相关文章:

  • 2022-01-20
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2021-08-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
  • 2021-06-24
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案