king
2022-09-06 b8e1395f02c929eaa96b949cf6027ee2a43856a6
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -43,16 +43,8 @@
    }
  }
  let dataTypes = [
    { value: 'dynamic', text: '动态' },
    { value: 'static', text: '静态' }
  ]
  let tooltip = ''
  if (cardCell.$cardType === 'extendCard') {
    // card.datatype = 'static'
    // dataTypes = [
    //   { value: 'static', text: '静态' }
    // ]
    tooltip = '在扩展卡片中,动态数据显示值为获取到的第一行数据。'
  }
@@ -79,7 +71,10 @@
      initVal: card.datatype || 'static',
      tooltip,
      required: true,
      options: dataTypes
      options: [
        { value: 'dynamic', text: '动态' },
        { value: 'static', text: '静态' }
      ]
    },
    {
      type: 'select',
@@ -95,13 +90,14 @@
      min: 0,
      label: '内容',
      initVal: card.value || '',
      tooltip: '文本类型,会替换内容中的@username@、@fullName@、@login_city@。',
      tooltip: '文本类型,会替换内容中的@username@、@fullName@、@mk_city@、@appname@、@bid@。',
      required: true
    },
    {
      type: 'file',
      key: 'url',
      label: '图片/文件',
      tooltip: '使用静态图片时,@icon@代表头像。',
      initVal: card.url || '',
      maxfile: 1,
      required: true
@@ -129,6 +125,52 @@
      ]
    },
    {
      type: 'number',
      key: 'startTime',
      precision: 0,
      label: '开始时间',
      initVal: card.startTime || 0,
      tooltip: '视频开始播放的时间,用于调整视频初始化展示的界面。',
      required: false
    },
    {
      type: 'radio',
      key: 'posterType',
      label: '预览图',
      initVal: card.posterType || '',
      required: false,
      options: [
        { value: '', text: '无' },
        { value: 'dynamic', text: '动态' },
        { value: 'static', text: '静态' }
      ]
    },
    {
      type: 'file',
      key: 'posterUrl',
      label: '预览地址',
      initVal: card.posterUrl || '',
      maxfile: 1,
      required: true
    },
    {
      type: 'select',
      key: 'posterField',
      label: '预览地址',
      initVal: card.posterField || '',
      required: true
    },
    {
      type: 'number',
      key: 'decimal',
      min: 0,
      max: 18,
      decimal: 0,
      label: '小数位',
      initVal: card.decimal === undefined ? '' : card.decimal,
      required: false
    },
    {
      type: 'select',
      key: 'format',
      label: '格式化',
@@ -140,7 +182,10 @@
        { value: 'percent', text: '百分数' },
        { value: 'thdSeparator', text: '千分位' },
        { value: 'abs', text: '绝对值' },
        { value: 'encryption', text: '加密'},
        { value: 'YYYY-MM-DD', text: 'YYYY-MM-DD' },
        { 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' },
        { value: 'MM月DD日', text: 'MM月DD日' },
        { value: 'YYYY年MM月DD日', text: 'YYYY年MM月DD日' },
        { value: 'HH:mm', text: '时分(例:16:57)' },
@@ -163,16 +208,6 @@
        { 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: 'number',
      key: 'decimal',
      min: 0,
      max: 18,
      decimal: 0,
      label: '小数位',
      initVal: card.decimal === undefined ? '' : card.decimal,
      required: false
    },
    {
      type: 'text',
@@ -311,8 +346,8 @@
      min: 1,
      max: 10,
      label: '高度(行)',
      initVal: card.height,
      tooltip: '内容显示行数,值为空时高度自适应,注:自适应高度仅在设置卡片高度后有效。',
      initVal: card.height !== undefined ? card.height : 1,
      tooltip: '内容显示行数,值为空时高度自适应。',
      required: false
    },
    {
@@ -379,7 +414,8 @@
      min: 0,
      max: 50,
      label: '线宽',
      initVal: card.borderWidth || 1,
      initVal: card.borderWidth === undefined ? 1 : card.borderWidth,
      tooltip: '线宽为0时,为方便在开发时选中默认高度为10px,请注意调整内外边距。',
      required: true
    },
    {
@@ -557,6 +593,18 @@
      ]
    },
    {
      type: 'radio',
      key: 'copyable',
      label: '可复制',
      initVal: card.copyable || 'false',
      tooltip: '元素是否可复制,复制内容不包括前缀与后缀。',
      required: false,
      options: [
        { value: 'true', text: '是' },
        { value: 'false', text: '否' }
      ]
    },
    {
      type: 'number',
      key: 'fixSize',
      min: 10,