uniapp使用u-charts时,小程序端控制台报错[Vue warn]: Property or method "toJSON" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.
解决方法:
在methods中加入toJSON(){ }
这时会出现图表不显示,控制台输出
修改 toJSON(){ } 为 toJSON(){ return this } 即可。