table:191 Uncaught TypeError: Cannot read property 'username' of null:

表:191未捕获的类型错误:无法读取属性“username”的null:

背景:使用layui初始化表格:

前端问题——table:191 Uncaught TypeError: Cannot read property 'username' of null

前端问题——table:191 Uncaught TypeError: Cannot read property 'username' of null

 出错原因:

获取到的数据中user对象是null,再获取对象下的属性是有误的。

 

前端问题——table:191 Uncaught TypeError: Cannot read property 'username' of null

 

相关文章: