From f99b8a1792a60c4df44dbde6143c98fc25cf1425 Mon Sep 17 00:00:00 2001 From: vthinkxie Date: Fri, 21 Dec 2018 11:46:52 +0800 Subject: [PATCH] feat(table): support table border-radius define in theme --- components/style/themes/default.less | 1 + components/table/style/index.less | 18 +++++++++--------- components/table/style/size.less | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/components/style/themes/default.less b/components/style/themes/default.less index c2b2f41ea4..c7697f45e2 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -356,6 +356,7 @@ @table-expanded-row-bg: #fbfbfb; @table-padding-vertical: 16px; @table-padding-horizontal: 16px; +@table-border-radius-base : @border-radius-base; // Tag // -- diff --git a/components/table/style/index.less b/components/table/style/index.less index 1c04e2c9f9..5f5cdae391 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -27,7 +27,7 @@ width: 100%; border-collapse: collapse; text-align: left; - border-radius: @border-radius-base @border-radius-base 0 0; + border-radius: @table-border-radius-base @table-border-radius-base 0 0; } &-thead > tr > th { @@ -178,11 +178,11 @@ &-thead > tr:first-child > th { &:first-child { - border-top-left-radius: @border-radius-base; + border-top-left-radius: @table-border-radius-base; } &:last-child { - border-top-right-radius: @border-radius-base; + border-top-right-radius: @table-border-radius-base; } } @@ -215,7 +215,7 @@ &-footer { padding: @table-padding-vertical @table-padding-horizontal; background: @table-header-bg; - border-radius: 0 0 @border-radius-base @border-radius-base; + border-radius: 0 0 @table-border-radius-base @table-border-radius-base; position: relative; border-top: @border-width-base @border-style-base @border-color-split; &:before { @@ -237,7 +237,7 @@ padding: @table-padding-vertical 0; position: relative; top: 1px; - border-radius: @border-radius-base @border-radius-base 0 0; + border-radius: @table-border-radius-base @table-border-radius-base 0 0; } &.@{table-prefix-cls}-bordered &-title { @@ -248,7 +248,7 @@ &-title + &-content { position: relative; - border-radius: @border-radius-base @border-radius-base 0 0; + border-radius: @table-border-radius-base @table-border-radius-base 0 0; overflow: hidden; .@{table-prefix-cls}-bordered & { &, @@ -311,7 +311,7 @@ } &-header table { - border-radius: @border-radius-base @border-radius-base 0 0; + border-radius: @table-border-radius-base @table-border-radius-base 0 0; } &-loading { @@ -620,7 +620,7 @@ } &, table { - border-radius: @border-radius-base 0 0 0; + border-radius: @table-border-radius-base 0 0 0; } .ant-table-thead > tr > th:last-child { border-top-right-radius: 0; @@ -632,7 +632,7 @@ box-shadow: -6px 0 6px -4px @shadow-color; &, table { - border-radius: 0 @border-radius-base 0 0; + border-radius: 0 @table-border-radius-base 0 0; } // hide expand row content in right-fixed Table // https://github.com/ant-design/ant-design/issues/1898 diff --git a/components/table/style/size.less b/components/table/style/size.less index 28163a937a..7c957bbda1 100644 --- a/components/table/style/size.less +++ b/components/table/style/size.less @@ -37,7 +37,7 @@ .@{table-prefix-cls}-small { border: @border-width-base @border-style-base @border-color-split; - border-radius: @border-radius-base; + border-radius: @table-border-radius-base; > .@{table-prefix-cls}-title, > .@{table-prefix-cls}-footer {