在渲染之前先判断数据是否存在,存在即渲染就ok,问题得以解决。 注意v-if判断即可 <a-tablev-if="targetCostTableData && targetCostTableData.length":defaultExpandAllRow……