From bd9fba9f456e3be7a9e367f62a0e35abdc1bfe1f Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 28 Nov 2017 14:34:13 +0800 Subject: [PATCH] Better responsive style of Table --- components/table/style/index.less | 2 ++ components/table/style/responsive.less | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 components/table/style/responsive.less diff --git a/components/table/style/index.less b/components/table/style/index.less index 82c304a9e6..489e69fcfd 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -691,3 +691,5 @@ box-shadow: none; } } + +@import './responsive'; diff --git a/components/table/style/responsive.less b/components/table/style/responsive.less new file mode 100644 index 0000000000..ebd7a6ad90 --- /dev/null +++ b/components/table/style/responsive.less @@ -0,0 +1,16 @@ +@media (max-width: @screen-xs) { + .@{table-prefix-cls} { + &-thead > tr, + &-tbody > tr { + > th, + > td { + display: block; + width: auto !important; + border: none; + &:last-child { + border-bottom: 1px solid @border-color-split; + } + } + } + } +}