Uniapp/小程序 Property or method "toJSON" is not defined

如图,刚更新微信开发者工具,结果原来的项目就报错:

[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. 

大致意思是当前的vue实例没有toJSON这个属性/方法,这好办啊,我灵机一动,直接手动在methods里面加了这个方法,如下:

...
methods: {
      ...
      toJSON () {},
      ...
}
...

果然,控制台的错误没有了,但是canvas画不出来了,坑爹啊!!!网上尝试了各种方式都不行,最后下载了一个老版本的微信开发者工具,居然好了!!!

下的是这个版本:https://developers.weixin.qq.com/community/develop/doc/0000c4f9440410caa11ab51cd5b801

以后可不敢轻易升级了

相关文章:

  • 2021-08-21
  • 2021-05-06
  • 2021-08-19
  • 2021-07-02
  • 2021-12-03
  • 2021-07-22
  • 2022-12-23
  • 2021-09-14
猜你喜欢
  • 2021-11-18
  • 2021-09-21
  • 2021-10-25
  • 2022-01-23
  • 2021-04-14
  • 2022-12-23
  • 2021-09-07
相关资源
相似解决方案