fix: improve sub table action button style

This commit is contained in:
chenos 2021-01-01 19:53:54 +08:00
parent ba6f3f7f7d
commit 76e02f8ad9

View File

@ -49,19 +49,19 @@ export default function Table(props: SimpleTableProps) {
return ( return (
<div> <div>
<div> <div>
<Space style={{marginBottom: 14}}> <Space style={{marginBottom: 14, position: 'absolute', right: 0, top: -31}}>
<Button type={'primary'} onClick={() => { <Button size={'small'} type={'primary'} onClick={() => {
drawerRef.current.setVisible(true); drawerRef.current.setVisible(true);
drawerRef.current.setIndex(undefined); drawerRef.current.setIndex(undefined);
drawerRef.current.setData({}); drawerRef.current.setData({});
drawerRef.current.setTitle('建子字段'); drawerRef.current.setTitle('建子字段');
}}></Button> }}></Button>
<Popconfirm title="确认删除吗?" onConfirm={() => { <Popconfirm title="确认删除吗?" onConfirm={() => {
console.log({selectedRowKeys}) console.log({selectedRowKeys})
const newValues = value.filter(item => selectedRowKeys.indexOf(item.__id) === -1); const newValues = value.filter(item => selectedRowKeys.indexOf(item.__id) === -1);
onChange(newValues); onChange(newValues);
}}> }}>
<Button></Button> <Button size={'small'} type={'ghost'} danger></Button>
</Popconfirm> </Popconfirm>
</Space> </Space>
</div> </div>
@ -77,7 +77,7 @@ export default function Table(props: SimpleTableProps) {
console.log(newVaules); console.log(newVaules);
}} ref={drawerRef}/> }} ref={drawerRef}/>
<AntdTable <AntdTable
size={'middle'} size={'small'}
rowKey={rowKey} rowKey={rowKey}
// loading={loading} // loading={loading}
columns={fields2columns(schema.fields||[])} columns={fields2columns(schema.fields||[])}