king
2022-11-15 347ca2d72cd044484e566056fb71ae3e0cdbfd19
src/menu/components/carousel/data-card/index.jsx
@@ -49,7 +49,7 @@
        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: [{
@@ -85,8 +85,15 @@
      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
      })
    }
  }
@@ -208,13 +215,11 @@
  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' }
@@ -239,7 +244,6 @@
  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}>