This commit is contained in:
dzc committed 2025-03-05 17:09:24 +08:00
commit 3afa5e038f
2 files changed
+7 -11

No files matched your search

+2 -2
View File
@@ -47,7 +47,7 @@ const props = withDefaults(defineProps<UploadFileProps>(), {
borderRadius: "8px", borderRadius: "8px",
}) })
const imageUrls = defineModel<string>() const imageUrls = defineModel("modelValue", { default: "" })
const imageBaseUrl = import.meta.env.VITE_IMAGE_BASE_PATH const imageBaseUrl = import.meta.env.VITE_IMAGE_BASE_PATH
const dialogVisible = ref(false) const dialogVisible = ref(false)
@@ -162,7 +162,7 @@ const self_disabled = computed(() => {
watch( watch(
() => imageUrls.value, () => imageUrls.value,
(newValue) => { (newValue) => {
if (!newValue) { if (!newValue || Object.prototype.toString.call(newValue) !== "[object String]") {
fileList.value = [] fileList.value = []
return return
} }
+5 -9
View File
@@ -1,6 +1,6 @@
<template> <template>
<el-dialog :title="form.id ? '编辑' : '新增'" width="40%" v-model="visible" :close-on-click-modal="false" draggable> <el-dialog :title="form.id ? '编辑' : '新增'" width="40%" v-model="visible" :close-on-click-modal="false" draggable>
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading"> <el-form ref="dataFormRef" :model="form" :rules="dataRules" label-width="90px" v-loading="loading">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="24" class="mb20"> <el-col :span="24" class="mb20">
<el-form-item label="商户名" prop="name"> <el-form-item label="商户名" prop="name">
@@ -71,10 +71,8 @@
</el-row> </el-row>
</el-form> </el-form>
<template #footer> <template #footer>
<span class="dialog-footer"> <el-button @click="visible = false">取消</el-button>
<el-button @click="visible = false">取消</el-button> <el-button type="primary" @click="onSubmit" :disabled="loading">确认</el-button>
<el-button type="primary" @click="onSubmit" :disabled="loading">确认</el-button>
</span>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
@@ -104,7 +102,7 @@ const form = reactive({
merchantType: [], merchantType: [],
logoPic: "", logoPic: "",
collectMoneyCode: "", collectMoneyCode: "",
swiperPic: [], swiperPic: "",
phone: "", phone: "",
businessTime: "", businessTime: "",
address: "", address: "",
@@ -132,9 +130,7 @@ const openDialog = (id: string) => {
form.id = "" form.id = ""
// 重置表单数据 // 重置表单数据
nextTick(() => { dataFormRef.value?.resetFields()
dataFormRef.value?.resetFields()
})
// 获取merchantInfo信息 // 获取merchantInfo信息
if (id) { if (id) {