|  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script setup> | 
|---|
|  |  |  | import { computed, ref, watch, watchEffect } from 'vue'; | 
|---|
|  |  |  | import { computed, ref, onMounted, watch, watchEffect } from 'vue'; | 
|---|
|  |  |  | import { useUserStore } from '@/store'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const userStore = useUserStore(); | 
|---|
|  |  |  | const props = defineProps({ | 
|---|
|  |  |  | limit: { | 
|---|
|  |  |  | type: Number, | 
|---|
|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const emit = defineEmits(['update:fileList', 'success']); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const urls = computed(() => props.url); | 
|---|
|  |  |  | const fileList = ref([]); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | watch( | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | onMounted(() => { | 
|---|
|  |  |  | if (urls.value) { | 
|---|
|  |  |  | fileList.value = urls.value.split(',').map((item) => ({ | 
|---|
|  |  |  | uid: item, | 
|---|
|  |  |  | name: item, | 
|---|
|  |  |  | status: 'done', | 
|---|
|  |  |  | url: item, | 
|---|
|  |  |  | })); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // console.log( | 
|---|
|  |  |  | //   window.location.origin, | 
|---|
|  |  |  | //   import.meta.env.VITE_API_BASE_URL, | 
|---|
|  |  |  | //   8988 | 
|---|
|  |  |  | // ); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // console.log(urls.value, 8988); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const handleChange = (fileList) => { | 
|---|