king
2021-07-28 137fb8ea6af2789b3238b22bac31d80bced41dfe
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -4,11 +4,11 @@
const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
/**
 * @description 获取按钮表单配置信息
 * @param {*} card           编辑按钮
 * @param {*} type           按钮类型,用于区分可选的打开方式
 * @description 获取元素配置信息
 * @param {*} card
 * @param {*} type
 */
export function getCardCellForm (card, type) {
export function getCardCellForm (card, type, subtype, cardCell) {
  let _options = [
    { value: 'text', text: '文本'},
    { value: 'number', text: '数值'},
@@ -22,7 +22,7 @@
    { value: 'currentDate', text: '当前时间'},
  ]
  if (type === 'table') {
  if (type === 'table' || (type === 'card' && subtype === 'datacard')) {
    _options.push({value: 'sequence', text: '序号'})
  }
  let appMenus = []
@@ -40,6 +40,17 @@
    } else {
      appMenus = []
    }
  }
  let dataTypes = [
    { value: 'dynamic', text: '动态' },
    { value: 'static', text: '静态' }
  ]
  if (cardCell.$cardType === 'extendCard') {
    card.datatype = 'static'
    dataTypes = [
      { value: 'static', text: '静态' }
    ]
  }
  let forms = [
@@ -98,10 +109,7 @@
      label: '数据类型',
      initVal: card.datatype || 'static',
      required: true,
      options: [
        { value: 'dynamic', text: '动态' },
        { value: 'static', text: '静态' }
      ]
      options: dataTypes
    },
    {
      type: 'select',
@@ -293,10 +301,32 @@
      required: true,
      options: [
        { value: '1:1', text: '1:1' },
        { value: '3:2', text: '3:2' },
        { value: '4:3', text: '4:3' },
        { value: '16:9', text: '16:9' }
        { value: '3:2', text: '3:2' },
        { value: '16:9', text: '16:9' },
        { value: '2:1', text: '2:1' },
        { value: '3:1', text: '3:1' },
        { value: '4:1', text: '4:1' },
        { value: '5:1', text: '5:1' },
        { value: '6:1', text: '6:1' },
        { value: '7:1', text: '7:1' },
        { value: '8:1', text: '8:1' },
        { value: '9:1', text: '9:1' },
        { value: '10:1', text: '10:1' },
        { value: '3:4', text: '3:4' },
        { value: '2:3', text: '2:3' },
        { value: '9:16', text: '9:16' },
      ]
    },
    {
      type: 'number',
      key: 'maxWidth',
      min: 10,
      max: 2000,
      label: '最大宽度',
      initVal: card.maxWidth || '',
      tooltip: '图片宽度的最大值。',
      required: false,
    },
    {
      type: 'select',
@@ -332,7 +362,7 @@
      forbid: !isApp,
      options: [
        { value: '', text: '无' },
        { value: 'page', text: '菜单' },
        // { value: 'page', text: '菜单' },
        { value: 'linkpage', text: '关联菜单' },
        { value: 'custom', text: '链接' }
      ]
@@ -358,15 +388,15 @@
        { value: 'self', text: '当前页面' }
      ]
    },
    {
      type: 'select',
      key: 'copyMenuId',
      label: '复制菜单',
      initVal: card.copyMenuId || '',
      required: false,
      forbid: !isApp,
      options: appMenus
    },
    // {
    //   type: 'select',
    //   key: 'copyMenuId',
    //   label: '复制菜单',
    //   initVal: card.copyMenuId || '',
    //   required: false,
    //   forbid: !isApp,
    //   options: appMenus
    // },
    {
      type: 'radio',
      key: 'joint',