fix: action buttons align right

This commit is contained in:
chenos 2020-12-30 11:22:06 +08:00
parent c20494d99b
commit c20d3a91de
5 changed files with 21 additions and 5 deletions

View File

@ -28,7 +28,7 @@ const api = Api.create({
charset: 'utf8mb4',
collate: 'utf8mb4_unicode_ci',
},
logging: false,
// logging: false,
define: {},
sync,
},

View File

@ -14,7 +14,7 @@ export function Destroy(props) {
console.log('destroy', onTrigger);
onTrigger && onTrigger();
}}>
<Button icon={<DeleteOutlined />} type={'primary'} danger>{title}</Button>
<Button icon={<DeleteOutlined />} type={'ghost'} danger>{title}</Button>
</Popconfirm>
</>
)

View File

@ -62,7 +62,16 @@ export const DrawerForm = forwardRef((props: any, ref) => {
setVisible(false);
}}
title={title}
footer={[
footer={(
<div
style={{
textAlign: 'right',
}}
>
<Button onClick={() => {
setVisible(false);
}}></Button>
<span style={{display: 'inline-block', width: 8}}> </span>
<Button type={'primary'} onClick={async () => {
const { values = {} } = await actions.submit();
console.log(values);
@ -83,7 +92,8 @@ export const DrawerForm = forwardRef((props: any, ref) => {
window.routesReload && window.routesReload();
onFinish && onFinish(values);
}}></Button>
]}
</div>
)}
>
{loading ? <Spin/> : (
<SchemaForm

View File

@ -52,7 +52,7 @@ export function FilterForm(props: any) {
},
}}
>
<FormButtonGroup>
<FormButtonGroup align={'end'}>
<Reset></Reset>
<Submit></Submit>
</FormButtonGroup>

View File

@ -23,4 +23,10 @@
.ant-page-header-footer {
margin-top: 5px;
}
.button-group {
display: flex;
justify-content: flex-end;
width: 100%;
}