feat: custom table with row children

This commit is contained in:
jialin
2024-06-12 09:26:17 +08:00
parent f491b5dfb1
commit 405d95c81f
19 changed files with 611 additions and 12 deletions
@@ -0,0 +1,17 @@
.cell {
padding: var(--ant-table-cell-padding-block)
var(--ant-table-cell-padding-inline);
display: flex;
align-items: center;
justify-content: flex-start;
height: 70px;
&-left {
justify-content: flex-start;
}
&-right {
justify-content: flex-end;
}
&-center {
justify-content: center;
}
}
@@ -0,0 +1,23 @@
.table-header {
display: flex;
align-items: center;
justify-content: flex-start;
padding-inline: var(--ant-table-cell-padding-inline);
border-right: 1px solid var(--ant-table-header-split-color);
&-last {
border-right: none;
}
&-cell {
font-weight: 600;
}
&-left {
justify-content: flex-start;
}
&-right {
justify-content: flex-end;
}
&-center {
justify-content: center;
}
}
@@ -0,0 +1,64 @@
.seal-table-container {
display: flex;
flex-direction: column;
width: 100%;
.header-row-wrapper {
height: 40px;
margin-bottom: 10px;
display: flex;
justify-content: flex-start;
align-items: center;
.header-row-prefix-wrapper {
padding-left: var(--ant-table-cell-padding-inline);
}
.row {
flex: 1;
}
}
.row-box {
margin-bottom: 20px;
border-radius: var(--ant-table-header-border-radius);
overflow: hidden;
}
.expanded-row {
background-color: var(--color-white-1);
padding: 16px 20px;
border: 1px solid var(--color-fill-1);
border-top: 0;
border-radius: 0 0 var(--ant-table-header-border-radius)
var(--ant-table-header-border-radius);
}
.row-wrapper {
display: flex;
justify-content: flex-start;
align-items: center;
background-color: var(--color-fill-1);
transition: all 0.2s ease;
&:hover {
background-color: var(--ant-table-row-hover-bg);
transition: all 0.2s ease;
}
&-selected {
background-color: var(--ant-table-row-selected-bg);
transition: all 0.2s ease;
&:hover {
background-color: var(--ant-table-row-selected-hover-bg);
transition: all 0.2s ease;
}
}
.row-prefix-wrapper {
padding-left: var(--ant-table-cell-padding-inline);
}
}
.seal-table-row {
flex: 1;
}
.spin {
text-align: center;
display: flex;
justify-content: center;
align-items: center;
margin-top: 20px;
min-height: 100px;
}
}