king
2022-05-07 2dc0ff994bb96eacc472442fde6cfb38b05959e9
src/menu/components/share/sourcecomponent/inputform/index.jsx
@@ -2,6 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Input, Form, Row, Col, Pagination, Empty, Button, Modal, notification } from 'antd'
import { PlusOutlined } from '@ant-design/icons'
import Api from '@/api'
import Utils from '@/utils/utils.js'
@@ -48,7 +49,7 @@
      if (_form && _form.focus) {
        _form.focus()
      }
    } catch {}
    } catch (e) {}
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -63,14 +64,14 @@
      let videos = sessionStorage.getItem('app_videos')
      try {
        originlist = JSON.parse(videos)
      } catch {
      } catch (e) {
        originlist = []
      }
    } else {
      let pictures = sessionStorage.getItem('app_pictures')
      try {
        originlist = JSON.parse(pictures)
      } catch {
      } catch (e) {
        originlist = []
      }
    }
@@ -167,15 +168,15 @@
        {keyword === 'upload' ? <Form.Item label="上传" labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={{xs: { span: 24 }, sm: { span: 20 }}}>
          <FileUpload config={{
            initval: '',
            suffix: type === 'video' ? '.mp4,.webm,.ogg' : '.jpg,.png,.gif,.pjp,.pjpeg,.jpeg,.jfif,.webp',
            suffix: type === 'video' ? '.mp4,.webm,.ogg' : '.jpg,.png,.gif,.pjp,.pjpeg,.jpeg,.jfif,.webp,.ico',
            maxfile: 1,
            fileType: type === 'video' ? 'text' : 'picture'
          }} onChange={this.changeFile} />
        </Form.Item> : null}
        {keyword === 'system' ?
          <Search value={searchKey} placeholder="" onChange={(e) => this.setState({searchKey: e.target.value})} onSearch={this.changeSearch} enterButton/> : null}
        {keyword === 'system' ? <Button className="picture-plus mk-green" icon="plus" onClick={() => this.handleSource({typecharone: type})}>
          添加
        {keyword === 'system' ? <Button className="picture-plus mk-green" onClick={() => this.handleSource({typecharone: type})}>
          <PlusOutlined /> 添加
        </Button> : null}
        {keyword === 'system' && list.length ?
          <Row gutter={16} style={{minHeight: '250px'}}>