- 方案一:
judgeObjectEmpty(obj) {
for (let key in obj){
return false; //非空
}
return true; //空
}
- 方案二:
judgeObjectEmpty(obj) {
if(JSON.stringify(obj) == "{}"){
return true; //空
}
return false; //非空
}
- 方案三:
judgeObjectEmpty(obj) {
if(Object.keys(obj1).length == 0){
return true; //空
}
return false; //非空
}
Hold The Faith . Forever !
We can find a way .
Someday .
A path to a new world
And maybe
Maybe its just the begnning after all