新增 cf-table 组件,包含以下功能: - 支持数据展示和列配置 - 提供表头和表体插槽功能 - 支持最大高度设置 - 实现粘性表头效果 - 提供空数据展示 - 包含完整的组件结构和样式
72 lines
936 B
Plaintext
72 lines
936 B
Plaintext
.table-box {
|
|
border-left: 1px solid #ddd;
|
|
border-right: 1px solid #ddd;
|
|
border-bottom: 1px solid #ddd;
|
|
overflow: auto;
|
|
}
|
|
|
|
.table {
|
|
display: table;
|
|
table-layout: fixed;
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
}
|
|
|
|
.table-column-group {
|
|
display: table-column-group;
|
|
}
|
|
|
|
.col {
|
|
display: table-column;
|
|
}
|
|
|
|
.thead {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 1;
|
|
background: #f5f5f5;
|
|
}
|
|
|
|
.tr {
|
|
display: table-row;
|
|
}
|
|
|
|
.th {
|
|
background-color: #f5f5f5;
|
|
}
|
|
|
|
.th,
|
|
.td {
|
|
display: table-cell;
|
|
border-bottom: 1px solid #ddd;
|
|
padding: 4px;
|
|
border-right: 1px solid #ddd;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.tr .th {
|
|
border-top: 1px solid #ddd;
|
|
}
|
|
|
|
.tr .th:last-child,
|
|
.tr .td:last-child {
|
|
border-right: none;
|
|
}
|
|
|
|
.table-sticky {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 1;
|
|
}
|
|
|
|
.table-content .tr:last-child .td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.empty-data {
|
|
text-align: center;
|
|
margin-top: -33px;
|
|
line-height: 30px;
|
|
color: #999;
|
|
}
|