| | |
| | | } |
| | | |
| | | 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 |
| | |
| | | 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) => { |
| | |
| | | <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> |