From 6f2b0cab4c9a4dacfebb2d6fbd4ec2fdc14e22ba Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 29 四月 2024 15:29:58 +0800 Subject: [PATCH] 2024-04-29 --- src/utils/utils-custom.js | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js index 0bbb449..841817d 100644 --- a/src/utils/utils-custom.js +++ b/src/utils/utils-custom.js @@ -576,7 +576,16 @@ return cell }) } - } else if (item.type === 'table' && item.cols) { + } else if (item.type === 'table') { + if (item.supNodes && item.supNodes.length > 0) { + item.supNodes = item.supNodes.map(cell => { + cell.nodes = cell.nodes.map(n => md5(commonId + n)) + cell.componentId = cell.nodes[cell.nodes.length - 1] + + return cell + }) + } + let loopCol = (cols) => { return cols.map(col => { if (col.type === 'action') { @@ -614,7 +623,7 @@ }) } - item.cols = loopCol(item.cols) + item.cols = loopCol(item.cols || []) if (item.colsCtrls) { item.colsCtrls = item.colsCtrls.map(col => { @@ -882,7 +891,7 @@ return cell }) } - } else if (item.type === 'table' && item.cols) { + } else if (item.type === 'table') { let loopCol = (cols) => { return cols.map(col => { if (col.type === 'action') { @@ -923,7 +932,7 @@ }) } - item.cols = loopCol(item.cols) + item.cols = loopCol(item.cols || []) if (item.colsCtrls) { item.colsCtrls = item.colsCtrls.map(col => { @@ -1711,7 +1720,7 @@ } else if (!card.setting.supModule) { errors.push({ level: 0, detail: '鏈缃笂绾х粍浠讹紒'}) } - } else if (card.type === 'card' && card.subtype === 'datacard') { // 鏁版嵁鍗★紝鍙兘鏈夊涓婄骇 + } else if ((card.type === 'card' && card.subtype === 'datacard') || card.subtype === 'normaltable') { // 鏁版嵁鍗°�乼able锛屽彲鑳芥湁澶氫笂绾� if (card.wrap.supType !== 'multi' && !card.setting.supModule) { errors.push({ level: 0, detail: '鏈缃笂绾х粍浠讹紒'}) } -- Gitblit v1.8.0