From 5d1e5dc9b248f91b33105dc838200af07947cdb2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 04 一月 2022 18:07:40 +0800
Subject: [PATCH] 2022-01-04

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

diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx
index ddfe3a1..8239471 100644
--- a/src/menu/components/card/cardcellcomponent/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/index.jsx
@@ -145,7 +145,11 @@
     let options = ['font', 'border', 'padding', 'margin', 'background']
 
     if (element.eleType === 'button') {
-      options.push('width', 'float')
+      if (element.OpenType === 'form') {
+        options = ['margin', 'float']
+      } else {
+        options.push('width', 'float')
+      }
     } else if (element.eleType === 'picture') {
       options = ['border', 'margin']
     } else if (element.eleType === 'slider') {
@@ -406,9 +410,13 @@
           }
           
           delete res.focus
-          let style = {}
 
-          if (res.class !== cell.class || res.show !== cell.show || !res.style) {
+          if (res.OpenType === 'form') {
+            if (cell.OpenType !== 'form') {
+              res.style = {}
+            }
+          } else if (res.class !== cell.class || res.show !== cell.show || !res.style) {
+            let style = {}
             if (res.show === 'link' || res.show === 'icon') {
               style.color = color[res.class]
               style.backgroundColor = 'transparent'
@@ -416,8 +424,8 @@
               style.color = '#ffffff'
               style.backgroundColor = color[res.class]
             }
+            res.style = {...res.style, ...style}
           }
-          res.style = {...res.style, ...style}
 
           return res
         }

--
Gitblit v1.8.0