From f66e19dd13af07ee466306632ad43c72f1f16ae7 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 26 五月 2021 14:49:55 +0800
Subject: [PATCH] 2021-05-26

---
 src/tabviews/custom/components/card/prop-card/index.scss       |   22 ++++
 src/tabviews/custom/components/card/prop-card/index.jsx        |    9 +
 config/modules.js                                              |    2 
 src/menu/components/share/pastecomponent/index.jsx             |   30 +++++
 src/menu/components/card/cardcomponent/settingform/index.jsx   |   16 ++-
 src/menu/components/card/cardcellcomponent/index.jsx           |    6 
 src/menu/components/share/actioncomponent/formconfig.jsx       |    2 
 config/webpackDevServer.config.js                              |    2 
 src/menu/components/card/cardcomponent/index.jsx               |    4 
 src/menu/pastecontroller/index.jsx                             |    8 +
 src/menu/components/card/cardcomponent/settingform/index.scss  |    5 
 src/menu/components/card/data-card/index.jsx                   |   26 +++++
 src/menu/components/share/actioncomponent/index.jsx            |    2 
 config/env.js                                                  |    2 
 config/paths.js                                                |    2 
 src/menu/components/card/cardcellcomponent/formconfig.jsx      |   24 +++-
 src/menu/components/share/actioncomponent/actionform/index.jsx |    3 
 config/pnpTs.js                                                |    2 
 src/menu/components/table/normal-table/index.jsx               |    9 +
 src/tabviews/custom/components/card/data-card/index.scss       |   22 ++++
 src/tabviews/custom/components/card/data-card/index.jsx        |   44 +++++++-
 21 files changed, 200 insertions(+), 42 deletions(-)

diff --git a/config/env.js b/config/env.js
index b0344c5..f8c5326 100644
--- a/config/env.js
+++ b/config/env.js
@@ -1,4 +1,4 @@
-'use strict';
+// 'use strict';
 
 const fs = require('fs');
 const path = require('path');
diff --git a/config/modules.js b/config/modules.js
index 46d9c9e..10c4374 100644
--- a/config/modules.js
+++ b/config/modules.js
@@ -1,4 +1,4 @@
-'use strict';
+// 'use strict';
 
 const fs = require('fs');
 const path = require('path');
diff --git a/config/paths.js b/config/paths.js
index f23c121..68fc8d7 100644
--- a/config/paths.js
+++ b/config/paths.js
@@ -1,4 +1,4 @@
-'use strict';
+// 'use strict';
 
 const path = require('path');
 const fs = require('fs');
diff --git a/config/pnpTs.js b/config/pnpTs.js
index d1b0539..6a3b546 100644
--- a/config/pnpTs.js
+++ b/config/pnpTs.js
@@ -1,4 +1,4 @@
-'use strict';
+// 'use strict';
 
 const { resolveModuleName } = require('ts-pnp');
 
diff --git a/config/webpackDevServer.config.js b/config/webpackDevServer.config.js
index 33ab8d3..a90fc24 100644
--- a/config/webpackDevServer.config.js
+++ b/config/webpackDevServer.config.js
@@ -1,4 +1,4 @@
-'use strict';
+// 'use strict';
 
 const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
 const evalSourceMapMiddleware = require('react-dev-utils/evalSourceMapMiddleware');
diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx
index 50b7ea0..7d9a8f4 100644
--- a/src/menu/components/card/cardcellcomponent/formconfig.jsx
+++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -4,11 +4,11 @@
 const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
 
 /**
- * @description 鑾峰彇鎸夐挳琛ㄥ崟閰嶇疆淇℃伅
- * @param {*} card           缂栬緫鎸夐挳
- * @param {*} type           鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡
+ * @description 鑾峰彇鍏冪礌閰嶇疆淇℃伅
+ * @param {*} card
+ * @param {*} type
  */
