From eae47452ab1ef8fa1ddc56aaf0c73a75138c92d1 Mon Sep 17 00:00:00 2001 From: "X.Mo" Date: Wed, 10 Apr 2024 16:07:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AF=BC=E5=85=A5=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=90=8E=E6=9C=AA=E5=88=B7=E6=96=B0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ma-crud/components/import.vue | 4 +++- src/components/ma-crud/index.vue | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/ma-crud/components/import.vue b/src/components/ma-crud/components/import.vue index 27c07799..99ccfcdc 100644 --- a/src/components/ma-crud/components/import.vue +++ b/src/components/ma-crud/components/import.vue @@ -37,6 +37,7 @@ import { Message } from '@arco-design/web-vue' const visible = ref(false) const options = inject('options') +const emit = defineEmits(['success']) const open = () => visible.value = true const close = () => visible.value = false @@ -46,8 +47,9 @@ const upload = (fileOption) => { const dataForm = new FormData() dataForm.append('file', fileOption.fileItem.file) - commonApi.importExcel(options.import.url, dataForm).then( res => { + commonApi.importExcel(options.import.url, dataForm).then( async res => { res.success && Message.success(res.message || '导入成功') + emit('success') close() }) } diff --git a/src/components/ma-crud/index.vue b/src/components/ma-crud/index.vue index 589d6568..a6507099 100644 --- a/src/components/ma-crud/index.vue +++ b/src/components/ma-crud/index.vue @@ -244,7 +244,7 @@ - +