Browse Source

fix(web-vue): 修复表格自定义列在部分字段不生效问题

- 在自定义表格组件中,将 dataIndex 的值转换为字符串,以确保所有字段都能正确处理
- 更新 CHANGELOG-BETA.md,添加修复表格自定义列问题的记录
bwcx_jzy 3 tháng trước cách đây
mục cha
commit
cd01f8c9d1
2 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 1 0
      CHANGELOG-BETA.md
  2. 2 2
      web-vue/src/components/customTable/index.vue

+ 1 - 0
CHANGELOG-BETA.md

@@ -11,6 +11,7 @@
 1. 【server】优化 数据库表支持配置前缀 `jpom.db.table-prefix` (感谢@ccx2480)
 2. 【server】修复 终端输入命令,按Backspace 会退出终端(感谢[@dgs](https://gitee.com/dgs0924) [Gitee issues ICA57K](https://gitee.com/dromara/Jpom/issues/ICA57K) )
 3. 【server】优化 脚本日志和 SSH 命令日志支持批量删除(感谢[@lin_yeqi](https://gitee.com/lin_yeqi) [Gitee issues IBIM6W](https://gitee.com/dromara/Jpom/issues/IBIM6W) )
+4. 【server】修复 表格自定义列在部分字段不生效情况
 
 ------
 

+ 2 - 2
web-vue/src/components/customTable/index.vue

@@ -91,7 +91,7 @@
                           >
                             <VerticalLeftOutlined v-if="!!item.fixed" class="custom-column-list__icon" />
                             <HolderOutlined v-else class="custom-column-list__icon" />
-                            <a-checkbox :value="item.dataIndex" :disabled="!!item.fixed">
+                            <a-checkbox :value="String(item.dataIndex)" :disabled="!!item.fixed">
                               {{ item.title }}
                             </a-checkbox>
                             <a-divider style="margin: 2px 0" />
@@ -377,7 +377,7 @@ export default defineComponent({
           storageService.setColumnConfig(
             customColumnList.value.map((item) => {
               return {
-                key: item.dataIndex,
+                key: String(item.dataIndex),
                 checked: item.checked
               } as CatchStorageType
             })