From 1dee461626116b4ac9f7b2e3b262919ea2952cbb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E7=A6=8F=E8=B4=A2?= <1471584931@qq.com>
Date: Tue, 14 Oct 2025 19:12:21 +0800
Subject: [PATCH] =?UTF-8?q?--=E6=B7=BB=E5=8A=A0=E5=85=A8=E5=B1=80=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E7=89=88=E6=9C=AC=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/StructureConfigStep.vue | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/components/CreateCodeStep/src/StructureConfigStep.vue b/src/components/CreateCodeStep/src/StructureConfigStep.vue
index d33e279..cc0b300 100644
--- a/src/components/CreateCodeStep/src/StructureConfigStep.vue
+++ b/src/components/CreateCodeStep/src/StructureConfigStep.vue
@@ -44,7 +44,7 @@
v-model:value="record.fieldName"
:placeholder="t(`请填写{title}`, { title: column.title })"
@change="changeComponentName(record, 'field')"
- :disabled="record.key === 'rule_user_id'"
+ :disabled="record.key === 'rule_user_id' || record.key === 'data_version'"
/>
@@ -58,7 +58,7 @@
@@ -558,11 +558,24 @@
showActionButtonGroup: false,
});
onMounted(() => {
- const { outputConfig } = generatorConfig!;
+ const { outputConfig,tableStructureConfigs} = generatorConfig!;
if (
!isCustomForm &&
(outputConfig?.className || outputConfig?.comment || outputConfig?.outputArea)
) {
+ if(tableStructureConfigs && tableStructureConfigs.length > 0){
+ let tableConf = tableStructureConfigs[0];
+ let hasVersion = tableConf.tableFieldConfigs.some((item) => item.key=='data_version');
+ if(!hasVersion){
+ tableConf.tableFieldConfigs.push({
+ key: 'data_version',
+ fieldName: 'dataVersion',
+ fieldLength: 10,
+ fieldType: 0,
+ fieldComment: t('数据版本'),
+ });
+ }
+ }
setFieldsValue({
className: outputConfig?.className,
comment: outputConfig?.comment,