Commit c20a36dc authored by zhangwenshuai's avatar zhangwenshuai

修改表格操作栏样式

parent 8ad20434
...@@ -18,10 +18,16 @@ ...@@ -18,10 +18,16 @@
//min-height: 600px; //min-height: 600px;
&.scroll { &.scroll {
flex: 1; flex: 1;
display: flex;
flex-direction: column;
}
.tableOperateContainer {
height: 58px;
overflow: hidden;
} }
.tableC { .tableC {
padding: 0 16px; flex: 1;
} }
.rowClassName { .rowClassName {
border: 1px solid black; border: 1px solid black;
......
...@@ -57,6 +57,7 @@ class AirTable extends React.Component<CommonProps, CommonState> { ...@@ -57,6 +57,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
render() { render() {
const { columns, dataSource } = this.state; const { columns, dataSource } = this.state;
const { const {
className,
rowStyle, rowStyle,
rowClassName, rowClassName,
distanceToLoad, distanceToLoad,
...@@ -89,38 +90,50 @@ class AirTable extends React.Component<CommonProps, CommonState> { ...@@ -89,38 +90,50 @@ class AirTable extends React.Component<CommonProps, CommonState> {
}); });
return ( return (
<Provider value={{ locale: this.getContext() }}> <Provider value={{ locale: this.getContext() }}>
<div className={onScroll ? classNames(styles.container, styles.scroll) : styles.container}> <div
className={
onScroll
? classNames(styles.container, styles.scroll, className)
: classNames(styles.container, className)
}
>
{operateConfig && <OperateConfig columns={columns} operateConfig={operateConfig} />} {operateConfig && <OperateConfig columns={columns} operateConfig={operateConfig} />}
<div <div
className={onScroll ? classNames(styles.tableContainer, styles.scroll) : styles.tableContainer} className={onScroll ? classNames(styles.tableContainer, styles.scroll) : styles.tableContainer}
> >
{tableOperateConfig && <TableOperateConfig operateConfig={tableOperateConfig} />} {tableOperateConfig && (
<Table <div className={styles.tableOperateContainer}>
columns={columns} <TableOperateConfig operateConfig={tableOperateConfig} />
dataSource={dataSource} </div>
onScroll={this.onScroll} )}
rowStyle={rowStyle} <div className={styles.tableC}>
rowClassName={rowClassName} <Table
distanceToLoad={distanceToLoad} columns={columns}
emitChangeCell={emitChangeCell} dataSource={dataSource}
bordered={bordered} onScroll={this.onScroll}
width={width} rowStyle={rowStyle}
height={height} rowClassName={rowClassName}
sortConfig={sortConfig} distanceToLoad={distanceToLoad}
paginationConfig={paginationConfig} emitChangeCell={emitChangeCell}
showIndex={showIndex} bordered={bordered}
showExpand={showExpand} width={width}
emptyPlaceholder={emptyPlaceholder} height={height}
cellEditable={cellEditable} sortConfig={sortConfig}
rowHeight={rowHeight} paginationConfig={paginationConfig}
headerHeight={headerHeight} showIndex={showIndex}
columnWidth={columnWidth} showExpand={showExpand}
loading={loading} emptyPlaceholder={emptyPlaceholder}
rowSelection={rowSelection} cellEditable={cellEditable}
noDataPlaceholder={noDataPlaceholder} rowHeight={rowHeight}
contentMenu={contentMenu} headerHeight={headerHeight}
loadComp={loadComp} columnWidth={columnWidth}
/> loading={loading}
rowSelection={rowSelection}
noDataPlaceholder={noDataPlaceholder}
contentMenu={contentMenu}
loadComp={loadComp}
/>
</div>
</div> </div>
{paginationConfig && <Pagination {...paginationConfig} />} {paginationConfig && <Pagination {...paginationConfig} />}
</div> </div>
......
...@@ -86,6 +86,7 @@ export interface CommonProps extends TableProps { ...@@ -86,6 +86,7 @@ export interface CommonProps extends TableProps {
tableOperateConfig?: OperateConfigProps; tableOperateConfig?: OperateConfigProps;
paginationConfig?: any; paginationConfig?: any;
locale?: any; locale?: any;
className?: string;
} }
export interface CommonState extends TableState {} export interface CommonState extends TableState {}
......
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