ant design vue中,表格数据更新,页面不刷新,改变数据后,数据更新了,但是视图没有更新
<a-table
:columns="columns"
:data-source="loadData"
ref="table"
:rowKey="
(record, index) => {
return record.id
}
"
:row-selection="rowSelection"
>
</a-table>
onSearch() {
this.loadData = []
this.getDataset(this.searchValue)
},
getDataset(value) {
getdataset({ name: value ? value : '' }).then((res) => {
if (res === 200) {
this.loadData = res.data.data
}
})
},