From f128d679cacda2a6b5b730ad0368b5fe73f887f7 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 14 二月 2025 15:27:02 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/menu/components/card/balcony/index.jsx | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/menu/components/card/balcony/index.jsx b/src/menu/components/card/balcony/index.jsx index c1bef15..ea5e4c1 100644 --- a/src/menu/components/card/balcony/index.jsx +++ b/src/menu/components/card/balcony/index.jsx @@ -143,6 +143,11 @@ card.$tables = getTables(card) } + delete card.$c_ds + delete card.$c_ac + delete card.$c_sc + delete card.$c_el + this.setState({ card: card }) @@ -160,8 +165,17 @@ changeStyle = () => { const { card } = this.state + let options = ['width', 'height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight', 'position', 'transform'] - MKEmitter.emit('changeStyle', ['width', 'height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight', 'position', 'transform'], card.style, this.getStyle) + if (card.style && !card.style.width) { + if (card.style.height) { + options = ['height', 'width', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight', 'position', 'transform'] + } else if (card.style.position && ['fixed', 'absolute'].includes(card.style.position)) { + options = ['position', 'width', 'height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight', 'transform'] + } + } + + MKEmitter.emit('changeStyle', options, card.style, this.getStyle) } getStyle = (style) => { @@ -277,7 +291,7 @@ let _style = resetStyle(card.style) return ( - <div className="menu-balcony-edit-box" style={_style} id={card.uuid}> + <div className={'menu-balcony-edit-box' + (['fixed', 'absolute'].includes(_style.position) ? ' ctrl-position' : '')} style={_style} id={card.uuid}> {card.style.height ? <ColumnHeightOutlined className="fixed-height" title="瀹氶珮" /> : null} <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> -- Gitblit v1.8.0