瀏覽代碼

优化前端模板不显示主键编号

SpringSunYY 4 月之前
父節點
當前提交
023fbccecf
共有 2 個文件被更改,包括 2 次插入4 次删除
  1. 1 2
      ruoyi_generator/vm/vue/index-tree.vue.vm
  2. 1 2
      ruoyi_generator/vm/vue/index.vue.vm

+ 1 - 2
ruoyi_generator/vm/vue/index-tree.vue.vm

@@ -135,8 +135,7 @@
 {%- set comment = comment.split('(')[0] %}
 {%- endif %}
 {%- endif %}
-  {%- if column.is_pk == '1' %}
-  {%- elif column.is_list and column.list_index is not none and column.html_type == 'datetime' %}
+  {%- if column.is_list and column.list_index is not none and column.html_type == 'datetime' %}
       <el-table-column label="{{ comment }}" align="center" v-if="columns[{{ column.list_index }}].visible" prop="{{ java_field }}" width="180">
         <template slot-scope="scope">
           <span>{{ "{{ parseTime(scope.row." }}{{ java_field }}{{ ", '{y}-{m}-{d}') }}" }}</span>

+ 1 - 2
ruoyi_generator/vm/vue/index.vue.vm

@@ -114,8 +114,7 @@
       {%- set comment = comment.split('(')[0] %}
       {%- endif %}
       {%- endif %}
-      {%- if column.is_pk == '1' %}
-      {%- elif column.is_list and column.list_index is not none and column.html_type == 'datetime' %}
+      {%- if column.is_list and column.list_index is not none and column.html_type == 'datetime' %}
       <el-table-column label="{{ comment }}" align="center" v-if="columns[{{ column.list_index }}].visible" prop="{{ java_field }}" width="180">
         <template slot-scope="scope">
           <span>{{ "{{ parseTime(scope.row." }}{{ java_field }}{{ ", '{y}-{m}-{d}') }}" }}</span>