vue中用console.log打印对象时,直接打印对象显示如user:[object Object],使用console.log(JSON.stringify(user)),能把对象中的各个属性以json格式输出,方便调试。
vue中用console.log打印对象时,直接打印对象显示如user:[object Object],使用console.log(JSON.stringify(user)),能把对象中的各个属性以json格式输出,方便调试。
本文标题:vue中用console.log打印对象的各个属性值
本文链接:https://www.haomeiwen.com/subject/fphlgctx.html
网友评论