Commit 95873264 authored by zhangwenshuai's avatar zhangwenshuai

增加可固定参数

parent 66a718df
......@@ -433,7 +433,7 @@ export default class AirTable extends Component<TableProps, TableState> {
};
render() {
const { loading, noDataPlaceholder, loadComp } = this.props;
const { loading, noDataPlaceholder, loadComp, canFixed } = this.props;
const { columns, dataSource, tableWidth = 0, tableHeight = 0 } = this.state;
const { overscanColumnCount, overscanRowCount, rowHeight, headerHeight, columnWidth } = this.config;
const scrollbarWidth = scrollbarSize() || 0;
......@@ -559,16 +559,18 @@ export default class AirTable extends Component<TableProps, TableState> {
}
</div>
)}
<LeftDragFixed
initLeft={leftWidth}
initTop={headerHeight}
tableWidth={tableWidth}
showColumns={showColumns}
columnWidth={columnWidth}
columns={columns}
onResizeStart={this.onResizeStartLeftDragFixed}
onResizeStop={this.onResizeStopLeftDragFixed}
/>
{canFixed && (
<LeftDragFixed
initLeft={leftWidth}
initTop={headerHeight}
tableWidth={tableWidth}
showColumns={showColumns}
columnWidth={columnWidth}
columns={columns}
onResizeStart={this.onResizeStartLeftDragFixed}
onResizeStop={this.onResizeStopLeftDragFixed}
/>
)}
<div className={styles.centerContainer}>
<AutoSizer onResize={this.onResize}>
{({ width, height }: any) => {
......
......@@ -82,6 +82,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
onScroll,
loadComp,
showCondition,
canFixed,
} = this.props;
const sortConfig =
operateConfig &&
......@@ -135,6 +136,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
noDataPlaceholder={noDataPlaceholder}
contentMenu={contentMenu}
loadComp={loadComp}
canFixed={canFixed}
/>
</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