diff --git a/components/apolloTable/component/Table.less b/components/apolloTable/component/Table.less index 5923b09bced3b4c241da83abb71b06ab6ead951f..0980794df945e7c670cd2c66e1c2227546247d4a 100644 --- a/components/apolloTable/component/Table.less +++ b/components/apolloTable/component/Table.less @@ -6,14 +6,12 @@ flex-direction: row; border: 1px solid @borderColor; overflow: hidden; - &.scroll { - height: 100%; - .loading { - position: absolute; - left: 50%; - transform: translate(-50%, -50%); - z-index: 10; - } + height: 100%; + .loading { + position: absolute; + left: 50%; + transform: translate(-50%, -50%); + z-index: 10; } .leftSideContainer { box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15); diff --git a/components/apolloTable/component/Table.tsx b/components/apolloTable/component/Table.tsx index 832f92a1d0bd9c859e84533361d07e8f880bff9f..9112c0dd5cb7a7e50480ecc3077c2a8a23a65e35 100644 --- a/components/apolloTable/component/Table.tsx +++ b/components/apolloTable/component/Table.tsx @@ -449,13 +449,9 @@ export default class AirTable extends Component { {({ onScroll, scrollLeft, scrollTop }: any) => { return (
diff --git a/components/apolloTable/component/index.less b/components/apolloTable/component/index.less index 2da4616ca67c5853e609752e6162527f94e7854b..b3e196e7494d478569e90e652c6c82568d440d29 100644 --- a/components/apolloTable/component/index.less +++ b/components/apolloTable/component/index.less @@ -1,26 +1,19 @@ @import '../common'; .container { - //overflow: hidden; - //height: 100%; width: 100%; position: relative; - &.scroll { - display: flex; - flex-direction: column; - height: calc(100vh - 92px); - } + display: flex; + flex-direction: column; + height: calc(100vh - 92px); .operateContainer { } .tableContainer { position: relative; box-shadow: @boxShadow; - //min-height: 600px; - &.scroll { - flex: 1; - display: flex; - flex-direction: column; - } + flex: 1; + display: flex; + flex-direction: column; .tableOperateContainer { height: 38px; overflow: hidden; diff --git a/components/apolloTable/component/index.tsx b/components/apolloTable/component/index.tsx index d18c1d24ae4510d5e4db606edde12188cb0e1530..1191b8f7242b041fa53d951fd793c598ef773a3b 100644 --- a/components/apolloTable/component/index.tsx +++ b/components/apolloTable/component/index.tsx @@ -102,19 +102,11 @@ class AirTable extends React.Component { return (
{operateConfig && }
{tableOperateConfig && (
@@ -128,7 +120,7 @@ class AirTable extends React.Component { dataSource={dataSource} rowStyle={rowStyle} rowClassName={rowClassName} - onScroll={this.onScroll} + onScroll={onScroll ? this.onScroll : undefined} distanceToLoad={distanceToLoad} cellEditable={cellEditable} emitChangeCell={emitChangeCell}