king
2024-04-10 8a1ee7d651500f848a3c2f05c7fe3be2b7114a43
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -127,6 +127,18 @@
    appMenus.push({value: 'goback', text: '返回(上一页)'})
  }
  let fields = []
  if (cards.subtype === 'propcard' && cards.wrap.datatype === 'static') {
    if (cards.wrap.supModule && cards.wrap.supModule.length) {
      let cell = MenuUtils.getComponent(cards.wrap.supModule[cards.wrap.supModule.length - 1])
      if (cell && cell.columns) {
        fields = cell.columns.map(col => ({ value: col.field }))
      }
    } else {
      fields = cards.columns.map(col => ({ value: col.field }))
    }
  }
  let forms = [
    {
      type: 'select',
@@ -160,12 +172,12 @@
      ]
    },
    {
      type: 'select',
      type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select',
      key: 'field',
      label: '字段',
      initVal: card.field || '',
      required: true,
      options: []
      options: fields
    },
    {
      type: 'icon',
@@ -244,11 +256,12 @@
      required: true
    },
    {
      type: 'select',
      type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select',
      key: 'posterField',
      label: '预览地址',
      initVal: card.posterField || '',
      required: true
      required: true,
      options: fields
    },
    {
      type: 'radio',
@@ -462,14 +475,14 @@
      required: false
    },
    {
      type: 'select',
      type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select',
      key: 'bgImage',
      label: '动态背景',
      initVal: card.bgImage || '',
      tooltip: '绑定数据源字段,可根据返回值改变背景图。',
      required: false,
      allowClear: true,
      options: [],
      options: fields,
      forbid: isHeader
    },
    {
@@ -642,13 +655,14 @@
      forbid: ['pc', 'mob'].includes(appType)
    },
    {
      type: 'select',
      type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select',
      defType: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select',
      key: 'linkurl',
      label: '链接地址',
      initVal: card.linkurl || '',
      tooltip: ['pc', 'mob'].includes(appType) ? '当链接类型为“其他”,且链接地址以@menuid@开头时,其后内容将被视为菜单ID。' : '',
      required: true,
      options: []
      options: fields
    },
    {
      type: 'radio',