//调用getRowHeightAndSetTop方法获取高亮行的index值后,通过setScrollTopValue设置滚动条位置
//data:table的datasource数据
//value:当前需要高亮的值
@action getRowHeightAndSetTop(data, value) {
data && data.forEach((item, index) => {
if (item.plateName === value) {
if (index != 0 || index != -1) {
//40是一行的高度,index*40就是滚动条要移动的位置
$(`.region_table .ant-table-body`).scrollTop(index * 30)
}
}
})
}
antd表格的滚动方法
最新推荐文章于 2024-06-18 11:58:21 发布

986

被折叠的 条评论
为什么被折叠?



