浏览器控制台(console.log())输出[object Object]不能展开详情

console.log(“detail:”+this.props);

输出结果如下图:

 【解决方法】:

改为如下即可(原因:字符串+将调用toString()函数将对象专为字符串了,所以不能展开详情)。

console.log(this.props);

console.log("detail:", this.props);
原文地址:https://www.cnblogs.com/vickylinj/p/13392650.html