diff --git a/pages/common/file/fileUpload/index.vue b/pages/common/file/fileUpload/index.vue
index bc3d1e0..1ed96a2 100644
--- a/pages/common/file/fileUpload/index.vue
+++ b/pages/common/file/fileUpload/index.vue
@@ -26,6 +26,7 @@ const { proxy } = getCurrentInstance();
const uploadQiNiuDomain = config1.uploadQiNiuDomain;
const props = defineProps({
+ modelValue: [String, Object, Array],
fileTypeInfo: {
type: String,
default: "image",
@@ -99,7 +100,7 @@ const afterRead = async (event) => {
url: store.state.user.QNDomain + result,
furl: result
});
- emit('fileList', fileList1.value);
+ emit("update:modelValue", fileList1.value);
fileListLen++;
} catch (error) {
console.error("上传失败:", error);
@@ -205,7 +206,17 @@ const typeInfo = () => {
store.dispatch('getPhoneType');
console.log(store.state.user.phoneType);
};
-
+ // 对象转成指定字符串分隔
+ function listToString(list, separator) {
+ let strs = "";
+ separator = separator || ",";
+ for (let i in list) {
+ if (list[i].url) {
+ strs += list[i].url + separator;
+ }
+ }
+ return strs != '' ? strs.substr(0, strs.length - 1) : '';
+ }
typeInfo();
diff --git a/pages/work/index.vue b/pages/work/index.vue
index eacbc8e..4d36ed7 100644
--- a/pages/work/index.vue
+++ b/pages/work/index.vue
@@ -71,8 +71,8 @@
-
-
+
+
@@ -105,10 +105,7 @@ const QNDomain = store.state.user.QNDomain
}
])
const fileList1 = ref([])
-const handleFileList = (newFileList) => {
- fileList1.value = newFileList;
- console.log('Updated fileList:', fileList1.value);
-}
+
function clickBannerItem(item) {
console.info(item)