<a-table
class="table"
:columns="columns"
:data-source="tableData"
:scroll="{ x: '13.5rem', y: tableSize === 'normal' ? '2.3rem' : null }"
:pagination="{
pageSize: tableSize === 'normal' ? 10 : show ? 16 : 18,
current: current,
onChange: onPageChange,
}"
:rowKey="(record, index) => index"
:customRow="customRow" //
:rowClassName="rowClassName" //
>
</a-table>
methods: {
customRow(record) {
return {
on: {
click: () => {
this.updateState({ tableCurrRowId: record.id });
this.OLPoints.locateFeature(record);
},
},
};
},
rowClassName(record) {
return record.id === this.tableCurrRowId ? 'customBlue' : null; // 指定行,增加customBlue的class效果
},
}
<style scoped lang="scss">
/deep/.ant-table-tbody .customBlue {
background: #d8e6fa !important;
}
</style>
© 版权声明
文章版权归作者所有,未经允许请勿转载。
相关文章
暂无评论...