king
2024-06-01 4cc738e535d1a20701d206e12cf9de8cc5a01170
src/templates/zshare/modalform/index.jsx
@@ -51,7 +51,7 @@
class MainSearch extends Component {
  static propTpyes = {
    formlist: PropTypes.any,
    standardform: PropTypes.any,
    fields: PropTypes.array,
    card: PropTypes.object,
    inputSubmit: PropTypes.any
  }
@@ -537,18 +537,21 @@
  changeVal = (val, type) => {
    if (type !== 'span' || ![24, 12, 8, 6].includes(val)) return
    const { standardform } = this.props
    const { card, fields } = this.props
    if (!standardform || ![24, 12, 8, 6].includes(standardform.span) || !standardform.labelwidth) return
    let index = fields.findIndex(item => card.uuid === item.uuid)
    let stform = fields[index - 1]
    if (!stform || ![24, 12, 8, 6].includes(stform.span) || !stform.labelwidth) return
    let labelwidth = null
    if (standardform.span === val) {
      labelwidth = standardform.labelwidth
    } else if (standardform.span > val) {
    if (stform.span === val) {
      labelwidth = stform.labelwidth
    } else if (stform.span > val) {
      labelwidth = 33.3
    } else {
      switch(standardform.span) {
      switch(stform.span) {
        case 12:
          labelwidth = 16.2
          break;
@@ -930,8 +933,8 @@
    }
  }
  handleConfirm = (fields) => {
    const { card } = this.props
  handleConfirm = () => {
    const { card, fields } = this.props
    // 表单提交时检查输入值是否正确
    return new Promise((resolve, reject) => {
      this.props.form.validateFieldsAndScroll((err, values) => {