From c2580fb8de3bdaabb4179b0ce0fcd2fbac802441 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 01 三月 2023 00:49:14 +0800 Subject: [PATCH] 2023-03-01 --- src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx | 28 ++++++++++++++++++++++++---- 1 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx index bd69d85..6120716 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx @@ -14,7 +14,8 @@ roleList = [] } - if (['picture', 'link', 'colspan'].includes(card.type)) { + // if (['picture', 'link', 'colspan'].includes(card.type)) { + if (['picture', 'link'].includes(card.type)) { card.type = 'text' } @@ -31,8 +32,11 @@ value: 'custom', text: '鑷畾涔夊垪' }, { - value: 'action', - text: '鎿嶄綔' + value: 'colspan', + text: '鍚堝苟鍒�' + // }, { + // value: 'action', + // text: '鎿嶄綔' }, { value: 'formula', text: '鍏紡' @@ -40,6 +44,13 @@ value: 'index', text: '搴忓彿' }] + + if (!card.isSub) { + options.push({ + value: 'action', + text: '鎿嶄綔' + }) + } let editCols = [ { @@ -60,6 +71,15 @@ editCols.push({ field: col.uuid, label: col.label + }) + } else if (col.type === 'colspan') { + col.subcols.forEach(subcol => { + if (subcol.editable === 'true' && subcol.uuid !== card.uuid) { + editCols.push({ + field: subcol.uuid, + label: col.label + '-' + subcol.label + }) + } }) } }) @@ -116,7 +136,7 @@ type: 'radio', key: 'IsSort', label: '鎺掑簭', - initVal: card.IsSort || 'false', + initVal: card.IsSort || (card.isSub ? 'false' : 'true'), required: true, options: [{ value: 'true', -- Gitblit v1.8.0