diff --git a/src/components/Upload/Images.vue b/src/components/Upload/Images.vue index 2eef8b2..a04bad4 100644 --- a/src/components/Upload/Images.vue +++ b/src/components/Upload/Images.vue @@ -47,7 +47,7 @@ const props = withDefaults(defineProps(), { borderRadius: "8px", }) -const imageUrls = defineModel() +const imageUrls = defineModel("modelValue", { default: "" }) const imageBaseUrl = import.meta.env.VITE_IMAGE_BASE_PATH const dialogVisible = ref(false) @@ -162,7 +162,7 @@ const self_disabled = computed(() => { watch( () => imageUrls.value, (newValue) => { - if (!newValue) { + if (!newValue || Object.prototype.toString.call(newValue) !== "[object String]") { fileList.value = [] return } diff --git a/src/views/wallet/mch-manage/form.vue b/src/views/wallet/mch-manage/form.vue index d1b6435..ee777cf 100644 --- a/src/views/wallet/mch-manage/form.vue +++ b/src/views/wallet/mch-manage/form.vue @@ -1,6 +1,6 @@ @@ -104,7 +102,7 @@ const form = reactive({ merchantType: [], logoPic: "", collectMoneyCode: "", - swiperPic: [], + swiperPic: "", phone: "", businessTime: "", address: "", @@ -132,9 +130,7 @@ const openDialog = (id: string) => { form.id = "" // 重置表单数据 - nextTick(() => { - dataFormRef.value?.resetFields() - }) + dataFormRef.value?.resetFields() // 获取merchantInfo信息 if (id) {