mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-04 04:08:34 +08:00
fix(components): [table] fit set to false bottom border error (#17023)
This commit is contained in:
parent
39ac0b5a0d
commit
afab17c51a
@ -24,12 +24,12 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
// 表格底部伪 border,总是有的
|
// 表格底部伪 border,总是有的
|
||||||
&::before {
|
&::before {
|
||||||
@include extend-rule(border-pseudo);
|
@include extend-rule(border-pseudo);
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0px;
|
bottom: 0;
|
||||||
width: 100%;
|
|
||||||
height: 1px;
|
height: 1px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -125,6 +125,12 @@
|
|||||||
.#{$namespace}-table__cell.gutter {
|
.#{$namespace}-table__cell.gutter {
|
||||||
border-right-width: 1px;
|
border-right-width: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include e(inner-wrapper) {
|
||||||
|
&::before {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
thead {
|
thead {
|
||||||
@ -150,6 +156,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
z-index: getCssVar('table-index');
|
z-index: getCssVar('table-index');
|
||||||
|
|
||||||
@include when(center) {
|
@include when(center) {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@ -190,9 +197,11 @@
|
|||||||
@each $size in (large, default, small) {
|
@each $size in (large, default, small) {
|
||||||
@include m($size) {
|
@include m($size) {
|
||||||
font-size: map.get($table-font-size, $size);
|
font-size: map.get($table-font-size, $size);
|
||||||
|
|
||||||
.#{$namespace}-table__cell {
|
.#{$namespace}-table__cell {
|
||||||
padding: map.get($table-padding, $size);
|
padding: map.get($table-padding, $size);
|
||||||
}
|
}
|
||||||
|
|
||||||
.cell {
|
.cell {
|
||||||
padding: map.get($table-cell-padding, $size);
|
padding: map.get($table-cell-padding, $size);
|
||||||
}
|
}
|
||||||
@ -314,6 +323,7 @@
|
|||||||
|
|
||||||
@include e((header-wrapper, body-wrapper, footer-wrapper)) {
|
@include e((header-wrapper, body-wrapper, footer-wrapper)) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
tr {
|
tr {
|
||||||
td,
|
td,
|
||||||
th {
|
th {
|
||||||
@ -322,6 +332,7 @@
|
|||||||
position: sticky !important;
|
position: sticky !important;
|
||||||
background: inherit;
|
background: inherit;
|
||||||
z-index: calc(getCssVar('table-index') + 1);
|
z-index: calc(getCssVar('table-index') + 1);
|
||||||
|
|
||||||
&.is-last-column,
|
&.is-last-column,
|
||||||
&.is-first-column {
|
&.is-first-column {
|
||||||
&::before {
|
&::before {
|
||||||
@ -337,11 +348,13 @@
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-first-column {
|
&.is-first-column {
|
||||||
&::before {
|
&::before {
|
||||||
left: -10px;
|
left: -10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-last-column {
|
&.is-last-column {
|
||||||
&::before {
|
&::before {
|
||||||
right: -10px;
|
right: -10px;
|
||||||
@ -349,6 +362,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.#{$namespace}-table__fixed-right-patch {
|
&.#{$namespace}-table__fixed-right-patch {
|
||||||
position: sticky !important;
|
position: sticky !important;
|
||||||
z-index: calc(getCssVar('table-index') + 1);
|
z-index: calc(getCssVar('table-index') + 1);
|
||||||
@ -361,6 +375,7 @@
|
|||||||
|
|
||||||
@include e(header-wrapper) {
|
@include e(header-wrapper) {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
||||||
tr {
|
tr {
|
||||||
th {
|
th {
|
||||||
&.#{$namespace}-table-fixed-column--left,
|
&.#{$namespace}-table-fixed-column--left,
|
||||||
@ -402,6 +417,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
height: 23px;
|
height: 23px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.#{$namespace}-checkbox {
|
.#{$namespace}-checkbox {
|
||||||
height: unset;
|
height: unset;
|
||||||
}
|
}
|
||||||
@ -414,6 +430,7 @@
|
|||||||
box-shadow: getCssVar('table-fixed-right-column');
|
box-shadow: getCssVar('table-fixed-right-column');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.#{$namespace}-table--border {
|
&.#{$namespace}-table--border {
|
||||||
.#{$namespace}-table-fixed-column--left {
|
.#{$namespace}-table-fixed-column--left {
|
||||||
&.is-last-column {
|
&.is-last-column {
|
||||||
@ -423,6 +440,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
th.#{$namespace}-table-fixed-column--left {
|
th.#{$namespace}-table-fixed-column--left {
|
||||||
background-color: getCssVar('table-header-bg-color');
|
background-color: getCssVar('table-header-bg-color');
|
||||||
}
|
}
|
||||||
@ -434,9 +452,11 @@
|
|||||||
box-shadow: getCssVar('table-fixed-left-column');
|
box-shadow: getCssVar('table-fixed-left-column');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.#{$namespace}-table-fixed-column--left.is-last-column.#{$namespace}-table__cell {
|
.#{$namespace}-table-fixed-column--left.is-last-column.#{$namespace}-table__cell {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
th.#{$namespace}-table-fixed-column--right {
|
th.#{$namespace}-table-fixed-column--right {
|
||||||
background-color: getCssVar('table-header-bg-color');
|
background-color: getCssVar('table-header-bg-color');
|
||||||
}
|
}
|
||||||
@ -446,11 +466,13 @@
|
|||||||
.#{$namespace}-table-fixed-column--left.is-last-column.#{$namespace}-table__cell {
|
.#{$namespace}-table-fixed-column--left.is-last-column.#{$namespace}-table__cell {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.#{$namespace}-table-fixed-column--right.is-first-column {
|
.#{$namespace}-table-fixed-column--right.is-first-column {
|
||||||
&::before {
|
&::before {
|
||||||
box-shadow: getCssVar('table-fixed-right-column');
|
box-shadow: getCssVar('table-fixed-right-column');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.#{$namespace}-table-fixed-column--left.is-last-column {
|
.#{$namespace}-table-fixed-column--left.is-last-column {
|
||||||
&::before {
|
&::before {
|
||||||
box-shadow: getCssVar('table-fixed-left-column');
|
box-shadow: getCssVar('table-fixed-left-column');
|
||||||
@ -479,6 +501,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
.#{$namespace}-scrollbar__bar {
|
.#{$namespace}-scrollbar__bar {
|
||||||
z-index: calc(getCssVar('table-index') + 2);
|
z-index: calc(getCssVar('table-index') + 2);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user