From c20a36dc94d9e9efd6e3123301450f69c1769f0a Mon Sep 17 00:00:00 2001 From: zhangwenshuai Date: Thu, 25 Jun 2020 00:25:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A1=A8=E6=A0=BC=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=A0=8F=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/apolloTable/component/index.less | 8 ++- components/apolloTable/component/index.tsx | 69 +++++++++++-------- .../apolloTable/component/interface.tsx | 1 + 3 files changed, 49 insertions(+), 29 deletions(-) diff --git a/components/apolloTable/component/index.less b/components/apolloTable/component/index.less index 161ec31..c7cc7a1 100644 --- a/components/apolloTable/component/index.less +++ b/components/apolloTable/component/index.less @@ -18,10 +18,16 @@ //min-height: 600px; &.scroll { flex: 1; + display: flex; + flex-direction: column; + } + .tableOperateContainer { + height: 58px; + overflow: hidden; } .tableC { - padding: 0 16px; + flex: 1; } .rowClassName { border: 1px solid black; diff --git a/components/apolloTable/component/index.tsx b/components/apolloTable/component/index.tsx index 559db75..5ee0341 100644 --- a/components/apolloTable/component/index.tsx +++ b/components/apolloTable/component/index.tsx @@ -57,6 +57,7 @@ class AirTable extends React.Component { render() { const { columns, dataSource } = this.state; const { + className, rowStyle, rowClassName, distanceToLoad, @@ -89,38 +90,50 @@ class AirTable extends React.Component { }); return ( -
+
{operateConfig && }
- {tableOperateConfig && } - + {tableOperateConfig && ( +
+ +
+ )} +
+
+ {paginationConfig && } diff --git a/components/apolloTable/component/interface.tsx b/components/apolloTable/component/interface.tsx index 1b10d4a..467c195 100644 --- a/components/apolloTable/component/interface.tsx +++ b/components/apolloTable/component/interface.tsx @@ -86,6 +86,7 @@ export interface CommonProps extends TableProps { tableOperateConfig?: OperateConfigProps; paginationConfig?: any; locale?: any; + className?: string; } export interface CommonState extends TableState {} -- 2.21.0