From e426ee93a2553550766e25958dcb70a6f7339b9c Mon Sep 17 00:00:00 2001
From: zhangxiao <898441624@qq.com>
Date: 星期二, 27 八月 2024 17:13:05 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/web/flow_web
---
src/components/upload/index.vue | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/src/components/upload/index.vue b/src/components/upload/index.vue
index ffae588..3600546 100644
--- a/src/components/upload/index.vue
+++ b/src/components/upload/index.vue
@@ -5,12 +5,16 @@
:limit="limit"
:action="action"
@change="handleChange"
+ @before-remove="beforeRemove"
image-preview
/>
</template>
<script setup>
import { computed, ref, onMounted, watch, watchEffect } from 'vue';
+ import { useUserStore } from '@/store';
+
+ const userStore = useUserStore();
const props = defineProps({
limit: {
type: Number,
@@ -20,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([]);
@@ -50,9 +54,19 @@
url: item,
}));
}
+
+ // console.log(
+ // window.location.origin,
+ // import.meta.env.VITE_API_BASE_URL,
+ // 8988
+ // );
});
// console.log(urls.value, 8988);
+ const beforeRemove = (file) => {
+ emit('handleRemove');
+ fileList.value = [];
+ };
const handleChange = (fileList) => {
emit('update:fileList', fileList);
--
Gitblit v1.8.0