From 496bf836a5560bc2e2f67b1e2f38fc01c9274906 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 30 四月 2024 01:58:49 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/menu/components/table/edit-table/index.jsx | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/menu/components/table/edit-table/index.jsx b/src/menu/components/table/edit-table/index.jsx index e005989..b4e2f7f 100644 --- a/src/menu/components/table/edit-table/index.jsx +++ b/src/menu/components/table/edit-table/index.jsx @@ -297,6 +297,18 @@ config.absFields = [] config.mergeCol = false + let mapCol = (cols) => { + cols.forEach(col => { + if (col.type === 'number') { + if (col.format === 'abs') { + config.absFields.push(col.field) + } + } else if (col.type === 'colspan' && col.subcols) { + mapCol(col.subcols) + } + }) + } + config.cols.forEach((col, index) => { delete col.pops @@ -305,13 +317,7 @@ config.absFields.push(col.field) } } else if (col.type === 'colspan' && col.subcols) { - col.subcols.forEach(scol => { - if (scol.type === 'number') { - if (scol.format === 'abs') { - config.absFields.push(scol.field) - } - } - }) + mapCol(col.subcols) } else if (col.type === 'text') { if (col.editable === 'true' && col.editType === 'popSelect' && /^tab:/.test(col.initval)) { config.mergeCol = config.mergeCol || [] -- Gitblit v1.8.0