From 2e3d8e7d5715862733e43070e7df73b48a81948f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 28 七月 2021 23:49:55 +0800
Subject: [PATCH] 2021-07-28

---
 src/menu/components/card/data-card/index.jsx |   41 ++++++++++++++++++++++++-----------------
 1 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx
index 9a7931d..cb8b128 100644
--- a/src/menu/components/card/data-card/index.jsx
+++ b/src/menu/components/card/data-card/index.jsx
@@ -194,6 +194,7 @@
    * @description 鍗曚釜鍗$墖淇℃伅鏇存柊
    */
   deleteCard = (cell) => {
+    const { appType } = this.state
     let card = fromJS(this.state.card).toJS()
     let _this = this
 
@@ -202,25 +203,31 @@
       onOk() {
         card.subcards = card.subcards.filter(item => item.uuid !== cell.uuid)
 
-        let uuids = []
-        cell.elements && cell.elements.forEach(c => {
-          if (c.eleType === 'button') {
-            uuids.push(c.uuid)
-          }
-        })
-        cell.backElements && cell.backElements.forEach(c => {
-          if (c.eleType === 'button') {
-            uuids.push(c.uuid)
-          }
-        })
-        MKEmitter.emit('delButtons', uuids)
-
         if (card.btnlog) {
           card.btnlog = card.btnlog.filter(c => c.$parentId !== cell.uuid)
         }
 
         _this.setState({card})
         _this.props.updateConfig(card)
+
+        if (appType === 'mob') return
+
+        let uuids = []
+
+        cell.elements && cell.elements.forEach(c => {
+          if (c.eleType !== 'button' || (appType === 'pc' && c.OpenType !== 'popview')) return
+
+          uuids.push(c.uuid)
+        })
+        cell.backElements && cell.backElements.forEach(c => {
+          if (c.eleType !== 'button' || (appType === 'pc' && c.OpenType !== 'popview')) return
+
+          uuids.push(c.uuid)
+        })
+
+        if (uuids.length === 0) return
+        
+        MKEmitter.emit('delButtons', uuids)
       },
       onCancel() {}
     })
@@ -229,7 +236,7 @@
   changeStyle = () => {
     const { card } = this.state
 
-    MKEmitter.emit('changeStyle', [card.uuid], ['background', 'border', 'padding', 'margin'], card.style)
+    MKEmitter.emit('changeStyle', [card.uuid], ['background', 'border', 'padding', 'margin', 'shadow'], card.style)
   }
 
   getStyle = (comIds, style) => {
@@ -294,20 +301,20 @@
   }
 
   setSubConfig = (item) => {
-    const { card } = this.state
+    const { card, appType } = this.state
     let btn = fromJS(item).toJS()
 
     if (btn.OpenType === 'pop' || btn.execMode === 'pop') {
       if (!btn.modal) {
         btn.modal = {
-          setting: { title: btn.label, width: 60, cols: '2', container: 'view', focus: '', finish: 'close', clickouter: 'unclose', display: 'modal' },
+          setting: { title: btn.label, width: appType === 'mob' ? 100 : 60, cols: '2', container: 'view', focus: '', finish: 'close', clickouter: 'unclose', display: 'modal' },
           tables: [],
           groups: [],
           fields: []
         }
       }
       MKEmitter.emit('changeModal', card, btn)
-    } else if (btn.OpenType === 'popview') {
+    } else if (btn.OpenType === 'popview' && appType !== 'mob') {
       MKEmitter.emit('changePopview', card, btn)
     }
   }

--
Gitblit v1.8.0