table加上 :row-class-name=“tableAddClass” 自定义行元素的class名
在函数中设置最后一行给class名
//js
// 改变行颜色
const tableAddClass = ({ row, rowIndex }) => {
if (rowIndex === state.tableData.length - 1) {
return 'tr-blue'
}
return ''
}
在style中定义class颜色
:deep(.tr-blue) {
color: #409eff;
bottom: 0;
table-layout: fixed;
position: sticky;
z-index: 3;
}
注意:要加z-index,不然被其他行覆盖起不到吸底效果
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- hzar.cn 版权所有 赣ICP备2024042791号-5
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务