+
+
+
+
+
+ 大小不超过 {{ fileSize }}MB
+
+
+ 格式为 {{ fileType.join('/') }}
+
+
+
+
-
-
- 请上传
-
- 大小不超过 {{ fileSize }}MB
-
-
- 格式为 {{ fileType.join('/') }}
-
- 的文件
-
@@ -94,6 +97,7 @@ const uploadImgUrl = ref(baseUrl + import.meta.env.VITE_APP_UPLOAD_URL) // 上
const headers = ref({ Authorization: 'Bearer ' + getToken() })
const fileList = ref([])
const showTip = computed(() => props.isShowTip && (props.fileType || props.fileSize))
+const uploadData = computed(() => props.data)
watch(
() => props.modelValue,
@@ -104,11 +108,7 @@ watch(
// 然后将数组转为对象数组
fileList.value = list.map((item) => {
if (typeof item === 'string') {
- // if (item.indexOf(baseUrl) === -1) {
- // item = { name: baseUrl + item, url: baseUrl + item }
- // } else {
item = { name: item, url: item }
- // }
}
return item
})