king
2022-11-15 347ca2d72cd044484e566056fb71ae3e0cdbfd19
src/menu/components/carousel/prop-card/index.jsx
@@ -50,7 +50,7 @@
        subtype: card.subtype,
        setting: { },
        wrap: { name: card.name, width: card.width || 24, datatype: 'static', autoplay: 'false', dots: 'true', height: '300px' },
        style: { borderWidth: '1px', borderColor: '#e8e8e8', marginLeft: '0px', marginRight: '0px', marginTop: '8px', marginBottom: '8px', height: '300px' },
        style: { borderWidth: '1px', borderColor: '#e8e8e8', marginLeft: '0px', marginRight: '0px', marginTop: '8px', marginBottom: '8px' },
        columns: [],
        scripts: [],
        subcards: [{
@@ -84,8 +84,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
      })
    }
  }
@@ -273,13 +280,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' }
@@ -304,7 +309,6 @@
  render() {
    const { card } = this.state
    let _style = resetStyle(card.style)
    _style.height = 'auto'
    return (
      <div className="menu-prop-carousel-edit-box" style={_style} onClick={this.clickComponent} id={card.uuid}>