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,6 +559,7 @@ export default class AirTable extends Component<TableProps, TableState> {
}
</div>
)}
{canFixed && (
<LeftDragFixed
initLeft={leftWidth}
initTop={headerHeight}
......@@ -569,6 +570,7 @@ export default class AirTable extends Component<TableProps, TableState> {
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