请问用什么方法可以实现微信小程序端正常使用富文本,H5端不报错!
报错内容:

可以使用环境变量判断
https://nervjs.github.io/taro/docs/env.html
同意 @AlexStacker wxParse 在 H5 下不能使用,可以使用环境变量来做兼容
运行时 https://nervjs.github.io/taro/docs/env.html
编译时 https://nervjs.github.io/taro/docs/envs.html
看了官方文档,还是不知道怎么做环境变量。
Taro cli升级到1.0.1版本
按照这个例子来
https://github.com/NervJS/taro-sample-weapp/blob/master/src/pages/wxParse/wxParse.js
问题解决了!
Hello~
您的问题楼上已经提供了解决方案,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。
如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。
Good luck and happy coding~
Most helpful comment
Taro cli升级到1.0.1版本
按照这个例子来
https://github.com/NervJS/taro-sample-weapp/blob/master/src/pages/wxParse/wxParse.js
问题解决了!