king
2020-05-18 763a67d39dcb0e5ae49816abcdb9cb7cbc2bd9e0
src/templates/zshare/formconfig.jsx
@@ -2078,4 +2078,90 @@
      }]
    }
  ]
}
/**
 * @description 获取卡片详情表单配置信息
 * @param {object} card  // 标签配置信息
 */
export function getCardDetailForm (card, _columns) {
  return [
    {
      type: 'radio',
      key: 'datatype',
      label: '数据类型',
      initVal: card.datatype || 'dynamic',
      required: true,
      options: [{
        value: 'dynamic',
        text: '动态'
      }, {
        value: 'static',
        text: '静态'
      }]
    },
    {
      type: 'text',
      key: 'content',
      label: '内容',
      initVal: card.content || '',
      required: true
    },
    {
      type: 'select',
      key: 'field',
      label: '字段',
      initVal: card.field || '',
      required: true,
      options: _columns
    },
    {
      type: 'radio',
      key: 'bold',
      label: '加粗',
      initVal: card.bold || 'false',
      required: true,
      options: [{
        value: 'true',
        text: '是'
      }, {
        value: 'false',
        text: '否'
      }]
    },
    {
      type: 'radio',
      key: 'width',
      label: '宽度',
      initVal: card.width || '',
      required: false,
      options: [{
        value: '',
        text: '100%'
      }, {
        value: 'helf',
        text: '50%'
      }, {
        value: 'third',
        text: '33.3%'
      }]
    },
    {
      type: 'radio',
      key: 'align',
      label: '对齐',
      initVal: card.align || '',
      required: false,
      options: [{
        value: '',
        text: '左'
      }, {
        value: 'align-center',
        text: '居中'
      }, {
        value: 'align-right',
        text: '右'
      }]
    }
  ]
}