king
2023-07-04 0b8381328068394891541b6e3824f9afb2cc9fa1
src/menu/components/card/balcony/index.jsx
@@ -47,7 +47,7 @@
        subtype: card.subtype,
        setting: { interType: 'system' },
        wrap: { name: card.name, width: card.width || 24, linkType: 'static', position: 'relative', datatype: 'static' },
        style: { marginLeft: '0px', marginRight: '0px', marginTop: '0px', marginBottom: '0px' },
        style: { marginLeft: '0px', marginRight: '0px', marginTop: '0px', marginBottom: '0px', position: 'unset' },
        columns: [],
        scripts: [],
        elements: [],
@@ -72,8 +72,32 @@
      this.updateComponent(_card)
    } else {
      let _card = fromJS(card).toJS()
      if (!_card.style.position) { // 兼容
        if (_card.wrap.position === 'fixed' || _card.wrap.position === 'absolute') {
          _card.style.position = _card.wrap.position
          _card.style.zIndex = _card.wrap.position === 'fixed' ? 3 : 2
          _card.style.left = _card.wrap.left || ''
          _card.style.right = _card.wrap.right || ''
          _card.style.top = _card.wrap.top || ''
          _card.style.bottom = _card.wrap.bottom || ''
          _card.style.transform = _card.wrap.transform || ''
          _card.style.width = _card.wrap.realwidth || ''
        } else if (_card.wrap.left || _card.wrap.right || _card.wrap.top || _card.wrap.bottom) {
          _card.style.position = 'relative'
          _card.style.zIndex = 1
          _card.style.left = _card.wrap.left || ''
          _card.style.right = _card.wrap.right || ''
          _card.style.top = _card.wrap.top || ''
          _card.style.bottom = _card.wrap.bottom || ''
        } else {
          _card.style.position = 'unset'
        }
      }
      this.setState({
        card: fromJS(card).toJS()
        card: _card
      })
    }
  }
@@ -155,7 +179,7 @@
  changeStyle = () => {
    const { card } = this.state
    MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight'], card.style, this.getStyle)
    MKEmitter.emit('changeStyle', ['width', 'height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight', 'position', 'transform'], card.style, this.getStyle)
  }
  getStyle = (style) => {