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