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,12 +90,23 @@ class AirTable extends React.Component<CommonProps, CommonState> { ...@@ -89,12 +90,23 @@ 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 && (
<div className={styles.tableOperateContainer}>
<TableOperateConfig operateConfig={tableOperateConfig} />
</div>
)}
<div className={styles.tableC}>
<Table <Table
columns={columns} columns={columns}
dataSource={dataSource} dataSource={dataSource}
...@@ -122,6 +134,7 @@ class AirTable extends React.Component<CommonProps, CommonState> { ...@@ -122,6 +134,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
loadComp={loadComp} loadComp={loadComp}
/> />
</div> </div>
</div>
{paginationConfig && <Pagination {...paginationConfig} />} {paginationConfig && <Pagination {...paginationConfig} />}
</div> </div>
</Provider> </Provider>
......
...@@ -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