Vue项目中出现这个错误,父组件给子组件传值
与使用了Ant Design中的table组件有关
使用rowSelection时,给selectedRowKeys传值,显示已经勾选的数据,如果传的值为空将出现此问题。
解决方法是利用if对传的值进行判断。
if(this.form.partyBaseIds){
this.rowPartySelection.selectedRowKeys = this.form.partyBaseIds
}
Vue项目中出现这个错误,父组件给子组件传值
与使用了Ant Design中的table组件有关
使用rowSelection时,给selectedRowKeys传值,显示已经勾选的数据,如果传的值为空将出现此问题。
解决方法是利用if对传的值进行判断。
if(this.form.partyBaseIds){
this.rowPartySelection.selectedRowKeys = this.form.partyBaseIds
}