refactor(ui): clean code

This commit is contained in:
Fu Diwei
2025-01-03 21:51:40 +08:00
parent b7cd07c996
commit 849e065bb2
14 changed files with 103 additions and 143 deletions

View File

@@ -3,7 +3,7 @@ import { Form, type FormProps, Modal, type ModalProps } from "antd";
import { useAntdForm, useTriggerElement } from "@/hooks";
export interface ModalFormProps<T extends NonNullable<unknown> = NonNullable<unknown>> extends Omit<FormProps<T>, "title" | "onFinish"> {
export interface ModalFormProps<T extends NonNullable<unknown> = any> extends Omit<FormProps<T>, "title" | "onFinish"> {
className?: string;
style?: React.CSSProperties;
children?: React.ReactNode;
@@ -35,7 +35,7 @@ export interface ModalFormProps<T extends NonNullable<unknown> = NonNullable<unk
onFinish?: (values: T) => void | Promise<unknown>;
}
const ModalForm = <T extends NonNullable<unknown> = NonNullable<unknown>>({
const ModalForm = <T extends NonNullable<unknown> = any>({
className,
style,
children,