Vue之判断对象是否为空的方法

1.

JSON.stringify(xxx)=='{}'

2.

Object.keys(xxx).length==0

验证结果如下:

猜你喜欢

转载自www.cnblogs.com/ailanlan/p/12069402.html
今日推荐