-export function getCardCellForm (card, type, subtype) {
+export function getCardCellForm (card, type, subtype, cardCell) {
   let _options = [
     { value: 'text', text: '鏂囨湰'},
     { value: 'number', text: '鏁板��'},
@@ -40,6 +40,17 @@
     } else {
       appMenus = []
     }
+  }
+
+  let dataTypes = [
+    { value: 'dynamic', text: '鍔ㄦ��' },
+    { value: 'static', text: '闈欐��' }
+  ]
+  if (cardCell.$cardType === 'extendCard') {
+    card.datatype = 'static'
+    dataTypes = [
+      { value: 'static', text: '闈欐��' }
+    ]
   }
 
   let forms = [
@@ -98,10 +109,7 @@
       label: '鏁版嵁绫诲瀷',
       initVal: card.datatype || 'static',
       required: true,
-      options: [
-        { value: 'dynamic', text: '鍔ㄦ��' },
-        { value: 'static', text: '闈欐��' }
-      ]
+      options: dataTypes
     },
     {
       type: 'select',
diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx
index cfa8777..f45ca80 100644
--- a/src/menu/components/card/cardcellcomponent/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/index.jsx
@@ -226,7 +226,7 @@
    * @description 鍏冪礌缂栬緫锛岃幏鍙栧厓绱犺〃鍗曚俊鎭�
    */
   handleElement = (card) => {
-    const { cards } = this.props
+    const { cards, cardCell } = this.props
 
     if (card.eleType === 'button') {
       this.handleAction(card)
@@ -234,7 +234,7 @@
       this.setState({
         visible: true,
         card: card,
-        formlist: getCardCellForm(card, cards.type, cards.subtype)
+        formlist: getCardCellForm(card, cards.type, cards.subtype, cardCell)
       })
     }
   }
@@ -469,7 +469,7 @@
     const { cards } = this.props
     let btn = fromJS(item).toJS()
 
-    if ((sessionStorage.getItem('style-control') && sessionStorage.getItem('style-control') !== 'false')) return
+    if ((sessionStorage.getItem('style-control') && sessionStorage.getItem('style-control') === 'true')) return
 
     if (btn.eleType === 'button') {
       if (btn.OpenType === 'pop') {
diff --git a/src/menu/components/card/cardcomponent/index.jsx b/src/menu/components/card/cardcomponent/index.jsx
index 2069058..79b4767 100644
--- a/src/menu/components/card/cardcomponent/index.jsx
+++ b/src/menu/components/card/cardcomponent/index.jsx
@@ -264,7 +264,7 @@
                 } trigger="hover" getPopupContainer={() => document.getElementById(card.uuid + 'swap')}>
                   <Icon type="swap" id={card.uuid + 'swap'}/>
                 </Popover> : null}
-                {cards.subtype === 'propcard' ? <Icon className="close" title="鍒犻櫎鍗$墖" type="delete" onClick={() => this.props.deleteElement(card)} /> : null}
+                {cards.subtype === 'propcard' || card.$cardType === 'extendCard' ? <Icon className="close" title="鍒犻櫎鍗$墖" type="delete" onClick={() => this.props.deleteElement(card)} /> : null}
                 {card.setting.type === 'multi' ? <Switch size="small" onClick={this.changeSide} defaultChecked /> : null}
               </div>
             } trigger="hover">
@@ -276,7 +276,7 @@
           wrapClassName="popview-modal"
           title={'鍗$墖璁剧疆'}
           visible={settingVisible}
-          width={700}
+          width={800}
           maskClosable={false}
           okText={dict['model.submit']}
           onOk={this.settingSubmit}
diff --git a/src/menu/components/card/cardcomponent/settingform/index.jsx b/src/menu/components/card/cardcomponent/settingform/index.jsx
index 393b797..6424977 100644
--- a/src/menu/components/card/cardcomponent/settingform/index.jsx
+++ b/src/menu/components/card/cardcomponent/settingform/index.jsx
@@ -81,7 +81,7 @@
     }
 
     return (
-      <div className="model-menu-setting-form">
+      <div className="model-menu-card-setting-form">
         <Form {...formItemLayout}>
           <Row gutter={24}>
             <Col span={12}>
@@ -155,14 +155,20 @@
               </Form.Item>
             </Col> : null}
             <Col span={12}>
-              <Form.Item label="鐐瑰嚮浜嬩欢">
+              <Form.Item label={
+                <Tooltip placement="topLeft" title="褰撻�夋嫨瑙﹀彂鎸夐挳鏃讹紝鍙湁褰撳崱鐗囦腑鍙瓨鍦ㄤ竴涓寜閽椂鏈夋晥銆�">
+                  <Icon type="question-circle" />
+                  鐐瑰嚮浜嬩欢
+                </Tooltip>
+              }>
                 {getFieldDecorator('click', {
                   initialValue: click
                 })(
-                  <Radio.Group onChange={(e) => this.setState({click: e.target.value})}>
+                  <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => this.setState({click: e.target.value})}>
                     <Radio value="">鏃�</Radio>
                     <Radio value="menu">鑿滃崟</Radio>
                     <Radio value="link">閾炬帴</Radio>
+                    <Radio value="button">鎸夐挳</Radio>
                   </Radio.Group>
                 )}
               </Form.Item>
