ant design pro table 表格树形数据 children 为空数组时的显示问题(Ant Design Pro table display problems when the tree data children of the table is an empty array)

如果展开的数据是点击后异步加载的,即使  为  也需要出现  按钮,否则就无法操作了。保持原来的逻辑才能满足这个需求:

children
[]
[+]
  • children 为 [] 时有 [+]
  • children 不存在或是 null、false 时,不展示 [+]。
————————

If the expanded data is loaded asynchronously after clicking, even if    by    Also need to appear    Button, or it won’t work. This need can be met by maintaining the original logic:

children
[]
[+]
  • Children are   []   happen now and then   [+]
  • children 不存在或是 null、false 时,不展示 [+]。