king
2022-04-04 96266d3d0e1c5c53e2f5b17e2fbf2c814c2a8d8f
src/mob/components/menubar/normal-menubar/index.jsx
@@ -144,20 +144,27 @@
  /**
   * @description 单个卡片信息更新
   */
  deleteCard = (cell) => {
  deleteCard = (cell, type) => {
    let card = fromJS(this.state.card).toJS()
    let _this = this
    confirm({
      content: '确定删除卡片吗?',
      onOk() {
        card.subMenus = card.subMenus.filter(item => item.uuid !== cell.uuid)
        _this.setState({card})
        _this.props.updateConfig(card)
      },
      onCancel() {}
    })
    if (type !== 'direct') {
      confirm({
        content: '确定删除卡片吗?',
        onOk() {
          card.subMenus = card.subMenus.filter(item => item.uuid !== cell.uuid)
          _this.setState({card})
          _this.props.updateConfig(card)
        },
        onCancel() {}
      })
    } else {
      card.subMenus = card.subMenus.filter(item => item.uuid !== cell.uuid)
      this.setState({card})
      this.props.updateConfig(card)
    }
  }
  changeStyle = () => {
@@ -185,7 +192,7 @@
    let newcard = {
      uuid: Utils.getuuid(),
      setting: { type: 'menu', width: 6, sign: 'icon', icon: 'user', name: '客户', url: '', color: '#ffffff', iconFont: 20, padding: 12, background: '#1890ff', imgWidth: '' },
      setting: { type: 'menu', width: 6, sign: 'icon', icon: '', name: '', url: '', color: '#ffffff', iconFont: 20, padding: 12, background: '#1890ff', imgWidth: '' },
      style: {
        paddingTop: '15px', paddingBottom: '15px'
      }
@@ -194,12 +201,28 @@
    if (card.subMenus.length > 0) {
      newcard = fromJS(card.subMenus.slice(-1)[0]).toJS()
      newcard.uuid = Utils.getuuid()
      newcard.setting.clearMenu = 'true'
      newcard.setting.icon = ''
      newcard.setting.name = ''
      newcard.setting.MenuNo = ''
      newcard.setting.type = 'menu'
      newcard.setting.copyMenuId = ''
      newcard.setting.linkMenuId = ''
      newcard.setting.linkurl = ''
      newcard.setting.tip = ''
      newcard.setting.url = ''
    }
    card.subMenus.push(newcard)
    
    this.setState({card})
    this.props.updateConfig(card)
    setTimeout(() => {
      let node = document.getElementById(newcard.uuid)
      node && node.click()
    }, 200)
  }
  move = (item, direction) => {