Skip to content

Commit

Permalink
fix(Table): 修复分割线样式问题
Browse files Browse the repository at this point in the history
  • Loading branch information
wanchun committed Jul 17, 2023
1 parent 21bd065 commit b2f27bd
Showing 1 changed file with 36 additions and 25 deletions.
61 changes: 36 additions & 25 deletions components/table/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

@table-prefix: ~'@{cls-prefix}-table';
@table-border-color: var(--f-border-color-split);
@table-border: var(--f-border-width-base) var(--f-border-style-base) @table-border-color;
@table-border: var(--f-border-width-base) var(--f-border-style-base)
@table-border-color;

.@{table-prefix} {
position: relative;
Expand Down Expand Up @@ -36,7 +37,8 @@
&.is-scrolling-x-left,
&.is-scrolling-x-middle {
.@{table-prefix}-fixed-right.is-first {
box-shadow: -1px 2px var(--f-shadow-radius-sm) var(--f-shadow-color-sm);
box-shadow: -1px 2px var(--f-shadow-radius-sm)
var(--f-shadow-color-sm);
}
}

Expand Down Expand Up @@ -71,7 +73,7 @@
transform: rotate(0);
}

&+.@{table-prefix}-tr {
& + .@{table-prefix}-tr {
.@{table-prefix}-td {
background-color: var(--f-component-bg-color);
}
Expand Down Expand Up @@ -126,38 +128,47 @@
}

&.is-horizontal-line {
.@{table-prefix}-td, .@{table-prefix}-th {
border-bottom: @table-border;
}
.@{table-prefix}-row {
&.is-opened {
.@{table-prefix}-td {
border-bottom: none;
.@{table-prefix}-header,
.@{table-prefix}-body {
.@{table-prefix}-td,
.@{table-prefix}-th {
border-bottom: @table-border;
}
.@{table-prefix}-row {
&.is-opened {
.@{table-prefix}-td {
border-bottom: none;
}
}
}
}
&.is-bordered {
tbody .@{table-prefix}-row {
&:last-child {
.@{table-prefix}-td {
border-bottom: none;
.@{table-prefix}-header,
.@{table-prefix}-body {
tbody .@{table-prefix}-row {
&:last-child {
.@{table-prefix}-td {
border-bottom: none;
}
}
}
}
}
}

&.is-vertical-line {
.@{table-prefix}-th,
.@{table-prefix}-td {
border-right: @table-border;
}

.@{table-prefix}-row {
.@{table-prefix}-td,
.@{table-prefix}-th {
&:last-child {
border-right: none;
.@{table-prefix}-header,
.@{table-prefix}-body {
.@{table-prefix}-th,
.@{table-prefix}-td {
border-right: @table-border;
}
.@{table-prefix}-row {
.@{table-prefix}-td,
.@{table-prefix}-th {
&:last-child {
border-right: none;
}
}
}
}
Expand Down Expand Up @@ -262,4 +273,4 @@
}
}
}
}
}

0 comments on commit b2f27bd

Please sign in to comment.