From e8f82c99b8caf5f18be86f5212f9e82efa41ea91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8?= Date: Sun, 23 Feb 2025 04:18:36 +0000 Subject: [PATCH] =?UTF-8?q?update=20im-admin-ui/src/components/ImageUpload?= =?UTF-8?q?/index.vue.=20=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=E5=90=8E?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=B0=86=E5=9B=9E=E8=B0=83emit=E5=88=B0?= =?UTF-8?q?=E7=88=B6=E7=BB=84=E4=BB=B6=EF=BC=8C=E7=88=B6=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=89=8D=E8=83=BD=E6=AD=A3=E7=A1=AE=E5=A4=84=E7=90=86=E7=BC=A9?= =?UTF-8?q?=E7=95=A5=E5=9B=BE=E7=AD=89=E4=BA=8B=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 老周 --- im-admin-ui/src/components/ImageUpload/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/im-admin-ui/src/components/ImageUpload/index.vue b/im-admin-ui/src/components/ImageUpload/index.vue index 637d42a..1b62739 100644 --- a/im-admin-ui/src/components/ImageUpload/index.vue +++ b/im-admin-ui/src/components/ImageUpload/index.vue @@ -59,7 +59,7 @@ const props = defineProps({ }); const { proxy } = getCurrentInstance() as ComponentInternalInstance; -const emit = defineEmits(['update:modelValue']); +const emit = defineEmits(['update:modelValue', 'on-success']); const dialogImageUrl = ref(''); const dialogVisible = ref(false); @@ -99,6 +99,7 @@ const handleBeforeUpload = (file: any) => { // 上传成功回调 const handleUploadSuccess = (res: any) => { if (res.code === 200) { + emit('on-success', res.data); emit('update:modelValue', res.data.originUrl); } else { emit('update:modelValue', '');