diff --git a/packages/theme-chalk/src/table.scss b/packages/theme-chalk/src/table.scss index 357d618537..a1a9cbe37e 100755 --- a/packages/theme-chalk/src/table.scss +++ b/packages/theme-chalk/src/table.scss @@ -24,12 +24,12 @@ display: flex; flex-direction: column; height: 100%; + // 表格底部伪 border,总是有的 &::before { @include extend-rule(border-pseudo); left: 0; - bottom: 0px; - width: 100%; + bottom: 0; height: 1px; } } @@ -125,6 +125,12 @@ .#{$namespace}-table__cell.gutter { border-right-width: 1px; } + + @include e(inner-wrapper) { + &::before { + width: 100%; + } + } } thead { @@ -150,6 +156,7 @@ position: relative; text-align: left; z-index: getCssVar('table-index'); + @include when(center) { text-align: center; } @@ -190,9 +197,11 @@ @each $size in (large, default, small) { @include m($size) { font-size: map.get($table-font-size, $size); + .#{$namespace}-table__cell { padding: map.get($table-padding, $size); } + .cell { padding: map.get($table-cell-padding, $size); } @@ -314,6 +323,7 @@ @include e((header-wrapper, body-wrapper, footer-wrapper)) { width: 100%; + tr { td, th { @@ -322,6 +332,7 @@ position: sticky !important; background: inherit; z-index: calc(getCssVar('table-index') + 1); + &.is-last-column, &.is-first-column { &::before { @@ -337,11 +348,13 @@ pointer-events: none; } } + &.is-first-column { &::before { left: -10px; } } + &.is-last-column { &::before { right: -10px; @@ -349,6 +362,7 @@ } } } + &.#{$namespace}-table__fixed-right-patch { position: sticky !important; z-index: calc(getCssVar('table-index') + 1); @@ -361,6 +375,7 @@ @include e(header-wrapper) { flex-shrink: 0; + tr { th { &.#{$namespace}-table-fixed-column--left, @@ -402,6 +417,7 @@ align-items: center; height: 23px; } + .#{$namespace}-checkbox { height: unset; } @@ -414,6 +430,7 @@ box-shadow: getCssVar('table-fixed-right-column'); } } + &.#{$namespace}-table--border { .#{$namespace}-table-fixed-column--left { &.is-last-column { @@ -423,6 +440,7 @@ } } } + th.#{$namespace}-table-fixed-column--left { background-color: getCssVar('table-header-bg-color'); } @@ -434,9 +452,11 @@ box-shadow: getCssVar('table-fixed-left-column'); } } + .#{$namespace}-table-fixed-column--left.is-last-column.#{$namespace}-table__cell { border-right: none; } + th.#{$namespace}-table-fixed-column--right { background-color: getCssVar('table-header-bg-color'); } @@ -446,11 +466,13 @@ .#{$namespace}-table-fixed-column--left.is-last-column.#{$namespace}-table__cell { border-right: none; } + .#{$namespace}-table-fixed-column--right.is-first-column { &::before { box-shadow: getCssVar('table-fixed-right-column'); } } + .#{$namespace}-table-fixed-column--left.is-last-column { &::before { box-shadow: getCssVar('table-fixed-left-column'); @@ -479,6 +501,7 @@ overflow: hidden; position: relative; flex: 1; + .#{$namespace}-scrollbar__bar { z-index: calc(getCssVar('table-index') + 2); }