king
2020-11-10 a9ac16fecc0cf9bc66dfaefe4e9b35fa3c722812
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -19,6 +19,9 @@
    { value: 'link', text: '链接'},
    { value: 'slider', text: '进度条'},
    { value: 'splitline', text: '分割线'},
    { value: 'barcode', text: '条形码'},
    { value: 'qrcode', text: '二维码'},
    { value: 'currentDate', text: '当前时间'},
  ]
  if (type === 'table') {
@@ -95,6 +98,14 @@
      options: []
    },
    {
      type: 'text',
      key: 'value',
      min: 0,
      label: '内容',
      initVal: card.value || '',
      required: true
    },
    {
      type: 'file',
      key: 'url',
      label: '图片',
@@ -104,18 +115,38 @@
    },
    {
      type: 'text',
      key: 'value',
      min: 0,
      label: '内容',
      initVal: card.value || '',
      required: true
    },
    {
      type: 'text',
      key: 'label',
      label: '显示信息',
      initVal: card.label || '',
      required: false
    },
    {
      type: 'select',
      key: 'format',
      label: '格式化',
      initVal: card.format || '',
      tooltip: '注:百分数、千分位对于数值类型有效,YYYY-MM-DD对于时间类型的文本有效。',
      required: false,
      options: [
        { value: '', text: '无' },
        { value: 'percent', text: '百分数' },
        { value: 'thdSeparator', text: '千分位' },
        { value: 'YYYY-MM-DD', text: 'YYYY-MM-DD' }
      ]
    },
    {
      type: 'select',
      key: 'dateFormat',
      label: '格式化',
      initVal: card.dateFormat || 'YYYY-MM-DD',
      required: true,
      options: [
        { value: 'YYYY-MM-DD', text: 'YYYY-MM-DD' },
        { value: 'YYYY', text: 'YYYY' },
        { value: 'YYYY-MM', text: 'YYYY-MM' },
        { value: 'YYYY-MM-DD HH:mm', text: 'YYYY-MM-DD HH:mm' },
        { value: 'YYYY-MM-DD HH:mm:ss', text: 'YYYY-MM-DD HH:mm:ss' },
      ]
    },
    {
      type: 'text',
@@ -140,24 +171,10 @@
      required: false
    },
    {
      type: 'select',
      key: 'format',
      label: '格式化',
      initVal: card.format || '',
      tooltip: '注:百分数、千分位对于数值类型有效,YYYY-MM-DD对于时间类型的文本有效。',
      required: false,
      options: [
        { value: '', text: '无' },
        { value: 'percent', text: '百分数' },
        { value: 'thdSeparator', text: '千分位' },
        { value: 'YYYY-MM-DD', text: 'YYYY-MM-DD' }
      ]
    },
    {
      type: 'color',
      key: 'color',
      label: '颜色',
      initVal: card.color,
      initVal: card.color || 'rgba(0, 0, 0, 0.85)',
      required: true
    },
    {
@@ -175,7 +192,7 @@
      min: 1,
      max: 24,
      precision: 0,
      label: '宽度',
      label: '元素宽度',
      initVal: card.width || 12,
      tooltip: '栅格布局,每行等分为24列。',
      required: true
@@ -190,6 +207,54 @@
      required: true,
    },
    {
      type: 'number',
      key: 'barHeight',
      min: 5,
      max: 50,
      label: '高度',
      initVal: card.barHeight || 25,
      required: true,
    },
    {
      type: 'number',
      key: 'qrWidth',
      min: 5,
      max: 500,
      label: '宽度',
      initVal: card.qrWidth || 50,
      required: true,
    },
    {
      type: 'number',
      key: 'interval',
      min: 0.1,
      max: 10,
      precision: 1,
      label: '线条间隔',
      initVal: card.interval || 1,
      required: true,
    },
    {
      type: 'radio',
      key: 'displayValue',
      label: '显示值',
      initVal: card.displayValue || 'false',
      required: false,
      options: [
        { value: 'true', text: '是' },
        { value: 'false', text: '否' }
      ]
    },
    {
      type: 'number',
      key: 'borderWidth',
      min: 0,
      max: 50,
      label: '线宽',
      initVal: card.borderWidth || 1,
      required: true
    },
    {
      type: 'select',
      key: 'lenWidRadio',
      label: '长宽比',