vue main.js 中引入
import VConsole from 'vconsole'
let option ={
maxLogNumber:1000
}
var VConsole = new Vconsole(option);
组件正常显示并且可以正常使用但是每次切换路由都会报错main.js [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
。