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,