From 2542ae393e12cee28b2ffd81a3e6723386c58492 Mon Sep 17 00:00:00 2001 From: liudong <liudong> Date: 星期四, 15 八月 2024 15:07:26 +0800 Subject: [PATCH] 新建对话页面开发 --- src/components/upload/index.vue | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/components/upload/index.vue b/src/components/upload/index.vue index b58aeaf..3600546 100644 --- a/src/components/upload/index.vue +++ b/src/components/upload/index.vue @@ -5,6 +5,7 @@ :limit="limit" :action="action" @change="handleChange" + @before-remove="beforeRemove" image-preview /> </template> @@ -23,7 +24,7 @@ url: String, //鍥炴樉鐨勬枃浠跺湴鍧� }); - const emit = defineEmits(['update:fileList', 'success']); + const emit = defineEmits(['update:fileList', 'success', 'handleRemove']); const urls = computed(() => props.url); const fileList = ref([]); @@ -62,6 +63,10 @@ }); // console.log(urls.value, 8988); + const beforeRemove = (file) => { + emit('handleRemove'); + fileList.value = []; + }; const handleChange = (fileList) => { emit('update:fileList', fileList); -- Gitblit v1.8.0