bowen
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
5 additions and
5 deletions
-
src/components/Excel/src/ExportExcelModal.vue
-
src/components/Form/src/types/form.ts
|
|
|
@ -66,18 +66,18 @@ |
|
|
|
components: { BasicModal, BasicForm }, |
|
|
|
emits: ['success', 'register'], |
|
|
|
setup(_, { emit }) { |
|
|
|
const [registerForm, { validateFields }] = useForm(); |
|
|
|
const [registerForm, { validate }] = useForm(); |
|
|
|
const [registerModal, { closeModal }] = useModalInner(); |
|
|
|
|
|
|
|
async function handleOk() { |
|
|
|
const res = (await validateFields()) as ExportModalResult; |
|
|
|
const handleOk = async () => { |
|
|
|
const res = await validate<ExportModalResult>(); |
|
|
|
const { filename, bookType } = res; |
|
|
|
emit('success', { |
|
|
|
filename: `${filename.split('.').shift()}.${bookType}`, |
|
|
|
bookType, |
|
|
|
}); |
|
|
|
closeModal(); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
return { |
|
|
|
schemas, |
|
|
|
|
|
|
|
@ -39,7 +39,7 @@ export interface FormActionType { |
|
|
|
first?: boolean | undefined, |
|
|
|
) => Promise<void>; |
|
|
|
validateFields: (nameList?: NamePath[]) => Promise<any>; |
|
|
|
validate: (nameList?: NamePath[] | false) => Promise<any>; |
|
|
|
validate: <T = any>(nameList?: NamePath[] | false) => Promise<T>; |
|
|
|
scrollToField: (name: NamePath, options?: ScrollOptions) => Promise<void>; |
|
|
|
} |
|
|
|
|
|
|
|
|