摘要: 当对象为null时 if (Obj.a) { } 会报错,无法执行之后的函数 解决: if (Obj && Obj.a) { } 先判断Obj,在判断对象中的变量 阅读全文
posted @ 2021-09-22 15:16 花毛一体 阅读(391) 评论(0) 推荐(0)