From 0eb129a9beddbb86ae74d7106a8e60823206b8d5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 14 十二月 2023 11:29:15 +0800 Subject: [PATCH] 2023-12-14 --- src/menu/components/card/cardcellcomponent/index.jsx | 43 +++++++++++++++++++++++++++++-------------- 1 files changed, 29 insertions(+), 14 deletions(-) diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx index 3495c10..5460326 100644 --- a/src/menu/components/card/cardcellcomponent/index.jsx +++ b/src/menu/components/card/cardcellcomponent/index.jsx @@ -311,7 +311,7 @@ } } - let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, cards.uuid, supId) + let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, cards.uuid, supId, true) if (cards.subtype === 'basetable') { this.setState({ @@ -449,21 +449,36 @@ res.style = {} } } else if (res.class !== cell.class || res.show !== cell.show || !res.style) { - let cl = res.class.replace('border-', '') - let style = {} - if (res.class === 'default') { - style.color = 'rgba(0, 0, 0, 0.65)' - style.backgroundColor = '#fff' - style.borderColor = '#d9d9d9' - } else if (res.class.indexOf('border') > -1) { - style.color = color[cl] - style.backgroundColor = '#fff' - style.borderColor = color[cl] + if (res.class) { + let cl = res.class.replace('border-', '') + let style = {} + if (res.class === 'default') { + style.color = 'rgba(0, 0, 0, 0.65)' + style.backgroundColor = 'transparent' + style.borderColor = '#d9d9d9' + } else if (res.class.indexOf('border') > -1) { + style.color = color[cl] + style.backgroundColor = 'transparent' + style.borderColor = color[cl] + } else { + style.color = '#ffffff' + style.backgroundColor = color[cl] + } + res.style = {...res.style, ...style} } else { - style.color = '#ffffff' - style.backgroundColor = color[cl] + res.style = res.style || {} } - res.style = {...res.style, ...style} + } + + if (res.width === 0 && cell.width !== 0) { + res.style = res.style || {} + + res.style.paddingLeft = '15px' + res.style.paddingRight = '15px' + res.style.marginRight = '15px' + res.style.width = 'auto' + + delete res.style.marginLeft } res.updateTime = moment().format('YYYY-MM-DD HH:mm') -- Gitblit v1.8.0