首页 > 其他分享 >如何解决数据显示[object,object]?

如何解决数据显示[object,object]?

时间:2022-11-12 21:31:19浏览次数:40  
标签:console log err 数据 object JSON res 解决 data

如果打印的时候用了+号拼接,把+换成,逗号来进行分隔

console.log("res=" + data);
console.log("res=" , data);

如果是{{}}vue的差值语法想看内容

<view>{{data}}</view>
<view>{{JSON.stringify(data)}}</view>

也可以打印的时候用JSON.stingify()转换

then.(res => {},err => {
console.log("err: ",JSON.stringify(err));
})


标签:console,log,err,数据,object,JSON,res,解决,data
From: https://blog.51cto.com/u_15694202/5846816

相关文章