From 4453a9e63e8e176c70c432b03fd4ba3ebf00a04c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 09 二月 2023 14:55:20 +0800 Subject: [PATCH] 2023-02-09 --- src/menu/components/card/cardcellcomponent/index.jsx | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx index f3d2af6..454f5a9 100644 --- a/src/menu/components/card/cardcellcomponent/index.jsx +++ b/src/menu/components/card/cardcellcomponent/index.jsx @@ -155,7 +155,7 @@ _style.float = element.wrapStyle.textAlign || 'left' } } else if (element.eleType === 'picture') { - options = ['border', 'margin'] + options = ['background', 'border', 'margin'] } else if (element.eleType === 'color') { options = ['border', 'margin', 'padding'] } else if (element.eleType === 'text') { @@ -173,7 +173,7 @@ card: element }) - MKEmitter.emit('changeStyle', options, _style, this.getStyle) + MKEmitter.emit('changeStyle', options, _style, this.getStyle, 'mk-' + element.eleType) } getStyle = (style) => { @@ -242,6 +242,9 @@ _card.wrapStyle = {textAlign: style.float} delete _card.style.float } + } else if (_card.eleType === 'picture') { + _card.style = style + delete _card.style.backgroundImage } else { _card.style = style } @@ -402,6 +405,8 @@ } res.innerHeight = res.barHeight + (res.displayValue === 'true' ? fontSize + 2 : 0) + } else if (res.eleType === 'picture') { + delete res.style.backgroundImage } return res -- Gitblit v1.8.0