亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

vue中使用vconsole 當切換路由時報錯,求幫忙

vue中使用vconsole 當切換路由時報錯,求幫忙

Helenr 2018-09-02 13:07:35
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.
查看完整描述

2 回答

?
ITMISS

TA貢獻1871條經驗 獲得超8個贊

在main.js中使用 就ok
import Vconsole from ‘vconsole‘
let vConsole = new Vconsole()

查看完整回答
反對 回復 2018-09-02
?
千巷貓影

TA貢獻1829條經驗 獲得超7個贊

是不是哪里打印了復雜的對象,試試注釋掉代碼里的console。

查看完整回答
反對 回復 2018-09-02
  • 2 回答
  • 0 關注
  • 2480 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號