From 50955551f7aebd3f664d3840ded3d1cb4aed3beb Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 07 二月 2025 17:54:52 +0800
Subject: [PATCH] 2025-02-07

---
 src/menu/components/card/balcony/index.jsx |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/menu/components/card/balcony/index.jsx b/src/menu/components/card/balcony/index.jsx
index c1bef15..06c6691 100644
--- a/src/menu/components/card/balcony/index.jsx
+++ b/src/menu/components/card/balcony/index.jsx
@@ -160,8 +160,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 +286,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