From 2d8a1e9af90dd6d11bcf41c47e2ee0da51a152f4 Mon Sep 17 00:00:00 2001 From: zhangxiao <898441624@qq.com> Date: 星期三, 07 八月 2024 10:35:02 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/web/flow_web --- src/components/upload/index.vue | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/components/upload/index.vue b/src/components/upload/index.vue index 66900de..ffae588 100644 --- a/src/components/upload/index.vue +++ b/src/components/upload/index.vue @@ -10,7 +10,7 @@ </template> <script setup> - import { computed, ref, watch, watchEffect } from 'vue'; + import { computed, ref, onMounted, watch, watchEffect } from 'vue'; const props = defineProps({ limit: { type: Number, @@ -21,7 +21,7 @@ }); const emit = defineEmits(['update:fileList', 'success']); - + const urls = computed(() => props.url); const fileList = ref([]); watch( @@ -41,6 +41,17 @@ } ); + onMounted(() => { + if (urls.value) { + fileList.value = urls.value.split(',').map((item) => ({ + uid: item, + name: item, + status: 'done', + url: item, + })); + } + }); + // console.log(urls.value, 8988); const handleChange = (fileList) => { -- Gitblit v1.8.0