From 20fda7434c88eae3237399a008f6ae0db50d0eab Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 15 九月 2022 19:12:29 +0800
Subject: [PATCH] 2022-09-15

---
 src/menu/components/card/cardcomponent/index.jsx |   18 ++++--------------
 1 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/src/menu/components/card/cardcomponent/index.jsx b/src/menu/components/card/cardcomponent/index.jsx
index 624eb32..0ead6f4 100644
--- a/src/menu/components/card/cardcomponent/index.jsx
+++ b/src/menu/components/card/cardcomponent/index.jsx
@@ -119,7 +119,6 @@
   }
   
   addElement = () => {
-    const { cards } = this.props
     const { card } = this.state
 
     let newcard = {}
@@ -131,11 +130,10 @@
     newcard.height = 1
 
     // 娉ㄥ唽浜嬩欢-娣诲姞鍏冪礌
-    MKEmitter.emit('cardAddElement', [cards.uuid, card.uuid], newcard)
+    MKEmitter.emit('cardAddElement', card.uuid, newcard)
   }
 
   addButton = () => {
-    const { cards } = this.props
     const { card } = this.state
 
     let newcard = {eleType: 'button', label: 'button', verify: null, show: 'link', sqlType: '', Ot: 'requiredSgl', OpenType: 'prompt', icon: '', class: 'primary', intertype: 'system', execSuccess: 'grid', execError: 'never', popClose: 'never'}
@@ -143,7 +141,7 @@
     newcard.focus = true
 
     // 娉ㄥ唽浜嬩欢-娣诲姞鍏冪礌
-    MKEmitter.emit('cardAddElement', [cards.uuid, card.uuid], newcard)
+    MKEmitter.emit('cardAddElement', card.uuid, newcard)
   }
 
   changeStyle = () => {
@@ -235,7 +233,6 @@
   }
 
   paste = (element, resolve) => {
-    const { cards } = this.props
     const { card } = this.state
 
     let _uuid = Utils.getuuid()
@@ -256,14 +253,7 @@
     resolve({status: true})
 
     // 娉ㄥ唽浜嬩欢-娣诲姞鍏冪礌
-    MKEmitter.emit('cardAddElement', [cards.uuid, card.uuid], element)
-  }
-
-  clickComponent = (e) => {
-    if ((sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'propcard') && this.props.cards.subtype === 'propcard') {
-      e.stopPropagation()
-      MKEmitter.emit('clickComponent', this.state.card, this.props.cards, 'propcard')
-    }
+    MKEmitter.emit('cardAddElement', card.uuid, element)
   }
 
   doubleClickCard = () => {
@@ -329,7 +319,7 @@
 
     return (
       <Col span={card.setting.width || 6}>
-        <div className={'card-item ' + (card.setting.btnControl || '')} style={_style} onClick={this.clickComponent} onDoubleClick={(e) => {e.stopPropagation(); this.doubleClickCard()}} id={card.uuid}>
+        <div className={'card-item ' + (card.setting.btnControl || '')} style={_style} onDoubleClick={(e) => {e.stopPropagation(); this.doubleClickCard()}} id={card.uuid}>
           <CardCellComponent cards={cards} cardCell={card} side={side} elements={elements} updateElement={this.updateCard}/>
           <div className="card-control" onDoubleClick={(e) => e.stopPropagation()}>
             <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={

--
Gitblit v1.8.0