@@ -217,7 +223,7 @@
                 })( <TextArea rows={2}/> )}
               </Form.Item>
             </Col> : null}
-            {appType === 'pc' ? <Col span={12}>
+            {appType === 'pc' && click !== '' && click !== 'button' ? <Col span={12}>
               <Form.Item label="鎵撳紑鏂瑰紡">
                 {getFieldDecorator('open', {
                   initialValue: setting.open || 'blank'
@@ -229,7 +235,7 @@
                 )}
               </Form.Item>
             </Col> : null}
-            {click !== '' ? <Col span={12}>
+            {click !== '' && click !== 'button' ? <Col span={12}>
               <Form.Item label="鍙傛暟鎷兼帴">
                 {getFieldDecorator('joint', {
                   initialValue: setting.joint || 'true'
diff --git a/src/menu/components/card/cardcomponent/settingform/index.scss b/src/menu/components/card/cardcomponent/settingform/index.scss
index 8898344..36d76eb 100644
--- a/src/menu/components/card/cardcomponent/settingform/index.scss
+++ b/src/menu/components/card/cardcomponent/settingform/index.scss
@@ -1,4 +1,4 @@
-.model-menu-setting-form {
+.model-menu-card-setting-form {
   position: relative;
 
   .anticon-question-circle {
@@ -16,4 +16,7 @@
       width: 84%;
     }
   }
+  .ant-radio-wrapper {
+    margin-right: 3px;
+  }
 }
\ No newline at end of file
diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx
index 30d870d..bff2965 100644
--- a/src/menu/components/card/data-card/index.jsx
+++ b/src/menu/components/card/data-card/index.jsx
@@ -376,6 +376,29 @@
     }
   }
 
+  addCard = () => {
+    let card = fromJS(this.state.card).toJS()
+
+    let newcard = {
+      uuid: Utils.getuuid(),
+      $cardType: 'extendCard',
+      setting: { width: 6, type: 'simple', click: 'button'},
+      style: {
+        borderWidth: '1px', borderColor: '#e8e8e8',
+        paddingTop: '15px', paddingBottom: '15px', paddingLeft: '15px', paddingRight: '15px',
+        marginLeft: '8px', marginRight: '8px', marginTop: '8px', marginBottom: '8px'
+      },
+      backStyle: {},
+      elements: [],
+      backElements: []
+    }
+
+    card.subcards.push(newcard)
+    
+    this.setState({card})
+    this.props.updateConfig(card)
+  }
+
   clickComponent = (e) => {
     if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
       e.stopPropagation()
@@ -404,11 +427,12 @@
         <NormalHeader defaultshow="hidden" config={card} updateComponent={this.updateComponent}/>
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
+            {appType !== 'mob' ? <Icon className="plus" title="娣诲姞鍗$墖" onClick={this.addCard} type="plus" /> : null}
             {appType !== 'mob' ? <Icon className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch} type="plus-circle" /> : null}
             <Icon className="plus" title="娣诲姞鎸夐挳" onClick={this.addButton} type="plus-square" />
             <WrapComponent config={card} updateConfig={this.updateComponent} />
             <CopyComponent type="datacard" card={card}/>
-            <PasteComponent config={card} options={['action', 'search', 'form']} updateConfig={this.updateComponent} />
+            <PasteComponent config={card} options={['action', 'search', 'form', 'cardcell']} updateConfig={this.updateComponent} />
             <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" />
             <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} />
             <UserComponent config={card}/>
diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx
index 149c52b..ba4c550 100644
--- a/src/menu/components/share/actioncomponent/actionform/index.jsx
+++ b/src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -138,7 +138,7 @@
   }
 
   getOptions = (_opentype, _intertype, _funcType, _pageTemplate, _procMode) => {
-    let _options = fromJS(actionTypeOptions[_opentype]).toJS() // 閫夐」鍒楄〃
+    let _options = actionTypeOptions[_opentype] ? fromJS(actionTypeOptions[_opentype]).toJS() : [] // 閫夐」鍒楄〃
     
     if (_opentype === 'innerpage') {         // 鏂伴〉闈紝鍙�夋ā鏉�(鑷畾涔夋椂锛屽彲濉叆澶栭儴閾炬帴)
       if (_pageTemplate === 'custom') {
@@ -523,7 +523,6 @@
               })(
                 <Select
                   showSearch
-                  allowClear
                   filterOption={(input, option) => option.props.children[2].toLowerCase().indexOf(input.toLowerCase()) >= 0}
                   onChange={(value) => {this.optionChange(item.key, value)}}
                   getPopupContainer={() => document.getElementById('winter')}
diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index fbf2524..1259cd5 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -49,7 +49,7 @@
     { value: 'pay', text: Formdict['model.pay'] },
     { value: 'custom', text: Formdict['header.form.custom'] }
   ]
-  const isApp = sessionStorage.getItem('appType') === 'pc'
+  const isApp = ['pc', 'mob'].includes(sessionStorage.getItem('appType'))
 
   let funTypes = [
     { value: 'changeuser', text: Formdict['header.form.func.changeuser'] },
diff --git a/src/menu/components/share/actioncomponent/index.jsx b/src/menu/components/share/actioncomponent/index.jsx
index 7de5d31..d9483e6 100644
--- a/src/menu/components/share/actioncomponent/index.jsx
+++ b/src/menu/components/share/actioncomponent/index.jsx
@@ -404,7 +404,7 @@
    * @description 鎸夐挳鍙屽嚮瑙﹀彂瀛愰厤缃�
    */
   btnDoubleClick = (element) => {
-    if (sessionStorage.getItem('style-control') && sessionStorage.getItem('style-control') !== 'false') return
+    if (sessionStorage.getItem('style-control') && sessionStorage.getItem('style-control') === 'true') return
     
     if (element.OpenType === 'pop' || element.OpenType === 'popview' || element.execMode === 'pop') {
       this.props.setSubConfig(element)
diff --git a/src/menu/components/share/pastecomponent/index.jsx b/src/menu/components/share/pastecomponent/index.jsx
index 85be01c..e9c8bf3 100644
--- a/src/menu/components/share/pastecomponent/index.jsx
+++ b/src/menu/components/share/pastecomponent/index.jsx
@@ -24,7 +24,7 @@
     this.setState({visible: true})
   }
 
-  resetconfig = (item, copyBtns) => {
+  resetconfig = (item, copyBtns, config) => {
     let _uuid = Utils.getuuid()
 
     if (item.OpenType === 'popview') {
@@ -38,9 +38,33 @@
       item.uuid = _uuid
     }
 
-    if (item.copyType === 'cardcell') {
+    if (item.copyType === 'cardcell' && config.subtype === 'datacard') {
+      item.setting = item.setting || {}
+      item.$cardType = 'extendCard'
+      item.setting.width = item.setting.width || 6
+
+      if (item.elements) {
+        item.elements = item.elements.map(cell => {
+          if (cell.datatype === 'dynamic') {
+            cell.datatype = 'static'
+          }
+          cell.uuid = Utils.getuuid()
+          return cell
+        })
+      }
+      if (item.backElements) {
+        item.backElements = item.backElements.map(cell => {
+          if (cell.datatype === 'dynamic') {
+            cell.datatype = 'static'
+          }
+          cell.uuid = Utils.getuuid()
+          return cell
+        })
+      }
+    } else if (item.copyType === 'cardcell') {
       item.setting = item.setting || {}
       item.setting.width = item.setting.width || 6
+      delete item.$cardType
 
       if (item.elements) {
         item.elements = item.elements.map(cell => {
@@ -114,7 +138,7 @@
       let config = fromJS(this.props.config).toJS()
       let copyBtns = new Map()
 
-      res = this.resetconfig(res, copyBtns)
+      res = this.resetconfig(res, copyBtns, config)
       delete res.copyType
 
       copyBtns = [...copyBtns.values()]
diff --git a/src/menu/components/table/normal-table/index.jsx b/src/menu/components/table/normal-table/index.jsx
index aa19a47..83f0adb 100644
--- a/src/menu/components/table/normal-table/index.jsx
+++ b/src/menu/components/table/normal-table/index.jsx
@@ -88,8 +88,11 @@
         _card.style = config.style
         _card.headerStyle = config.headerStyle
 
+        let oriUids = {}
         _card.action = config.action.map(item => {
-          item.uuid = Utils.getuuid()
+          let _uuid = Utils.getuuid()
+          oriUids[item.uuid] = _uuid
+          item.uuid = _uuid
           return item
         })
         _card.search = config.search.map(item => {
@@ -113,6 +116,10 @@
           }
           return col
         })
+        
+        if (_card.wrap.doubleClick) {
+          _card.wrap.doubleClick = oriUids[_card.wrap.doubleClick] || ''
+        }
       }
       
       this.setState({
diff --git a/src/menu/pastecontroller/index.jsx b/src/menu/pastecontroller/index.jsx
index 71a6a8e..d80b944 100644
--- a/src/menu/pastecontroller/index.jsx
+++ b/src/menu/pastecontroller/index.jsx
@@ -149,12 +149,16 @@
       item.btnlog = []
     }
 
+    let oriUids = {}
     if (item.action) {
       if (sessionStorage.getItem('editMenuType') === 'popview') {
         item.action = item.action.filter(c => c.OpenType !== 'popview' && c.OpenType !== 'funcbutton')
       }
       item.action = item.action.map(cell => {
         let _uuid = Utils.getuuid()
+
+        oriUids[cell.uuid] = _uuid
+
         if (cell.OpenType === 'popview') {
           let _cell = fromJS(cell).toJS()
           _cell.$originUuid = _cell.uuid
@@ -180,6 +184,10 @@
     if (item.setting && item.setting.supModule) {
       item.setting.supModule = ''
     }
+    
+    if (item.wrap && item.wrap.doubleClick) {
+      item.wrap.doubleClick = oriUids[item.wrap.doubleClick] || ''
+    }
 
     return item
   }
diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx
index 8269c1b..92d3b69 100644
--- a/src/tabviews/custom/components/card/data-card/index.jsx
+++ b/src/tabviews/custom/components/card/data-card/index.jsx
@@ -46,7 +46,19 @@
   UNSAFE_componentWillMount () {
     const { data, initdata, BID } = this.props
     let _config = fromJS(this.props.config).toJS()
-    let _card = _config.subcards[0]
+
+    _config.subcards = _config.subcards.map(item => {
+      item.setting.$click = ''
+      if (item.setting.click === 'button') {
+        if (item.elements.filter(ele => ele.eleType === 'button').length < 2) {
+          item.setting.$click = ' trigger-button'
+        }
+        item.setting.click = ''
+      }
+      return item
+    })
+
+    let _card = _config.subcards.shift()
     let _cols = new Map()
 
     let _data = null
@@ -58,6 +70,15 @@
     } else if (_config.setting.sync === 'true' && initdata) {
       _data = initdata || []
       _sync = false
+    }
+
+    if (_config.wrap.cardFloat && _config.wrap.cardFloat !== 'left') {
+      let _width = 0
+      _config.subcards.forEach(card => {
+        _width += card.setting.width
+      })
+      
+      _config.$offset = _width
     }
 
     if (_data) {
@@ -540,9 +561,11 @@
       switchable = true
     }
     let offset = 0
+
     if (config.wrap.cardFloat && config.wrap.cardFloat !== 'left') {
-      if (data && card.setting.width * data.length < 24) {
-        offset = 24 - card.setting.width * data.length
+      let length = data ? data.length : 0
+      if (card.setting.width * length + config.$offset < 24) {
+        offset = 24 - card.setting.width * length - config.$offset
         if (config.wrap.cardFloat === 'center') {
           offset = Math.floor(offset / 2)
         }
@@ -570,15 +593,20 @@
         }
         <div className={`data-zoom ${config.wrap.cardType || ''} ${config.wrap.scale || ''}`}>
           {switchable ? <div className={'prev-page ' + (pageIndex === 1 ? 'disabled' : '')} onClick={this.prevPage}><div><div><img src={preImg} alt=""/></div></div></div> : null}
-          {data && data.length > 0 ? <Row className="card-row-list">
-            {data.map((item, index) => (
-              <Col className={(activeKey === index ? ' active' : (selectKeys.indexOf(index) > -1 ? ' selected' : '')) + (card.setting.click ? ' pointer' : '')} key={index} span={card.setting.width} offset={!index ? offset : 0} onClick={() => {this.changeCard(index, item)}}>
+          <Row className="card-row-list">
+            {data && data.map((item, index) => (
+              <Col className={(activeKey === index ? ' active' : (selectKeys.indexOf(index) > -1 ? ' selected' : '')) + (card.setting.$click ? ' pointer' : '') + card.setting.$click} key={index} span={card.setting.width} offset={!index ? offset : 0} onClick={() => {this.changeCard(index, item)}}>
                 <CardItem card={card} cards={config} data={item}/>
               </Col>
             ))}
-          </Row> : null}
+            {config.subcards.map((item, index) => (
+              <Col key={'mk' + index} className={item.setting.$click} span={item.setting.width || 6} offset={(!data || data.length === 0) ? offset : 0}>
+                <CardItem card={item} cards={config} data={{$$BID: BID}}/>
+              </Col>
+            ))}
+          </Row>
           {switchable ? <div className={'prev-page ' + (total <= _total ? 'disabled' : '')} onClick={this.nextPage}><div><div><img src={nextImg} alt=""/></div></div></div> : null}
-          {!data || data.length === 0 ? <Empty description={false}/> : null}
+          {config.subcards.length === 0 && (!data || data.length === 0) ? <Empty description={false}/> : null}
         </div>
         {config.wrap.pagestyle !== 'switch' && config.setting.laypage && data ? <Pagination size="small" total={total} showTotal={t => `鍏� ${t} 鏉} pageSize={config.setting.pageSize} onChange={this.changePageIndex} current={pageIndex}/> : null}
       </div>
diff --git a/src/tabviews/custom/components/card/data-card/index.scss b/src/tabviews/custom/components/card/data-card/index.scss
index 49e69ef..9e0798f 100644
--- a/src/tabviews/custom/components/card/data-card/index.scss
+++ b/src/tabviews/custom/components/card/data-card/index.scss
@@ -125,6 +125,28 @@
     margin: 10px;
     text-align: right;
   }
+  .trigger-button {
+    .card-item-box {
+      .card-cell-list {
+        position: unset;
+        .mk-cell-btn {
+          position: unset;
+          .ant-btn {
+            position: unset;
+          }
+          .ant-btn::after {
+            content: ' ';
+            position: absolute;
+            top: 0;
+            bottom: 0;
+            left: 0;
+            right: 0;
+            cursor: pointer;
+          }
+        }
+      }
+    }
+  }
 }
 
 .custom-card-box::after {
diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx
index bb029da..ce576c4 100644
--- a/src/tabviews/custom/components/card/prop-card/index.jsx
+++ b/src/tabviews/custom/components/card/prop-card/index.jsx
@@ -73,6 +73,13 @@
 
     let _width = 0
     _config.subcards.forEach(card => {
+      card.setting.$click = ''
+      if (card.setting.click === 'button') {
+        if (card.elements.filter(ele => ele.eleType === 'button').length < 2) {
+          card.setting.$click = ' trigger-button'
+        }
+        card.setting.click = ''
+      }
       _width += card.setting.width
       card.elements = card.elements.map(item => {
         if (item.field && _cols.has(item.field)) {
@@ -426,7 +433,7 @@
         <NormalHeader config={config}/>
         <Row className={`card-row-list ${config.wrap.cardType || ''} ${config.wrap.scale || ''}`}>
           {config.subcards.map((item, index) => (
-            <Col className={(activeKey === index ? 'active' : '') + (item.setting.click ? ' pointer' : '')} key={index} span={item.setting.width || 6} offset={item.offset || 0} onClick={() => {this.changeCard(index, item)}}>
+            <Col className={(activeKey === index ? 'active' : '') + (item.setting.click ? ' pointer' : '') + item.setting.$click} key={index} span={item.setting.width || 6} offset={item.offset || 0} onClick={() => {this.changeCard(index, item)}}>
               <CardItem card={item} cards={config} data={data}/>
             </Col>
           ))}
diff --git a/src/tabviews/custom/components/card/prop-card/index.scss b/src/tabviews/custom/components/card/prop-card/index.scss
index 12c5e88..bb919f8 100644
--- a/src/tabviews/custom/components/card/prop-card/index.scss
+++ b/src/tabviews/custom/components/card/prop-card/index.scss
@@ -70,6 +70,28 @@
       background: #ffffff;
     }
   }
+  .trigger-button {
+    .card-item-box {
+      .card-cell-list {
+        position: unset;
+        .mk-cell-btn {
+          position: unset;
+          .ant-btn {
+            position: unset;
+          }
+          .ant-btn::after {
+            content: ' ';
+            position: absolute;
+            top: 0;
+            bottom: 0;
+            left: 0;
+            right: 0;
+            cursor: pointer;
+          }
+        }
+      }
+    }
+  }
 }
 
 .custom-card-box::after {

--
Gitblit v1.8.0