From 0a98c5dab4f2783ff5250cb69715340b40d801bb Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 05 四月 2023 18:23:08 +0800
Subject: [PATCH] 2023-04-05

---
 src/menu/components/card/cardcellcomponent/index.jsx |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx
index 9909995..7826ab9 100644
--- a/src/menu/components/card/cardcellcomponent/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/index.jsx
@@ -361,6 +361,13 @@
     const { elements } = this.state
 
     this.elementFormRef.handleConfirm().then(res => {
+      if (res.width % 0.5) {
+        res.width = parseInt(res.width / 0.5) * 0.5
+      }
+      if (res.width % 1) {
+        res.width = (res.width + '').replace(/.5/, 'x')
+      }
+
       let _elements = elements.map(cell => {
         if (cell.uuid === res.uuid) {
           res.style = cell.style || {}
@@ -744,7 +751,7 @@
     const { elements, visible, actvisible, profVisible, card, record } = this.state
 
     return (
-      <div className="model-menu-card-cell-list">
+      <div className={'model-menu-card-cell-list ' + (cardCell && cardCell.setting.layout === 'flex' ? 'mk-flex' : '') }>
         <DragElement
           list={elements}
           parent={cardCell}

--
Gitblit v1.8.0