king
2022-09-06 fa381753ef2a2b25b1c0722549ac17e333da79be
src/menu/components/card/data-card/options.jsx
@@ -4,10 +4,11 @@
/**
 * @description Wrap表单配置信息
 */
export default function (wrap, subtype, columns = [], id = '', supNodes = []) {
export default function (wrap, subtype, columns = [], id = '', supNodes = [], setting) {
  let appType = sessionStorage.getItem('appType')
  let MenuType = ''
  let menu = fromJS(window.GLOB.customMenu).toJS()
  let laypage = setting && setting.laypage !== 'false'
  if (menu.parentId === 'BillPrintTemp') {
    MenuType = 'billPrint'
@@ -113,14 +114,19 @@
      field: 'pagestyle',
      label: '分页风格',
      initval: wrap.pagestyle || 'page',
      tooltip: '数据源选择分页时有效。注:滑动加载只有第一个有效',
      tooltip: '数据源选择分页时有效。注:弹性布局时固定为页码。',
      required: false,
      disabled: !laypage,
      options: [
        {value: 'page', label: '页码'},
        {value: 'switch', label: '左右切换', forbid: appType === 'mob'},
        {value: 'switch', label: '左右切换', forbid: appType === 'mob' || subtype === 'tablecard'},
        {value: 'slide', label: '滑动加载', forbid: appType !== 'mob'},
        {value: 'more', label: '查看更多'},
      ],
      forbid: !(subtype === 'datacard' || (subtype === 'tablecard' && appType === 'mob'))
      controlFields: [
        {field: 'slidetip', values: ['slide']},
      ],
      forbid: subtype === 'propcard'
    },
    {
      type: 'radio',
@@ -168,7 +174,8 @@
        {value: 'false', label: '无'},
        {value: 'init', label: '初始化'},
        {value: 'always', label: '数据加载'},
      ]
      ],
      forbid: subtype === 'tablecard'
    },
    {
      type: 'select',
@@ -182,9 +189,10 @@
        {value: 'active', label: '外阴影'},
        {value: 'backFont', label: '背景+文字'},
        {value: 'font', label: '文字'},
        {value: 'tabs', label: '标签页'},
        ...(subtype === 'datacard' && appType === 'mob' ? [{value: 'check', label: '勾选'}] : [])
      ]
      // forbid: subtype !== 'propcard'
      ],
      forbid: subtype === 'tablecard'
    },
    // {
    //   type: 'radio',
@@ -387,9 +395,9 @@
    {
      type: 'text',
      field: 'controlVal',
      label: '控制值',
      label: '禁用值',
      initval: wrap.controlVal || '',
      tooltip: '当字段值与控制值相等时,行数据会禁用,多个值用逗号分隔。',
      tooltip: '当字段值与禁用值相等时,行数据会禁用,多个值用逗号分隔。',
      required: false,
      forbid: subtype !== 'datacard'
    },
@@ -431,6 +439,15 @@
      forbid: !!appType
    },
    {
      type: 'text',
      field: 'slidetip',
      label: '底部提示',
      initval: wrap.slidetip || wrap.slidetip === '' ? wrap.slidetip : '没有更多了',
      tooltip: '滑动加载至底部时的提示信息。',
      required: false,
      forbid: !laypage || appType !== 'mob' || subtype === 'propcard'
    },
    {
      type: 'table',
      field: 'supNodes',
      label: '上级组件',