| | |
| | | subtype: card.subtype, |
| | | setting: { interType: 'system' }, |
| | | wrap: { name: card.name, width: card.width || 24, autoplay: 'false', dots: 'true', height: '300px' }, |
| | | style: { borderWidth: '1px', borderColor: '#e8e8e8', marginTop: '8px', marginBottom: '8px', height: '300px' }, |
| | | style: { borderWidth: '1px', borderColor: '#e8e8e8', marginTop: '8px', marginBottom: '8px' }, |
| | | columns: [], |
| | | scripts: [], |
| | | subcards: [{ |
| | |
| | | |
| | | this.updateComponent(_card) |
| | | } else { |
| | | let _card = fromJS(card).toJS() |
| | | |
| | | if (!_card.wrap.height && _card.style.height) { // 兼容 |
| | | _card.wrap.height = _card.style.height |
| | | } |
| | | delete _card.style.height |
| | | |
| | | this.setState({ |
| | | card: fromJS(card).toJS() |
| | | card: _card |
| | | }) |
| | | } |
| | | } |
| | |
| | | getWrapForms = () => { |
| | | const { card } = this.state |
| | | |
| | | return getWrapForm({...card.wrap, height: card.style.height}, card.subtype) |
| | | return getWrapForm(card.wrap, card.subtype) |
| | | } |
| | | |
| | | updateWrap = (res) => { |
| | | let _card = {...this.state.card, wrap: res} |
| | | |
| | | // _card.style.height = res.height |
| | | |
| | | if (res.title && !_card.headerStyle) { |
| | | _card.headerStyle = { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' } |
| | |
| | | render() { |
| | | const { card } = this.state |
| | | let _style = resetStyle(card.style) |
| | | _style.height = 'auto' |
| | | |
| | | return ( |
| | | <div className="menu-data-carousel-edit-box" style={_style} onClick={this.clickComponent} id={card.uuid}> |