|
@@ -47,11 +47,10 @@ interface Prosp {
|
|
|
bodyStyle?: any
|
|
|
gutter?: any
|
|
|
isCard?: boolean
|
|
|
- handleSave?: (row: DataType) => void
|
|
|
}
|
|
|
|
|
|
function TableData(props: Prosp) {
|
|
|
- const { isZj, scroll, columns, title, dataSource, expandedRowRender, className, isCard = true, leftChild, handleSave, page = undefined, rowSelection = false, pageSize = undefined, size = 'small', fixed = { left: 0, right: 1 }, total = 0, loading = false, onChange, config, configName, ajax, syncAjax, hoverable = true, myKey, gutter = [0, 20] } = props
|
|
|
+ const { isZj, scroll, columns, title, dataSource, expandedRowRender, className, isCard = true, leftChild, page = undefined, rowSelection = false, pageSize = undefined, size = 'small', fixed = { left: 0, right: 1 }, total = 0, loading = false, onChange, config, configName, ajax, syncAjax, hoverable = true, myKey, gutter = [0, 20] } = props
|
|
|
const { state: userState } = useModel('useOperating.useUser')
|
|
|
const { isFell } = userState
|
|
|
const [visible, setVisible] = useState<boolean>(false)
|
|
@@ -253,7 +252,7 @@ function TableData(props: Prosp) {
|
|
|
</Row>
|
|
|
</Card> : <Row gutter={gutter}>
|
|
|
{header}
|
|
|
- <Tab {...{ size, newColumns, handelResize, className, isZj, rowSelection, columns, loading, handleSave, scroll, isFell, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax, myKey }} />
|
|
|
+ <Tab {...{ size, newColumns, handelResize, className, isZj, rowSelection, columns, loading, scroll, isFell, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax, myKey }} />
|
|
|
</Row>}
|
|
|
</Col>
|
|
|
</Row >
|
|
@@ -264,7 +263,7 @@ function TableData(props: Prosp) {
|
|
|
|
|
|
/**表格 */
|
|
|
const Tab = React.memo((props: any) => {
|
|
|
- const { size, newColumns, className, handelResize, columns, scroll, loading, handleSave, rowSelection, isFell, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax, myKey } = props
|
|
|
+ const { size, newColumns, className, handelResize, columns, scroll, loading, rowSelection, isFell, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax, myKey } = props
|
|
|
return < Col span={24} >
|
|
|
<div className={`${style[size]} ${className ? style[className] : ''} `}>
|
|
|
{dataSource || !ajax?.loading ? <Tables
|
|
@@ -286,7 +285,6 @@ const Tab = React.memo((props: any) => {
|
|
|
rowSelection={rowSelection}
|
|
|
handelResize={((columns: any) => handelResize(columns))}
|
|
|
myKey={myKey}
|
|
|
- handleSave={handleSave}
|
|
|
/> : <div className={style.example}>
|
|
|
<Spin />
|
|
|
</div>}
|