king
2024-01-10 d1dbe184ea1026e20a202ac9f8f7c8c049665ae3
src/menu/components/form/formaction/formconfig.jsx
@@ -125,18 +125,13 @@
  let resets = []
  fields.forEach(item => {
    if (item.hidden === 'true') return
    if (item.type !== 'text' && item.type !== 'number') return
    resets.push({
      value: item.uuid,
      value: item.field,
      text: item.label
    })
  })
  if (card.resetForm && resets.findIndex(item => item.value === card.resetForm) === -1) {
    card.resetForm = ''
  }
  return [
    {
@@ -492,12 +487,12 @@
    },
    {
      type: 'select',
      key: 'resetForm',
      key: 'resetForms',
      label: '重置表单',
      tooltip: '按钮执行成功后需要重置的表单,表单会恢复默认值并聚焦。',
      initVal: card.resetForm || '',
      initVal: card.resetForms || [],
      required: false,
      allowClear: true,
      mode: 'multiple',
      options: resets
    },
    {
@@ -515,5 +510,20 @@
        text: '刷新'
      }]
    },
    {
      type: 'radio',
      key: 'formCache',
      label: '表单缓存',
      initVal: card.formCache || 'false',
      tooltip: '主要用于数据修改后,更新相关表单的选项,清空缓存后表单再次打开时数据会重新加载。',
      required: false,
      options: [{
        value: 'false',
        text: '不清空'
      }, {
        value: 'clear',
        text: '清空'
      }]
    },
  ]
}