king
2024-07-01 866db6d8afa6980fd485570acda6b5fcebda4da3
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -18,8 +18,8 @@
  pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'hoverTitle', 'hidden', 'preButton'],
  prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton'],
  exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hoverTitle', 'hidden', 'preButton'],
  excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'width', 'hidden'],
  excelOut: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden'],
  excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'width', 'hidden', 'refreshTab'],
  excelOut: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden', 'refreshTab'],
  popview: ['label', 'Ot', 'OpenType', 'show', 'hover', 'icon', 'class', 'color', 'popClose', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'maskStyle', 'closeButton', 'hidden'],
  tab: ['label', 'Ot', 'OpenType', 'show', 'hover', 'icon', 'class', 'color', 'linkmenu', 'width', 'hidden', 'openTab'],
  innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'width', 'hidden'],
@@ -443,6 +443,15 @@
        reOptions.Ot = requireOptions
      } else if (this.record.pageTemplate === 'pay') {
        reOptions.Ot = requireOptions.filter(op => op.value === 'requiredSgl')
        shows.push('payMode', 'wxApp', 'wxMerch')
        if (this.record.payMode === 'inner') {
          reRequired.innerFunc = true
          shows.push('innerFunc')
        }
        if (this.record.payMode !== 'none') {
          shows.push('output')
        }
      }
    } else if (openType === 'funcbutton') {
      reOptions.intertype = this.state.interTypeOptions.filter(op => op.value !== 'custom')
@@ -511,14 +520,31 @@
        shows.push('innerFunc', 'Ot', 'execSuccess', 'execError', 'urlkey')
      } else if (_funcType === 'pay') {
        shows.push('payType', 'Ot', 'execSuccess', 'execError', 'syncComponent', 'openmenu')
        shows.push('payType', 'wxApp', 'wxMerch', 'Ot', 'execSuccess', 'execError', 'syncComponent', 'openmenu')
        if (this.record.openmenu && this.record.openmenu !== 'goback') {
          shows.push('open')
        }
        reOptions.Ot = requireOptions.filter(op => ['requiredSgl'].includes(op.value))
        shows.push('payMode')
        if (this.record.payMode === 'inner') {
          reRequired.innerFunc = true
          shows.push('innerFunc')
        }
        if (this.record.payMode !== 'none') {
          shows.push('output')
        }
      } else if (_funcType === 'refund') {
        shows.push('Ot', 'execSuccess', 'execError', 'syncComponent', 'openmenu', 'tipTitle')
        reOptions.Ot = requireOptions.filter(op => ['requiredSgl'].includes(op.value))
        shows.push('payMode')
        if (this.record.payMode === 'inner') {
          reRequired.innerFunc = true
          shows.push('innerFunc')
        }
        if (this.record.payMode !== 'none') {
          shows.push('output')
        }
      } else if (_funcType === 'shareLink') {
        shows.push('shortUrl', 'shareUrl', 'shareProUrl', 'shareTip')
      // } else if (_funcType === 'expPdf') {
@@ -856,22 +882,42 @@
            { max: 512, message: '最多512个字符' }
          )
        } else if (item.key === 'output') {
          if (this.record.intertype === 'system' || ((this.record.intertype === 'outer' || this.record.intertype === 'custom') && this.record.callbackType === 'script')) {
            rules = [{
              pattern: /^@[0-9a-zA-Z_]+@?$/,
              message: '变量以@符开头,可使用字母、数字以及_'
            }, {
              max: 100,
              message: '最多100个字符。'
            }]
          if (['pop', 'prompt', 'exec'].includes(this.record.OpenType)) {
            if (this.record.intertype === 'system' || ((this.record.intertype === 'outer' || this.record.intertype === 'custom') && this.record.callbackType === 'script')) {
              rules = [{
                pattern: /^@[0-9a-zA-Z_]+@?$/,
                message: '变量以@符开头,可使用字母、数字以及_'
              }, {
                max: 100,
                message: '最多100个字符。'
              }]
            } else {
              rules = [{
                pattern: /^[0-9a-zA-Z_]*$/,
                message: '字段可使用字母、数字以及_'
              }, {
                max: 100,
                message: '最多100个字符。'
              }]
            }
          } else {
            rules = [{
              pattern: /^[0-9a-zA-Z_]*$/,
              message: '字段可使用字母、数字以及_'
            }, {
              max: 100,
              message: '最多100个字符。'
            }]
            if (this.record.payMode === 'system') {
              rules = [{
                pattern: /^@[0-9a-zA-Z_]+@?$/,
                message: '变量以@符开头,可使用字母、数字以及_'
              }, {
                max: 100,
                message: '最多100个字符。'
              }]
            } else {
              rules = [{
                pattern: /^[0-9a-zA-Z_]*$/,
                message: '字段可使用字母、数字以及_'
              }, {
                max: 100,
                message: '最多100个字符。'
              }]
            }
          }
        } else {
          rules.push({ max: formRule.input.max, message: formRule.input.message })