From cd6e09844579b0480fbef17255aa90d82dc45459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=AC=E6=B5=B7?= <445436867@qq.com> Date: Mon, 17 Jul 2023 21:26:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(Table):=20=E4=BF=AE=E5=A4=8D=E5=88=86?= =?UTF-8?q?=E5=89=B2=E7=BA=BF=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98=20(#346)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/table/style/index.less | 61 ++++++++++++++++++------------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/components/table/style/index.less b/components/table/style/index.less index 5c3454fc..eb1b7c15 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -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; @@ -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); } } @@ -71,7 +73,7 @@ transform: rotate(0); } - &+.@{table-prefix}-tr { + & + .@{table-prefix}-tr { .@{table-prefix}-td { background-color: var(--f-component-bg-color); } @@ -126,21 +128,28 @@ } &.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; + } } } } @@ -148,16 +157,18 @@ } &.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; + } } } } @@ -262,4 +273,4 @@ } } } -} \ No newline at end of file +}