![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/7e3e984ded0996f0a9f90cdf532c7f36.png)
<a-table
:rowKey="(record, index) => index"
:bordered="true"
:rowSelection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:columns="columns1"
:data-source="data1"
:pagination="{
pageSize: 10,
total: total,
onChange: (page, pageSize) => this.onChange(page, pageSize), //点击页码事件
showTotal: (total) => `共 ${total} 条`,
}"
>
<a slot="jobFairName" slot-scope="text">{{ text }}</a>
</a-table>
data(){
reture {
selectedRowKeys: [],
}}
methods: {
onSelectChange: function (selectedRowKeys, selectedRows) {
this.selectedRowKeys = selectedRowKeys;
this.selectedRows = selectedRows;
},
reset(){
this.selectedRowKeys = [],
}
}