Commit c20a36dc authored by zhangwenshuai's avatar zhangwenshuai

修改表格操作栏样式

parent 8ad20434
......@@ -18,10 +18,16 @@
//min-height: 600px;
&.scroll {
flex: 1;
display: flex;
flex-direction: column;
}
.tableOperateContainer {
height: 58px;
overflow: hidden;
}
.tableC {
padding: 0 16px;
flex: 1;
}
.rowClassName {
border: 1px solid black;
......
......@@ -57,6 +57,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
render() {
const { columns, dataSource } = this.state;
const {
className,
rowStyle,
rowClassName,
distanceToLoad,
......@@ -89,12 +90,23 @@ class AirTable extends React.Component<CommonProps, CommonState> {
});
return (
<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} />}
<div
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
columns={columns}
dataSource={dataSource}
......@@ -122,6 +134,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
loadComp={loadComp}
/>
</div>
</div>
{paginationConfig && <Pagination {...paginationConfig} />}
</div>
</Provider>
......
......@@ -86,6 +86,7 @@ export interface CommonProps extends TableProps {
tableOperateConfig?: OperateConfigProps;
paginationConfig?: any;
locale?: any;
className?: string;
}
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