admin管理员组

文章数量:1568433

[Vue warn]: Error in nextTick: "TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Vue'
    |     property '$options' -> object with constructor 'Object'
    |     property 'router' -> object with constructor 'VueRouter'
    --- property 'app' closes the circle"

内容翻译 

一般报错TypeError: Converting circular structure to JSON是因为存在循环引用,并且使用JSON.stringify方法去转化成字符串

案例

// 问题代码
const x = { a: 8 };
const b = { x };
b.y = b; // 循环引用
JSON.stringify(b); // 触发报错

// 解决问题代码
const x = { a:

本文标签: TypeErrornextTickErrorconvertingjson