diff --git a/apps/vue/src/components/Form/src/TabForm.vue b/apps/vue/src/components/Form/src/TabForm.vue index b89ae8fdd..f3540d082 100644 --- a/apps/vue/src/components/Form/src/TabForm.vue +++ b/apps/vue/src/components/Form/src/TabForm.vue @@ -6,16 +6,20 @@ :model="formModel" @keypress.enter="handleEnterPress" > - - - - - + + + + + - - + + + + @@ -48,8 +54,7 @@ + + diff --git a/apps/vue/src/components/Form/src/props.ts b/apps/vue/src/components/Form/src/props.ts index 6088b3fb5..8a429703c 100644 --- a/apps/vue/src/components/Form/src/props.ts +++ b/apps/vue/src/components/Form/src/props.ts @@ -1,4 +1,4 @@ -import type { FieldMapToTime, FormSchema } from './types/form'; +import type { FieldMapToTime, FormSchema, TabFormSchema } from './types/form'; import type { CSSProperties, PropType } from 'vue'; import type { ColEx } from './types'; import type { TableActionType } from '/@/components/Table'; @@ -120,7 +120,7 @@ export const tabProps = { compact: propTypes.bool, // 表单配置规则 schemas: { - type: [Array] as PropType, + type: [Array] as PropType, default: () => [], }, mergeDynamicData: { diff --git a/apps/vue/src/components/Form/src/types/form.ts b/apps/vue/src/components/Form/src/types/form.ts index f4c73f738..d0b27fc62 100644 --- a/apps/vue/src/components/Form/src/types/form.ts +++ b/apps/vue/src/components/Form/src/types/form.ts @@ -44,6 +44,10 @@ export interface FormActionType { scrollToField: (name: NamePath, options?: ScrollOptions) => Promise; } +export interface TabFormActionType extends FormActionType { + changeTab: (tab: string) => void; +} + export type RegisterFn = (formInstance: FormActionType) => void; export type UseFormReturnType = [RegisterFn, FormActionType]; @@ -127,6 +131,7 @@ export interface FormProps { export interface TabFormProps extends FormProps { tab: string; + schemas?: TabFormSchema[]; } export interface FormSchema { diff --git a/apps/vue/src/views/platform/dataDic/components/DataItemTable.vue b/apps/vue/src/views/platform/dataDic/components/DataItemTable.vue index f6ffa0f5a..2fb551ade 100644 --- a/apps/vue/src/views/platform/dataDic/components/DataItemTable.vue +++ b/apps/vue/src/views/platform/dataDic/components/DataItemTable.vue @@ -28,7 +28,7 @@ - +