king
2023-02-17 8137ac074ce6370e4b46295e7acf9c7870ef82d2
src/menu/components/card/doublecardcomponent/options.jsx
@@ -1,7 +1,7 @@
/**
 * @description Setting表单配置信息
 */
export default function (setting, buttons = []) {
export default function (setting, buttons = [], columns, type) {
  let appType = sessionStorage.getItem('appType')
  let menulist = []
@@ -43,6 +43,57 @@
    },
    {
      type: 'radio',
      field: 'display',
      label: '子表显示',
      initval: setting.display || 'default',
      tooltip: '展开与合并为用户可自行切换。',
      required: false,
      options: [
        {value: 'default', label: '默认'},
        {value: 'unfold', label: '展开'},
        {value: 'collapse', label: '合并'},
      ],
      controlFields: [
        {field: 'position', values: ['default']},
        {field: 'controlIcon', values: ['unfold', 'collapse']},
      ],
      forbid: type !== 'main'
    },
    {
      type: 'radio',
      field: 'controlIcon',
      label: '控制图标',
      initval: setting.controlIcon || 'left',
      required: false,
      options: [
        {value: 'left', label: '左侧'},
        {value: 'right', label: '右侧'},
      ],
      forbid: type !== 'main'
    },
    {
      type: 'radio',
      field: 'position',
      label: '子表位置',
      initval: setting.position || 'bottom',
      required: false,
      options: [
        {value: 'bottom', label: '主表下方'},
        {value: 'inner', label: '主表内'},
      ],
      forbid: type !== 'main'
    },
    {
      type: 'select',
      field: 'bgField',
      label: '背景图',
      initval: setting.bgField || '',
      tooltip: '动态背景,背景图片由字段值控制。请注意调整背景样式。',
      required: false,
      options: columns
    },
    {
      type: 'select',
      field: 'click',
      label: '点击事件',
      initval: setting.click || '',
@@ -51,7 +102,8 @@
        {value: '', label: '无'},
        {value: 'menu', label: '菜单'},
        {value: 'link', label: '链接'},
        {value: 'button', label: '按钮'}
        {value: 'button', label: '按钮'},
        {value: 'unfold', label: '子表缩放', disabled: type !== 'main'},
      ],
      controlFields: [
        {field: 'menu', values: ['menu']},
@@ -59,7 +111,7 @@
        {field: 'open', values: ['menu', 'link']},
        {field: 'joint', values: ['menu', 'link']},
        {field: 'linkbtn', values: ['button']},
        {field: 'clickType', values: ['button']},
        {field: 'clickType', values: ['button', 'unfold']},
      ]
    },
    {