king
2022-08-06 cbeffcc0902631909c0373f274752a97ddaf2d4e
src/menu/components/card/data-card/index.jsx
@@ -573,7 +573,9 @@
  }
  updateWrap = (res) => {
    let _card = {...this.state.card, wrap: res}
    const { card } = this.state
    let _card = {...card, wrap: res}
    if (res.supNodes) {
      _card.supNodes = res.supNodes
@@ -587,11 +589,31 @@
      delete _card.supNodes
    }
    if (res.layout === 'flex') {
      _card.wrap.pagestyle = 'page'
    }
    if (res.selStyle === 'tabs' && card.wrap.selStyle !== 'tabs') {
      Object.keys(_card.style).forEach(key => {
        if (/^border/.test(key)) {
          delete _card.style[key]
        }
      })
      _card.style.borderBottomColor = '#eeeeee'
      _card.style.borderBottomWidth = '1px'
      _card.style.paddingBottom = '0px'
    this.updateComponent(_card)
      _card.subcards.forEach(item => {
        delete item.style.marginBottom
      })
      this.setState({card: {..._card, subcards: []}}, () => {
        this.updateComponent(_card)
      })
    } else {
      this.updateComponent(_card)
    }
  }
  pasteComponent = (res, resolve) => {
@@ -760,7 +782,7 @@
          <ToolOutlined />
        </Popover>
        <ActionComponent config={card} type="datacard" setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
        <div className={'float-' + (card.wrap.cardFloat || 'left')}>
        <div className={'float-' + (card.wrap.cardFloat || 'left') + ' select-' + card.wrap.selStyle}>
          {card.subcards.map((subcard, index) => (<CardComponent key={subcard.uuid} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))}
        </div>
        <div style={{clear: 'both'}}></div>