可以使用nextTick+setTimeout
this.$nextTick(() => {
// 确保组件已加载后再调用toggleRowSelection
setTimeout(()=> {
if (this.$refs.tablePolicy) {
this.selectRow.forEach((row) => {
this.$refs.tablePolicy.toggleRowSelection(row,true);
})
}
}, 300);
});