fix(export): export button remaining in loading state after cancel (#4615)

This commit is contained in:
Katherine 2024-06-11 11:35:53 +08:00 committed by GitHub
parent aae75de70b
commit b9fda22fb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,7 +45,6 @@ export const useExportAction = () => {
return {
async onClick() {
field.data = field.data || {};
field.data.loading = true;
const confirmed = await modal.confirm({
title: t('Export'),
content: t('Export warning', { limit: exportLimit }),
@ -54,6 +53,7 @@ export const useExportAction = () => {
if (!confirmed) {
return;
}
field.data.loading = true;
const { exportSettings } = lodash.cloneDeep(actionSchema?.['x-action-settings'] ?? {});
exportSettings.forEach((es) => {
const { uiSchema, interface: fieldInterface } =