This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
import { CloseOutlined } from '@ant-design/icons';
|
||||
import type { ProFormColumnsType } from '@ant-design/pro-components';
|
||||
import { BetaSchemaForm, DrawerForm } from '@ant-design/pro-components';
|
||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||
import { Button, type ColProps, Drawer, Space, Typography } from 'antd';
|
||||
import React, { forwardRef, useImperativeHandle } from 'react';
|
||||
|
||||
const { Title } = Typography;
|
||||
interface ConfigurableDrawerFormProps {
|
||||
title?: string;
|
||||
columns: ProFormColumnsType[];
|
||||
onSubmit?: (values: any) => Promise<boolean>;
|
||||
initialValues?: Record<string, any>;
|
||||
width?: number;
|
||||
width?: number | string;
|
||||
labelCol?: ColProps;
|
||||
wrapperCol?: ColProps;
|
||||
}
|
||||
@@ -70,31 +68,31 @@ const ConfigurableDrawerForm = forwardRef<
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const customHeader = (
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
padding: '0 0px 16px 0px',
|
||||
borderBottom: '1px solid #f0f0f0',
|
||||
marginBottom: '16px',
|
||||
}}
|
||||
>
|
||||
<Title level={4} style={{ margin: 0 }}>
|
||||
{title}
|
||||
</Title>
|
||||
<Button
|
||||
type="text"
|
||||
icon={<CloseOutlined />}
|
||||
onClick={() => setOpen(false)}
|
||||
style={{
|
||||
border: 'none',
|
||||
boxShadow: 'none',
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
// const customHeader = (
|
||||
// <div
|
||||
// style={{
|
||||
// display: "flex",
|
||||
// justifyContent: "space-between",
|
||||
// alignItems: "center",
|
||||
// padding: "0 0px 16px 0px",
|
||||
// borderBottom: "1px solid #f0f0f0",
|
||||
// marginBottom: "16px",
|
||||
// }}
|
||||
// >
|
||||
// <Title level={4} style={{ margin: 0 }}>
|
||||
// {title}
|
||||
// </Title>
|
||||
// <Button
|
||||
// type="text"
|
||||
// icon={<CloseOutlined />}
|
||||
// onClick={() => setOpen(false)}
|
||||
// style={{
|
||||
// border: "none",
|
||||
// boxShadow: "none",
|
||||
// }}
|
||||
// />
|
||||
// </div>
|
||||
// );
|
||||
return (
|
||||
<Drawer
|
||||
title={title}
|
||||
|
||||
Reference in New Issue
Block a user