king
2024-05-07 2aa5ab63b4bbce5c36dbb3511b205b3b5f6af9bd
src/menu/components/form/formaction/formconfig.jsx
@@ -123,14 +123,29 @@
    })
  }
  let closetab = []
  if (!appType && viewType !== 'popview') {
    closetab = [{
      value: 'closetab',
      text: '关闭标签'
    }]
  }
  let resets = []
  fields.forEach(item => {
    if (item.type !== 'text' && item.type !== 'number') return
    resets.push({
      value: item.field,
      text: item.label
    })
    if (item.label !== item.field) {
      resets.push({
        value: item.field,
        text: item.label + ' (' + item.field + ')'
      })
    } else {
      resets.push({
        value: item.field,
        text: item.label
      })
    }
  })
  return [
@@ -424,7 +439,17 @@
      }, {
        value: 'mainline',
        text: '刷新上级组件 - 行'
      }, ...refresh]
      }, ...closetab, ...refresh]
    },
    {
      type: 'cascader',
      key: 'refreshTab',
      label: '刷新菜单',
      initVal: card.refreshTab || [],
      tooltip: '执行成功后(或功能按钮中标签关闭类型),需要同步刷新的菜单',
      required: false,
      forbid: appType === 'pc' || appType === 'mob' || viewType === 'popview',
      options: menulist
    },
    {
      type: (appType === 'pc' || appType === 'mob') ? 'select' : 'cascader',
@@ -467,6 +492,15 @@
      options: modules
    },
    {
      type: 'number',
      key: 'syncDelay',
      label: '刷新延迟',
      initVal: card.syncDelay,
      tooltip: '同步刷新组件的延迟时间,单位毫秒。',
      // placeholder: '单位毫秒',
      required: false
    },
    {
      type: 'cascader',
      key: 'anchors',
      label: '跳转锚点',
@@ -497,6 +531,20 @@
    },
    {
      type: 'radio',
      key: 'returnValue',
      label: '更新表单',
      initVal: card.returnValue || 'false',
      tooltip: '与重置表单配合使用,开启时,必须在自定义脚本中返回数据,用于替换字段集和填充表单。',
      options: [{
        value: 'false',
        text: '禁用'
      }, {
        value: 'true',
        text: '启用'
      }]
    },
    {
      type: 'radio',
      key: 'reload',
      label: '上一页',
      initVal: card.reload || 'false',
@@ -509,21 +557,6 @@
        value: 'true',
        text: '刷新'
      }]
    },
    {
      type: 'radio',
      key: 'formCache',
      label: '表单缓存',
      initVal: card.formCache || 'false',
      tooltip: '主要用于数据修改后,更新相关表单的选项,清空缓存后表单再次打开时数据会重新加载。',
      required: false,
      options: [{
        value: 'false',
        text: '不清空'
      }, {
        value: 'clear',
        text: '清空'
      }]
    },
    }
  ]
}