From 7ec82053855cf041ab2357a3b8c1684fcc6cc061 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 04 三月 2023 00:41:17 +0800 Subject: [PATCH] 2023-03-04 --- src/tabviews/custom/popview/index.jsx | 41 +++++++++++++++++++++++++++++++++++------ 1 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx index a3970b8..496f920 100644 --- a/src/tabviews/custom/popview/index.jsx +++ b/src/tabviews/custom/popview/index.jsx @@ -395,6 +395,14 @@ cell.style = {...cell.style, ...cell.btnstyle} } + if (cell.controlField) { + if (/,/ig.test(cell.controlVal)) { + cell.controlVals = cell.controlVal.split(',') + } else { + cell.controlVals = [(cell.controlVal || '')] + } + } + return true }) } @@ -424,9 +432,12 @@ cell.execSuccess = 'mainline' } } - if (card.btnstyle) { // 鍏煎 - card.style = card.style || {} - card.style = {...card.style, ...card.btnstyle} + if (cell.controlField) { + if (/,/ig.test(cell.controlVal)) { + cell.controlVals = cell.controlVal.split(',') + } else { + cell.controlVals = [(cell.controlVal || '')] + } } } else if (['text', 'number', 'formula'].includes(cell.eleType)) { if (!cell.height) { @@ -462,9 +473,12 @@ } } - if (card.btnstyle) { // 鍏煎 - card.style = card.style || {} - card.style = {...card.style, ...card.btnstyle} + if (cell.controlField) { + if (/,/ig.test(cell.controlVal)) { + cell.controlVals = cell.controlVal.split(',') + } else { + cell.controlVals = [(cell.controlVal || '')] + } } } else if (['text', 'number', 'formula'].includes(cell.eleType)) { if (!cell.height) { @@ -504,6 +518,13 @@ cell.execSuccess = 'mainline' } } + if (cell.controlField) { + if (/,/ig.test(cell.controlVal)) { + cell.controlVals = cell.controlVal.split(',') + } else { + cell.controlVals = [(cell.controlVal || '')] + } + } } else if (['text', 'number', 'formula'].includes(cell.eleType)) { if (!cell.height) { cell.innerHeight = 'auto' @@ -542,6 +563,14 @@ cell.style = {...cell.style, ...cell.btnstyle} } + if (cell.controlField) { + if (/,/ig.test(cell.controlVal)) { + cell.controlVals = cell.controlVal.split(',') + } else { + cell.controlVals = [(cell.controlVal || '')] + } + } + return true }) return col.elements.length !== 0 -- Gitblit v1.8.0