From 2aefdda0ff530e6883247b9aaff57efb63afb53a Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 2 Nov 2018 18:23:26 +0800 Subject: [PATCH] Build in and improve UI of nested Table in expand-children Table close #12877 --- components/table/demo/nested-table.md | 34 --------------------------- components/table/style/index.less | 6 ++++- 2 files changed, 5 insertions(+), 35 deletions(-) diff --git a/components/table/demo/nested-table.md b/components/table/demo/nested-table.md index 6d678c8968..e6378ec109 100644 --- a/components/table/demo/nested-table.md +++ b/components/table/demo/nested-table.md @@ -106,37 +106,3 @@ function NestedTable() { ReactDOM.render(, mountNode); ```` - -````css -.components-table-demo-nested .ant-table-expanded-row > td:last-child { - padding: 0 48px 0 8px; -} - -.components-table-demo-nested .ant-table-expanded-row > td:last-child .ant-table-thead th { - border-bottom: 1px solid #e9e9e9; -} - -.components-table-demo-nested .ant-table-expanded-row > td:last-child .ant-table-thead th:first-child { - padding-left: 0; -} - -.components-table-demo-nested .ant-table-expanded-row > td:last-child .ant-table-row td:first-child { - padding-left: 0; -} - -.components-table-demo-nested .ant-table-expanded-row .ant-table-row:last-child td { - border: none; -} - -.components-table-demo-nested .ant-table-expanded-row .ant-table-thead > tr > th { - background: none; -} - -.components-table-demo-nested .table-operation a:not(:last-child) { - margin-right: 24px; -} - -.components-table-demo-nested .ant-table-expanded-row:hover > td { - background: #fbfbfb; -} -```` diff --git a/components/table/style/index.less b/components/table/style/index.less index 573c9281d3..37681703d1 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -205,7 +205,7 @@ transition: all .3s, height 0s; &.@{table-prefix-cls}-row-hover, &:hover { - & > td { + &:not(.@{table-prefix-cls}-expanded-row) > td { background: @table-row-hover-bg; } } @@ -547,6 +547,10 @@ &:hover { background: @table-expanded-row-bg; } + + .@{table-prefix-cls}-wrapper { + margin: -@table-padding-vertical -@table-padding-horizontal -@table-padding-vertical - 1px; + } } .@{table-prefix-cls}-row-indent + .@{table-prefix-cls}-row-expand-icon {