From 72e51a61e12cf8fc0a4967f3df95bb89c3d304ef Mon Sep 17 00:00:00 2001 From: quirkyshop Date: Wed, 11 Dec 2019 16:10:56 +0800 Subject: [PATCH] fix: use omit to elegant & --- packages/antd/src/types.ts | 6 ++---- packages/next/src/types.ts | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/antd/src/types.ts b/packages/antd/src/types.ts index 28ab923dbcf..e026e769ef3 100644 --- a/packages/antd/src/types.ts +++ b/packages/antd/src/types.ts @@ -14,12 +14,10 @@ import { StyledComponent } from 'styled-components' type ColSpanType = number | string -export type IAntdSchemaFormProps = FormProps & +export type IAntdSchemaFormProps = Omit & IFormItemTopProps & PreviewTextConfigProps & - ISchemaFormProps | { - onSubmit?: ISchemaFormProps['onSubmit'] - } + ISchemaFormProps export type IAntdSchemaFieldProps = IMarkupSchemaFieldProps diff --git a/packages/next/src/types.ts b/packages/next/src/types.ts index ad38f373663..c7d6d1118a2 100644 --- a/packages/next/src/types.ts +++ b/packages/next/src/types.ts @@ -11,12 +11,10 @@ import { StyledComponent } from 'styled-components' type ColSpanType = number | string -export type INextSchemaFormProps = FormProps & +export type INextSchemaFormProps = Omit & IFormItemTopProps & PreviewTextConfigProps & - ISchemaFormProps | { - onSubmit?: ISchemaFormProps['onSubmit'] - } + ISchemaFormProps export type INextSchemaFieldProps = IMarkupSchemaFieldProps