king
2021-02-01 b23db4e1b9e8bc813b4b3b95d35552e5e2e980c6
src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Form, Row, Col, Input, Select, Icon, Radio, Tooltip, InputNumber, notification } from 'antd'
import { Form, Row, Col, Input, Select, Icon, Radio, Tooltip, InputNumber } from 'antd'
import { formRule } from '@/utils/option.js'
import asyncComponent from '@/utils/asyncComponent'
@@ -40,7 +40,6 @@
    link: ''
  }
  UNSAFE_componentWillMount () {
    const { card, config } = this.props
    let _options = this.getOptions(card.eleType, card.datatype, card.link)
@@ -76,6 +75,8 @@
          } else if (card.eleType === 'number') {
            item.options = item.oriOptions.filter(op => op.value !== 'YYYY-MM-DD')
          }
        } else if (item.key === 'url') {
          item.required = card.eleType !== 'qrcode'
        }
        if (item.key === 'linkurl') {
          item.type = card.link === 'dynamic' ? 'select' : 'text'
@@ -157,6 +158,8 @@
          } else if (value === 'number') {
            item.options = item.oriOptions.filter(op => op.value !== 'YYYY-MM-DD')
          }
        } else if (item.key === 'url') {
          item.required = value !== 'qrcode'
        }
        return item
@@ -388,14 +391,14 @@
          values.uuid = this.props.card.uuid
          values.marks = this.props.card.marks || null
          if (values.eleType === 'picture' && values.datatype === 'static' && !values.url) {
            notification.warning({
              top: 92,
              message: '尚未添加图片或图片上传失败,请重新添加!',
              duration: 5
            })
            return
          }
          // if (values.eleType === 'picture' && values.datatype === 'static' && !values.url) {
          //   notification.warning({
          //     top: 92,
          //     message: '尚未添加图片或图片上传失败,请重新添加!',
          //     duration: 5
          //   })
          //   return
          // }
          resolve(values)
        } else {