king
2021-08-26 e9c48bd7356462ba9257540b130a47a65ad1861d
src/menu/components/card/cardcellcomponent/index.jsx
@@ -161,6 +161,12 @@
    if (comIds.length !== 3 || comIds[0] !== cards.uuid || comIds[1] !== cardCell.uuid || !card) return
    if (card.eleType === 'button') {
      if ((style.paddingLeft || style.paddingRight) && !style.width) {
        style.width = 'auto'
      }
    }
    let _card = this.resetCardStyle(card, style)
    let _elements = elements.map(cell => {
@@ -178,7 +184,7 @@
  resetCardStyle = (card, style) => {
    let _card = fromJS(card).toJS()
    
    if (_card.eleType === 'text' || _card.eleType === 'number') {
    if (['text', 'number', 'formula'].includes(_card.eleType)) {
      _card.style = style
      let fontSize = 14
@@ -297,11 +303,15 @@
   * @description 取消保存,如果元素为新添元素,则从序列中删除
   */
  editModalCancel = () => {
    const { card, elements } = this.state
    const { card, elements, appType } = this.state
    let _elements = null
    if (card.focus) {
      _elements = elements.filter(item => item.uuid !== card.uuid)
      if (card.OpenType === 'popview' && appType !== 'mob') { // 弹窗标签按钮,从复制列表中删除
        MKEmitter.emit('delButtons', [card.uuid])
      }
    } else {
      _elements = elements
    }
@@ -311,6 +321,8 @@
      elements: _elements,
      visible: false,
      actvisible: false
    }, () => {
      this.props.updateElement(_elements)
    })
  }
@@ -328,7 +340,7 @@
          if (res.eleType === 'splitline' && cell.eleType !== 'splitline') {
            res.style.paddingTop = '5px'
            res.style.paddingBottom = '5px'
          } else if (res.eleType === 'text' || res.eleType === 'number') {
          } else if (['text', 'number', 'formula'].includes(res.eleType)) {
            let fontSize = 14
            let lineHeight = 1.5
            let line = res.height || null
@@ -595,6 +607,7 @@
          handleSubConfig={this.handleSubConfig}
          deleteMenu={this.deleteElement}
        />
        <div onDoubleClick={(e) => e.stopPropagation()}>
        {/* 编辑按钮:复制、编辑 */}
        <Modal
          title={'编辑元素'}
@@ -684,6 +697,7 @@
          }
        </Modal>
      </div>
      </div>
    )
  }
}