From 007076986488fc165c2d0bb67bde3e05dee15d06 Mon Sep 17 00:00:00 2001 From: zhangtao <9480807882@qq.com> Date: Thu, 27 Nov 2025 00:10:18 +0800 Subject: [PATCH] =?UTF-8?q?refactor(vue=E6=A8=A1=E6=9D=BF):=20=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E4=BD=BF=E7=94=A8column=5Fname=E6=9B=BF=E4=BB=A3pytho?= =?UTF-8?q?n=5Ffield=E4=BD=9C=E4=B8=BA=E5=AD=97=E6=AE=B5=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改vue模板文件,将所有使用python_field的地方替换为column_name,保持字段命名一致性 --- .../gencode/templates/vue/index.vue.j2 | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/backend/app/api/v1/module_generator/gencode/templates/vue/index.vue.j2 b/backend/app/api/v1/module_generator/gencode/templates/vue/index.vue.j2 index eeb43bf5..16e233b8 100644 --- a/backend/app/api/v1/module_generator/gencode/templates/vue/index.vue.j2 +++ b/backend/app/api/v1/module_generator/gencode/templates/vue/index.vue.j2 @@ -10,24 +10,24 @@ {% set parentheseIndex = column_comment.find("(") %} {% set comment = column_comment[:parentheseIndex] if parentheseIndex != -1 else column_comment %} {% if column.html_type == "input" %} - - + + {% elif (column.html_type == "select" or column.html_type == "radio") and dict_type != "" %} - - + + {% elif (column.html_type == "select" or column.html_type == "radio") and dict_type %} - - + + {% elif column.html_type == "datetime" and column.query_type != "BETWEEN" %} - - + + {% endif %} {% endif %} @@ -155,7 +155,7 @@ {% for column in columns %} - {% set python_field = column.python_field %} + {% set python_field = column.column_name %} {% set column_comment = column.column_comment if column.column_comment else '' %} {% set parentheseIndex = column_comment.find("(") %} {% set comment = column_comment[:parentheseIndex] if parentheseIndex != -1 else column_comment %} @@ -194,7 +194,7 @@