This commit is contained in:
2026-02-28 18:54:07 +08:00
parent 93792ba04f
commit 77a8e784f0
3 changed files with 5 additions and 4 deletions

View File

@@ -385,7 +385,7 @@ const getFormatDataFun = () => {
});
}
if (unit.type === 'table') {
unitData.head = unit.head.map((i: any) => i.title);
unitData.head = unit.head?.map((i: any) => i.title);
}
build.push(unitData);
}

View File

@@ -38,6 +38,7 @@ import FormItem from './formItem.vue';
import { getFormConfigureApi } from '@/api/system/systemData';
import { isPhone, isEmail, hasNoSpecialChar, length20, length100 } from '@/utils/validate';
import { formOptionsFormat } from './lib';
import { isEqual } from 'lodash-es';
const emit = defineEmits(['change', 'remove', 'load']);
const minHeight = ref(0);
@@ -70,7 +71,7 @@ const props = withDefaults(defineProps<Props>(), {
watch(
() => props.data,
(data: any, oldData: any) => {
if (JSON.stringify(data) !== JSON.stringify(oldData)) {
if (!isEqual(data, oldData)) {
formData.value = formatDataFun(data);
}
},

View File

@@ -14,7 +14,7 @@
<div class="toper">
<div class="total">{{ tableData.length }}个列表字段</div>
<div class="add-btn">
<el-button type="primary" plain @click="previewVisible = true">预览列表</el-button>
<!-- <el-button type="primary" plain @click="previewVisible = true">预览列表</el-button> -->
<el-button v-if="!disabled" type="primary" :icon="Plus" @click="addFun">
新增字段
</el-button>
@@ -361,7 +361,7 @@ const updateFun = () => {
};
updateFormConfigureApi(params).then((res: any) => {
if (res.code === 200) {
ElMessage.success('操作成功');
ElMessage.success('更新成功,刷新页面后生效');
closeFun();
emit('update');
}