king
2022-08-09 8afe4acaafb4b42649155f300e24c0fb082ba971
src/templates/zshare/formconfig.jsx
@@ -3390,13 +3390,16 @@
      tooltip: '文件压缩或base64必须为图片,图片格式为jpg、png、gif 或 jpeg。注:base64只可上传一张图片。',
      options: [{
        value: 'false',
        text: '无'
        text: '默认'
      }, {
        value: 'true',
        text: '压缩'
      }, {
        value: 'base64',
        text: 'base64'
      }, {
        value: 'oss',
        text: 'oss上传'
      }]
    },
    {
@@ -3411,6 +3414,90 @@
      required: true
    },
    {
      type: 'radio',
      key: 'miniSet',
      label: '小程序设置',
      initVal: card.miniSet || 'default',
      options: [{
        value: 'default',
        text: '默认'
      }, {
        value: 'custom',
        text: '自定义'
      }],
      forbid: appType !== 'mob'
    },
    {
      type: 'checkbox',
      key: 'mediaType',
      label: '文件类型',
      initVal: card.mediaType || ['image', 'video'],
      options: [{
        value: 'image',
        text: '图片'
      }, {
        value: 'video',
        text: '视频'
      }],
      required: true,
      forbid: appType !== 'mob'
    },
    {
      type: 'checkbox',
      key: 'sourceType',
      label: '文件来源',
      initVal: card.sourceType || ['album', 'camera'],
      options: [{
        value: 'album',
        text: '相册选择'
      }, {
        value: 'camera',
        text: '相机拍摄'
      }],
      required: true,
      forbid: appType !== 'mob'
    },
    {
      type: 'radio',
      key: 'sizeType',
      label: '图片压缩',
      initVal: card.sizeType || 'compressed',
      options: [{
        value: 'compressed',
        text: '是'
      }, {
        value: 'original',
        text: '否'
      }],
      forbid: appType !== 'mob'
    },
    {
      type: 'number',
      key: 'maxDuration',
      label: '拍摄时长',
      initVal: card.maxDuration || 10,
      tooltip: '拍摄视频最长拍摄时间,单位秒。时间范围为 3s 至 60s 之间。不限制相册。',
      min: 3,
      max: 60,
      precision: 0,
      required: true,
      forbid: appType !== 'mob'
    },
    {
      type: 'radio',
      key: 'camera',
      label: '摄像头',
      initVal: card.camera || 'back',
      options: [{
        value: 'back',
        text: '后置'
      }, {
        value: 'front',
        text: '前置'
      }],
      forbid: appType !== 'mob'
    },
    {
      type: 'number',
      key: 'span',
      min: 1,