如圖,剛更新微信開發者工具,結果原來的項目就報錯:
[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
以后可不敢輕易升級了