更新
This commit is contained in:
@ -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 };
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user