let obj = {}; if(JSON.stringify(obj) === "{}"){ console.log("空对象") }else{ console.log(obj) } console.log(Object.keys(obj)) if(Object.keys(obj) == []){ console.log(obj) }else{ console.log("空对象"); }