|
|
@ -272,14 +272,14 @@ defineExpose({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
/** a workaround to override default antd upload api call */ |
|
|
|
/** a workaround to override default antd upload api call */ |
|
|
|
const customReqCbk = (o) => { |
|
|
|
const customReqCbk = (customReqArgs: { file: any; onSuccess: () => void }) => { |
|
|
|
importState.fileList.forEach((f) => { |
|
|
|
importState.fileList.forEach((f) => { |
|
|
|
if (f.uid === o.file.uid) { |
|
|
|
if (f.uid === customReqArgs.file.uid) { |
|
|
|
f.status = 'done' |
|
|
|
f.status = 'done' |
|
|
|
handleChange({ file: f, fileList: importState.fileList }) |
|
|
|
handleChange({ file: f, fileList: importState.fileList }) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
o.onSuccess() |
|
|
|
customReqArgs.onSuccess() |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
@ -319,9 +319,9 @@ const customReqCbk = (o) => { |
|
|
|
:accept="importMeta.acceptTypes" |
|
|
|
:accept="importMeta.acceptTypes" |
|
|
|
:max-count="1" |
|
|
|
:max-count="1" |
|
|
|
list-type="picture" |
|
|
|
list-type="picture" |
|
|
|
|
|
|
|
:custom-request="customReqCbk" |
|
|
|
@change="handleChange" |
|
|
|
@change="handleChange" |
|
|
|
@reject="rejectDrop" |
|
|
|
@reject="rejectDrop" |
|
|
|
:customRequest="customReqCbk" |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
<MdiFilePlusOutline size="large" /> |
|
|
|
<MdiFilePlusOutline size="large" /> |
|
|
|
|
|
|
|
|
|
|
@ -419,8 +419,7 @@ const customReqCbk = (o) => { |
|
|
|
{{ $t('activity.import') }} |
|
|
|
{{ $t('activity.import') }} |
|
|
|
</a-button> |
|
|
|
</a-button> |
|
|
|
|
|
|
|
|
|
|
|
<a-button v-else key="import" type="primary" :loading="loading" :disabled="disableImportButton" |
|
|
|
<a-button v-else key="import" type="primary" :loading="loading" :disabled="disableImportButton" @click="handleImport"> |
|
|
|
@click="handleImport"> |
|
|
|
|
|
|
|
{{ $t('activity.import') }} |
|
|
|
{{ $t('activity.import') }} |
|
|
|
</a-button> |
|
|
|
</a-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|