From f0bf8c399c354c22227f8f1a76ed806098db59c0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 21 五月 2024 16:51:02 +0800 Subject: [PATCH] 2024-05-21 --- src/menu/components/table/edit-table/index.jsx | 32 +++++++++++++++++++++++++------- 1 files changed, 25 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..b6bfbee 100644 --- a/src/menu/components/table/edit-table/index.jsx +++ b/src/menu/components/table/edit-table/index.jsx @@ -296,6 +296,25 @@ updatecolumn = (config) => { config.absFields = [] config.mergeCol = false + config.hasExtend = false + config.parCtrl = false + + let mapCol = (cols) => { + cols.forEach(col => { + if (col.type === 'number') { + if (col.format === 'abs') { + config.absFields.push(col.field) + } + } else if (col.type === 'extend') { + config.hasExtend = true + if (col.supField) { + config.parCtrl = true + } + } else if (col.type === 'colspan' && col.subcols) { + mapCol(col.subcols) + } + }) + } config.cols.forEach((col, index) => { delete col.pops @@ -304,14 +323,13 @@ if (col.format === 'abs') { config.absFields.push(col.field) } + } else if (col.type === 'extend') { + config.hasExtend = true + if (col.supField) { + config.parCtrl = true + } } 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