king
2025-01-24 e1cee96b38805bcccf48e7bcb9d296f2bc54c720
src/mob/components/menubar/normal-menubar/menucomponent/index.jsx
@@ -36,10 +36,6 @@
    })
  }
  componentDidMount () {
    MKEmitter.addListener('submitStyle', this.getStyle)
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
@@ -51,14 +47,10 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('submitStyle', this.getStyle)
  }
  getStyle = (comIds, style) => {
    const { cards } = this.props
  getStyle = (style) => {
    const { card } = this.state
    if (comIds.length !== 2 || comIds[0] !== cards.uuid || comIds[1] !== card.uuid) return
    let _card = fromJS(card).toJS()
    _card.style = style
@@ -71,13 +63,12 @@
  }
  changeStyle = () => {
    const { cards } = this.props
    const { card } = this.state
    let _style = card.style ? fromJS(card.style).toJS() : {}
    let options = ['font', 'border', 'padding', 'margin', 'background']
    MKEmitter.emit('changeStyle', [cards.uuid, card.uuid], options, _style)
    MKEmitter.emit('changeStyle', options, _style, this.getStyle)
  }
  getSettingForms = () => {
@@ -127,7 +118,7 @@
      <Col span={card.setting.width || 6}>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            <NormalForm title="菜单编辑" width={900} update={this.updateSetting} getForms={this.getSettingForms}>
            <NormalForm title="菜单编辑" width={950} update={this.updateSetting} getForms={this.getSettingForms}>
              <EditOutlined style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <CopyComponent type="menucell" card={card}/>
@@ -155,7 +146,7 @@
              }} type={card.setting.icon || 'cloud'}/>
              {card.setting.tip ? <sup className="am-badge-text"></sup> : null}
            </div> : <div className="menu-sign">
              <img style={{width: card.setting.imgWidth, height: card.setting.imgWidth, borderRadius: card.setting.borderRadius || '15%'}} src={card.setting.url} alt=""/>
              <img style={{width: card.setting.imgWidth, height: card.setting.imgWidth, borderRadius: card.setting.borderRadius || '15%'}} src={card.setting.url.replace(/@mywebsite@\//ig, window.GLOB.baseurl)} alt=""/>
              {card.setting.tip ? <sup className="am-badge-text"></sup> : null}
            </div>}
            <div className="menu-name" style={{opacity: !card.setting.name ? 0 : 1}}>{card.setting.name || '明科'}</div>