feat: 富文本编辑器
Some checks failed
coverage CI / build (push) Has been cancelled

This commit is contained in:
2025-09-24 15:47:28 +08:00
parent 12495b6d85
commit 82d043a414
8 changed files with 1160 additions and 35 deletions

View File

@@ -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}