commit:修复数据兼容bug

This commit is contained in:
Jerry
2024-09-10 11:32:47 +08:00
parent f52faaff3c
commit dcbcad1c3b
2 changed files with 13 additions and 3 deletions

View File

@@ -1,2 +1,2 @@
VUE_APP_SERVER_HOST='http://localhost:8082/' VUE_APP_SERVER_HOST='https://test.orangeforms.com/'
VUE_APP_PROJECT_NAME='橙单演示工程' VUE_APP_PROJECT_NAME='橙单演示工程'

View File

@@ -58,7 +58,17 @@ import { OnlinePageController } from '@/api/online';
const props = defineProps<{ modelValue: FormPage }>(); const props = defineProps<{ modelValue: FormPage }>();
const form = ref(); const form = ref();
const formPageData = ref<FormPage>({} as FormPage); const formPageData = ref<FormPage>({
pageId: undefined,
pageCode: undefined,
pageName: undefined,
published: false,
pageType: SysOnlinePageType.BIZ,
status: SysOnlinePageStatus.BASIC,
extraJson: {
extendClass: undefined,
},
});
const dirty = ref(false); const dirty = ref(false);
const formRules: Partial<Record<string, Arrayable<FormItemRule>>> = { const formRules: Partial<Record<string, Arrayable<FormItemRule>>> = {
pageCode: [ pageCode: [
@@ -133,6 +143,6 @@ defineExpose({
}); });
onMounted(() => { onMounted(() => {
formPageData.value = { ...props.modelValue }; formPageData.value = { ...formPageData.value, ...props.modelValue };
}); });
</script> </script>