Skip to content

Commit

Permalink
feat: table rtl
Browse files Browse the repository at this point in the history
  • Loading branch information
bestlyg committed Mar 21, 2024
1 parent 07e5d97 commit e6774ac
Showing 1 changed file with 98 additions and 0 deletions.
98 changes: 98 additions & 0 deletions components/Table/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,39 @@
}
}

&-border-cell:not(&-scroll-position-right) {
.@{table-cls-td}.@{table-prefix-cls}-col-fixed-right-first {
border-left-color: @table-color-bg-body-cell;
}
.@{table-cls-th}.@{table-prefix-cls}-col-fixed-right-first {
border-left-color: @table-color-bg-header-cell;
}
}

&-border-header-cell:not(&-scroll-position-right) {
.@{table-cls-th}.@{table-prefix-cls}-col-fixed-right-first {
border-left-color: @table-color-bg-header-cell;
}
}

&-border-body-cell:not(&-scroll-position-right) {
.@{table-cls-td}.@{table-prefix-cls}-col-fixed-right-first {
border-left-color: @table-color-bg-body-cell;
}
}

&-border-body-cell:not(&-border-header-cell) {
.@{table-cls-th}.@{table-prefix-cls}-col-fixed-right-first {
border-left: @table-border-width @table-border-style @table-color-bg-header-cell;
}
}

&-border-header-cell:not(&-border-body-cell) {
.@{table-cls-td}.@{table-prefix-cls}-col-fixed-right-first {
border-left: @table-border-width @table-border-style @table-color-bg-body-cell;
}
}

// stripe: true
&-stripe {
.@{table-cls-tr}:nth-child(even) .@{table-cls-td} {
Expand Down Expand Up @@ -690,6 +723,32 @@
}
}

&.@{table-prefix-cls}-border-header-cell:not(.@{table-prefix-cls}-border-body-cell) {
.@{table-cls-tr}:not(.@{table-prefix-cls}-empty-row):hover {
.@{table-cls-td}.@{table-prefix-cls}-col-fixed-right {
border-left-color: @table-color-bg-body-row_hover;

.@{table-prefix-cls}-rtl & {
border-left: unset;
border-right-color: @table-color-bg-body-row_hover;
}
}
}
}

&.@{table-prefix-cls}-border-body-cell:not(.@{table-prefix-cls}-border-header-cell) {
.@{table-cls-tr}:not(.@{table-prefix-cls}-empty-row):hover {
.@{table-cls-th}.@{table-prefix-cls}-col-fixed-right {
border-left-color: @table-color-bg-body-row_hover;

.@{table-prefix-cls}-rtl & {
border-left: unset;
border-right-color: @table-color-bg-body-row_hover;
}
}
}
}

// 展开行的hover效果
.@{table-prefix-cls}-expand-content:not(.@{table-prefix-cls}-empty-row):hover
.@{table-cls-td}:not(.@{table-prefix-cls}-col-fixed-left):not(.@{table-prefix-cls}-col-fixed-right) {
Expand Down Expand Up @@ -861,6 +920,45 @@
}
}

&-rtl&-border-cell:not(&-scroll-position-left) {
.@{table-cls-td}.@{table-prefix-cls}-col-fixed-right-first {
border-left-color: unset;
border-right-color: @table-color-bg-body-cell;
}
.@{table-cls-th}.@{table-prefix-cls}-col-fixed-right-first {
border-left-color: unset;
border-right-color: @table-color-bg-header-cell;
}
}

&-rtl&-border-header-cell:not(&-scroll-position-left) {
.@{table-cls-th}.@{table-prefix-cls}-col-fixed-right-first {
border-left-color: unset;
border-right-color: @table-color-bg-header-cell;
}
}

&-rtl&-border-body-cell:not(&-scroll-position-left) {
.@{table-cls-td}.@{table-prefix-cls}-col-fixed-right-first {
border-left-color: unset;
border-right-color: @table-color-bg-body-cell;
}
}

&-rtl&-border-body-cell:not(&-border-header-cell) {
.@{table-cls-th}.@{table-prefix-cls}-col-fixed-right-first {
border-left: unset;
border-right: @table-border-width @table-border-style @table-color-bg-header-cell;
}
}

&-rtl&-border-header-cell:not(&-border-body-cell) {
.@{table-cls-td}.@{table-prefix-cls}-col-fixed-right-first {
border-left: unset;
border-right: @table-border-width @table-border-style @table-color-bg-body-cell;
}
}

&-rtl &-cell-indent {
float: right;
}
Expand Down

0 comments on commit e6774ac

Please sign in to comment.