king
2024-11-07 a02fc6a77fa1b35c6516b2d37108d80e260c6c85
src/menu/components/share/sourcecomponent/index.jsx
@@ -20,11 +20,13 @@
  }
  UNSAFE_componentWillMount () {
    const { value } = this.props
    const { value, initialValue } = this.props
    let val = ''
    if (value) {
      val = value
    } else if (initialValue) {
      val = initialValue
    } else if (this.props['data-__meta']) {
      val = this.props['data-__meta'].initialValue || ''
    }
@@ -35,7 +37,7 @@
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
    return !is(fromJS(this.state), fromJS(nextState)) || nextProps.type !== this.props.type
  }
  deleteUrl = () => {
@@ -72,12 +74,12 @@
        </Radio.Group> : null}
        {url && type === 'video' ? <div className="mk-source-item-info">
          <PaperClipOutlined />
          <a target="_blank" rel="noopener noreferrer" href={url}>{name}</a>
          <a target="_blank" rel="noopener noreferrer" href={url.replace(/@mywebsite@\//ig, window.GLOB.baseurl)}>{name}</a>
          <DeleteOutlined title="删除文件" onClick={this.deleteUrl}/>
        </div> : null}
        {url && type !== 'video' && url !== '@icon@' ? <div className="mk-source-item-info picture">
          <img src={url} alt="" />
          <a target="_blank" rel="noopener noreferrer" href={url}>{name}</a>
          <img src={url.replace(/@mywebsite@\//ig, window.GLOB.baseurl)} alt="" />
          <a target="_blank" rel="noopener noreferrer" href={url.replace(/@mywebsite@\//ig, window.GLOB.baseurl)}>{name}</a>
          <DeleteOutlined title="删除文件" onClick={this.deleteUrl}/>
        </div> : null}
        {url && type !== 'video' && url === '@icon@' ? <div className="mk-source-item-info avatar">
@@ -86,7 +88,7 @@
        </div> : null}
        <Modal
          visible={!!visible}
          width={visible !== 'system' ? 600 : 1000}
          width={visible !== 'system' ? 650 : 1000}
          closable={false}
          maskClosable={false}
          okText="确定"