265 Star 1.8K Fork 323

GVPuCharts / uCharts

图表uniapp使用报错提示toJSON未定义,页面显示正常,控制台报如下错误

缺陷
待办的
lic  Opened this issue

报错信息

VM485:1 [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. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

(found in pages/main/main.vue)

Attachments
1259809 junhui liu 1600151146 total 4 participants

Comments (5)

1259809 junhui liu 1600151146
junhui.liu 2020-09-11 16:12

我的也是怎么肥四

lic 2020-09-11 17:39

我把源码发给其他人运行就没事,不指导什么情况

张传峰 2020-09-15 15:11

微信开发者工具的问题,降级或者升级到最新的 Nightly Build 版本。

lic 2020-09-19 18:05

微信开发者工具的问题,降级或者升级到最新的 Nightly Build 版本。

@张传峰 嗯 谢谢 查了资料又跟周边朋友确认了下,好像就是开发者工具的问题

smile 1

临时解决方法
1、不能渲染的情况下请更新微信开发者工具
2、可以渲染但是报错 就在methods中增加一个toJSON方法如:toJSON() {},

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
JavaScript
1
https://git.oschina.net/uCharts/uCharts.git
git@git.oschina.net:uCharts/uCharts.git
uCharts
uCharts
uCharts

Search