king
2023-03-11 34e7681fd12b1c4e4994d3bea1a553870e10bc50
src/pc/components/login/normal-login/index.jsx
@@ -36,9 +36,6 @@
      let _card = {
        uuid: card.uuid,
        type: card.type,
        tabId: card.tabId || '',
        parentId: card.parentId || '',
        dataName: card.dataName || '',
        width: card.width || 24,
        name: card.name,
        subtype: card.subtype,
@@ -74,6 +71,11 @@
      if (_card.wrap.classify === 'signin') {
        active = 'signin'
      }
      if (!_card.style.minHeight && _card.wrap.height) {
        _card.style.minHeight = _card.wrap.height
        delete _card.wrap.height
      }
      this.setState({
        active,
        card: _card
@@ -117,7 +119,7 @@
  changeStyle = () => {
    const { card } = this.state
    MKEmitter.emit('changeStyle', ['width', 'background', 'border', 'padding', 'margin'], card.style, this.getStyle)
    MKEmitter.emit('changeStyle', ['width', 'background', 'border', 'padding', 'margin', 'clear', 'minHeight'], card.style, this.getStyle)
  }
  getStyle = (style) => {
@@ -129,7 +131,13 @@
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
      MKEmitter.emit('clickComponent', this.state.card)
      MKEmitter.emit('clickComponent', this.state.card.uuid, null, (style) => {
        let _card = {...this.state.card}
        _card.style = {..._card.style, ...style}
        this.setState({ card: _card })
        this.props.updateConfig(_card)
      })
    }
  }
@@ -187,7 +195,14 @@
        {card.wrap.signWays && active === 'signin' ? <SignForm wrap={card.wrap} changeway={() => this.setState({active: 'login'})}/> : null}
        <div className="component-name">
          <div className="center">
            <div className="title">{card.name}</div>
            <div className="title" onDoubleClick={() => {
              let oInput = document.createElement('input')
              oInput.value = card.uuid
              document.body.appendChild(oInput)
              oInput.select()
              document.execCommand('Copy')
              document.body.removeChild(oInput)
            }}>{card.name}</div>
            <div className="content">
              {card.errors && card.errors.map((err, index) => {
                if (err.level === 0) {