king
2022-01-02 bde2916433c7830e2879e6524e32b9f6c8bd0bab
src/menu/components/card/data-card/options.jsx
@@ -4,7 +4,7 @@
/**
 * @description Wrap表单配置信息
 */
export default function (wrap, subtype, columns, id) {
export default function (wrap, subtype, columns = [], id = '') {
  let appType = sessionStorage.getItem('appType')
  let MenuType = ''
  let menu = fromJS(window.GLOB.customMenu).toJS()
@@ -149,20 +149,18 @@
      ]
    },
    {
      type: subtype === 'propcard' ? 'select' : 'radio',
      type: 'select',
      field: 'selStyle',
      label: '选中风格',
      initval: wrap.selStyle || 'active',
      tooltip: '存在边框时,边框会使用系统色。',
      required: false,
      options: subtype === 'propcard' ? [
      options: [
        {value: 'none', label: '无'},
        {value: 'active', label: '外阴影'},
        {value: 'backFont', label: '背景+文字'},
        {value: 'font', label: '文字'},
      ] : [
        {value: 'none', label: '无'},
        {value: 'active', label: '外阴影'},
        ...(subtype === 'datacard' && appType === 'mob' ? [{value: 'check', label: '勾选'}] : [])
      ]
      // forbid: subtype !== 'propcard'
    },
@@ -265,6 +263,29 @@
      forbid: subtype !== 'propcard'
    },
    {
      type: 'select',
      field: 'controlField',
      label: '禁用字段',
      initval: wrap.controlField || '',
      tooltip: '用于控制行数据是否可选择。',
      required: false,
      allowClear: true,
      options: columns,
      controlFields: [
        {field: 'controlVal', notNull: true},
      ],
      forbid: subtype !== 'datacard'
    },
    {
      type: 'text',
      field: 'controlVal',
      label: '控制值',
      initval: wrap.controlVal || '',
      tooltip: '当字段值与控制值相等时,行数据会禁用,多个值用逗号分隔。',
      required: false,
      forbid: subtype !== 'datacard'
    },
    {
      type: 'multiselect',
      field: 'blacklist',
      label: '黑名单',