Commit 95873264 authored by zhangwenshuai's avatar zhangwenshuai

增加可固定参数

parent 66a718df
...@@ -433,7 +433,7 @@ export default class AirTable extends Component<TableProps, TableState> { ...@@ -433,7 +433,7 @@ export default class AirTable extends Component<TableProps, TableState> {
}; };
render() { render() {
const { loading, noDataPlaceholder, loadComp } = this.props; const { loading, noDataPlaceholder, loadComp, canFixed } = this.props;
const { columns, dataSource, tableWidth = 0, tableHeight = 0 } = this.state; const { columns, dataSource, tableWidth = 0, tableHeight = 0 } = this.state;
const { overscanColumnCount, overscanRowCount, rowHeight, headerHeight, columnWidth } = this.config; const { overscanColumnCount, overscanRowCount, rowHeight, headerHeight, columnWidth } = this.config;
const scrollbarWidth = scrollbarSize() || 0; const scrollbarWidth = scrollbarSize() || 0;
...@@ -559,6 +559,7 @@ export default class AirTable extends Component<TableProps, TableState> { ...@@ -559,6 +559,7 @@ export default class AirTable extends Component<TableProps, TableState> {
} }
</div> </div>
)} )}
{canFixed && (
<LeftDragFixed <LeftDragFixed
initLeft={leftWidth} initLeft={leftWidth}
initTop={headerHeight} initTop={headerHeight}
...@@ -569,6 +570,7 @@ export default class AirTable extends Component<TableProps, TableState> { ...@@ -569,6 +570,7 @@ export default class AirTable extends Component<TableProps, TableState> {
onResizeStart={this.onResizeStartLeftDragFixed} onResizeStart={this.onResizeStartLeftDragFixed}
onResizeStop={this.onResizeStopLeftDragFixed} onResizeStop={this.onResizeStopLeftDragFixed}
/> />
)}
<div className={styles.centerContainer}> <div className={styles.centerContainer}>
<AutoSizer onResize={this.onResize}> <AutoSizer onResize={this.onResize}>
{({ width, height }: any) => { {({ width, height }: any) => {
......
...@@ -82,6 +82,7 @@ class AirTable extends React.Component<CommonProps, CommonState> { ...@@ -82,6 +82,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
onScroll, onScroll,
loadComp, loadComp,
showCondition, showCondition,
canFixed,
} = this.props; } = this.props;
const sortConfig = const sortConfig =
operateConfig && operateConfig &&
...@@ -135,6 +136,7 @@ class AirTable extends React.Component<CommonProps, CommonState> { ...@@ -135,6 +136,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
noDataPlaceholder={noDataPlaceholder} noDataPlaceholder={noDataPlaceholder}
contentMenu={contentMenu} contentMenu={contentMenu}
loadComp={loadComp} loadComp={loadComp}
canFixed={canFixed}
/> />
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment