This commit is contained in:
2025-07-19 18:37:07 +08:00
parent fbd2431f63
commit f4bd352162
9 changed files with 90 additions and 57 deletions

View File

@ -107,11 +107,19 @@ const props = defineProps({
type: Boolean,
default: false
},
isAll:{
type: Boolean,
default: false
}
});
const actionUrl = computed(() =>
props.isImg ? "/mosty-api/mosty-base/minio/image/upload/id" : "/mosty-api/mosty-base/minio/file/upload"
);
const actionUrl = computed(() =>{
if(props.isAll){
return "/mosty-api/mosty-base/minio/image/upload/id"
}else{
return props.isImg ? "/mosty-api/mosty-base/minio/image/upload/id" : "/mosty-api/mosty-base/minio/file/upload"
}
});
const emits = defineEmits(["update:modelValue", "handleChange"]);
@ -179,11 +187,19 @@ watch(
if (arr && arr.length > 0) {
if (!props.sfUrl) {
fileList.value = arr.map((el) => {
return { url: `/mosty-api/mosty-base/minio/image/download/` + el,name:'生活时尚' };
if(Object.prototype.toString.call(el) === '[object Object]'){
return { url: `/mosty-api/mosty-base/minio/image/download/` + el,name:el.name };
}else{
return { url: `/mosty-api/mosty-base/minio/image/download/` + el };
}
});
} else {
fileList.value = arr.map((el) => {
return { url: el ,name:'生活时尚'};
if(Object.prototype.toString.call(el) === '[object Object]'){
return { url: el,name:el.name };
}else{
return { url: el };
}
});
}
}