想固定表头, 加上下面的样式
// 修复 uni-table 无法固定表头的问题
.uni-table > .uni-table-tr:first-child {
.uni-table-th,
.checkbox {
position: sticky;
top: 0;
z-index: 10;
display: table-cell;
box-sizing: border-box;
background-color: #fff;
}
}
想固定表头, 加上下面的样式
// 修复 uni-table 无法固定表头的问题
.uni-table > .uni-table-tr:first-child {
.uni-table-th,
.checkbox {
position: sticky;
top: 0;
z-index: 10;
display: table-cell;
box-sizing: border-box;
background-color: #fff;
}
}
3 个回复
徐州老铁 - 开发者
不起作用
5***@qq.com
我用两个uni-table, 定位使两个table重合,一个只显示表头
1***@qq.com
没效果