Use vconsole in vue when switching routes is wrong, ask for help

introduce

into vue main.js

 import VConsole from "vconsole"
let option ={
  maxLogNumber:1000
}
var VConsole = new Vconsole(option);
The

component displays normally and can be used normally, but each time you switch routes, you will get an error
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.


if complex objects are printed somewhere, try commenting out console in the code.


after using vconsole , this problem occurs if complex objects are printed, such as the following:

  

you read the wrong message yourself. [ Property or method "toJSON" is not defined on the instance ] indicates that there must be a place where toJSON is illegally referenced when switching routes.
since you have referenced the vconsole, component in main.js and can be used properly, it means there is nothing wrong with your reference. You should go to your code to find problems

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b06d-2b5c3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b06d-2b5c3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?