mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 18:40:22 +08:00
fix(customExport): Failure to export (#3137)
This commit is contained in:
parent
e161c1449a
commit
4d02205839
@ -66,18 +66,18 @@
|
|||||||
components: { BasicModal, BasicForm },
|
components: { BasicModal, BasicForm },
|
||||||
emits: ['success', 'register'],
|
emits: ['success', 'register'],
|
||||||
setup(_, { emit }) {
|
setup(_, { emit }) {
|
||||||
const [registerForm, { validateFields }] = useForm();
|
const [registerForm, { validate }] = useForm();
|
||||||
const [registerModal, { closeModal }] = useModalInner();
|
const [registerModal, { closeModal }] = useModalInner();
|
||||||
|
|
||||||
async function handleOk() {
|
const handleOk = async () => {
|
||||||
const res = (await validateFields()) as ExportModalResult;
|
const res = await validate<ExportModalResult>();
|
||||||
const { filename, bookType } = res;
|
const { filename, bookType } = res;
|
||||||
emit('success', {
|
emit('success', {
|
||||||
filename: `${filename.split('.').shift()}.${bookType}`,
|
filename: `${filename.split('.').shift()}.${bookType}`,
|
||||||
bookType,
|
bookType,
|
||||||
});
|
});
|
||||||
closeModal();
|
closeModal();
|
||||||
}
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
schemas,
|
schemas,
|
||||||
|
@ -39,7 +39,7 @@ export interface FormActionType {
|
|||||||
first?: boolean | undefined,
|
first?: boolean | undefined,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
validateFields: (nameList?: NamePath[]) => Promise<any>;
|
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>;
|
scrollToField: (name: NamePath, options?: ScrollOptions) => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user