报错:
[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.
原因:
代码中有console.log(this.$route); 且开启了vconsole。
查找得知如果打印this或者window也会报错。
解决办法:
不用的时候把console.log注释掉
非要用的话,赋值给一个变量再打印。