king
2021-09-01 31ec63f0419895876cbaba99637a884a32d33d0d
src/menu/components/share/actioncomponent/index.jsx
@@ -32,6 +32,7 @@
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    appType: sessionStorage.getItem('appType'),
    card: null,          // 编辑中元素
    formlist: null,      // 表单信息
    actionlist: null,    // 按钮组
@@ -115,7 +116,7 @@
    const { config } = this.props
    let _style = element.style ? fromJS(element.style).toJS() : {}
    let options = ['font', 'border', 'background', 'margin']
    let options = ['font', 'border', 'background', 'margin', 'padding']
    this.setState({
      card: element
@@ -159,7 +160,7 @@
    if (usefulFields) {
      try {
        usefulFields = JSON.parse(usefulFields)
      } catch {
      } catch (e) {
        usefulFields = []
      }
    } else {
@@ -175,7 +176,7 @@
    if (menulist) {
      try {
        menulist = JSON.parse(menulist)
      } catch {
      } catch (e) {
        menulist = []
      }
    } else {
@@ -187,7 +188,7 @@
    this.setState({
      visible: true,
      card: card,
      formlist: getActionForm(card, functip, config.setting, usefulFields, this.props.type, menulist, modules, config.columns)
      formlist: getActionForm(card, functip, config, usefulFields, this.props.type, menulist, modules)
    })
  }
@@ -273,7 +274,7 @@
   */
  deleteElement = (card) => {
    const { config } = this.props
    const { dict } = this.state
    const { dict, appType } = this.state
    let _this = this
    confirm({
@@ -282,10 +283,6 @@
        let _actionlist = fromJS(_this.state.actionlist).toJS()
        _actionlist = _actionlist.filter(item => item.uuid !== card.uuid)
        if (!card.origin) {
          MKEmitter.emit('delButtons', [card.uuid])
        }
        let btnlog = config.btnlog || []
        if (card.OpenType === 'popview' || card.verify || card.modal) {
@@ -297,6 +294,11 @@
        }, () => {
          _this.props.updateaction({...config, action: _actionlist, btnlog})
        })
        if (card.origin || appType === 'mob') return
        if (appType === 'pc' && card.OpenType !== 'popview') return
        MKEmitter.emit('delButtons', [card.uuid])
      },
      onCancel() {}
    })
@@ -413,11 +415,7 @@
    } else if (element.OpenType === 'innerpage' && element.pageTemplate === 'linkpage') {
      MKEmitter.emit('changeEditMenu', {MenuID: element.linkmenu})
    } else {
      notification.warning({
        top: 92,
        message: '此按钮无子配置项!',
        duration: 5
      })
      this.handleAction(element)
    }
  }