From 542054288debe0251270f782daad7fa2c6e53c5b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 24 十二月 2020 19:24:06 +0800
Subject: [PATCH] 2020-12-24

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

diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx
index aaa9ffe..aec0a96 100644
--- a/src/menu/components/card/data-card/index.jsx
+++ b/src/menu/components/card/data-card/index.jsx
@@ -1,6 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import {connect} from 'react-redux'
+import { connect } from 'react-redux'
 import { is, fromJS } from 'immutable'
 import { Icon, Popover, Modal, Pagination, notification } from 'antd'
 
@@ -275,28 +275,22 @@
     MKEmitter.emit('addButton', card.uuid, newcard)
   }
 
-  setSubConfig = (btn) => {
+  setSubConfig = (item) => {
     const { card } = this.state
+    let btn = fromJS(item).toJS()
 
     if (btn.OpenType === 'pop') {
       if (!btn.modal) {
         btn.modal = {
-          setting: {
-            title: btn.label,
-            width: 60,
-            cols: '2',
-            container: 'tab',
-            focus: '',
-            finish: 'close',
-            clickouter: 'unclose',
-            display: 'modal'
-          },
+          setting: { title: btn.label, width: 60, cols: '2', container: 'tab', focus: '', finish: 'close', clickouter: 'unclose', display: 'modal' },
           tables: [],
           groups: [],
           fields: []
         }
       }
       MKEmitter.emit('changeModal', card, btn)
+    } else if (btn.OpenType === 'popview') {
+      MKEmitter.emit('changePopview', card, btn)
     }
   }
 
@@ -346,6 +340,7 @@
       card.btnlog = logs
 
       this.setState({ card })
+      this.props.updateConfig(card)
       notification.success({
         top: 92,
         message: '鎭㈠鎴愬姛锛�',
@@ -354,6 +349,7 @@
     } else {
       card.btnlog = logs
       this.setState({ card })
+      this.props.updateConfig(card)
       notification.success({
         top: 92,
         message: '娓呴櫎鎴愬姛锛�',

--
Gitblit v1.8.0