king
2023-06-16 e4666c46c685ec7eabff25af9890d54c0ff2952b
src/menu/components/carousel/data-card/options.jsx
@@ -18,6 +18,13 @@
  const cardWrapForm = [
    {
      type: 'text',
      field: 'title',
      label: '标题',
      initval: wrap.title || '',
      required: false
    },
    {
      type: 'text',
      field: 'name',
      label: '组件名称',
      initval: wrap.name || '',
@@ -46,7 +53,67 @@
        {value: 'dynamic', label: '动态'},
        {value: 'static', label: '静态'},
      ],
      controlFields: [
        {field: 'empty', values: ['dynamic']},
      ],
      forbid: subtype !== 'propcard'
    },
    {
      type: 'radio',
      field: 'display',
      label: '显示模式',
      initval: wrap.display || 'normal',
      required: false,
      options: [
        {value: 'normal', label: '正常'},
        {value: 'modal', label: '弹窗'},
      ],
      controlFields: [
        {field: 'modalWidth', values: ['modal']},
        {field: 'modalContent', values: ['modal']},
        {field: 'code', values: ['modal']},
      ]
    },
    {
      type: 'radio',
      field: 'modalContent',
      label: '弹窗内容',
      initval: wrap.modalContent || 'message',
      tooltip: '使用系统更新时,如果返回值的ErrCode为-1,只会做系统配置更新不会显示弹窗。注:数据源使用同步查询时无效。',
      required: false,
      options: [
        {value: 'message', label: '消息提醒'},
        {value: 'update', label: '系统更新'},
      ]
    },
    {
      type: 'styleInput',
      field: 'height',
      label: '组件高度',
      initval: wrap.height || '',
      required: true,
      options: ['px', 'vh']
    },
    {
      type: 'styleInput',
      field: 'modalWidth',
      label: '弹窗宽度',
      initval: wrap.modalWidth || '300px',
      required: true,
      options: ['px', 'vw'],
      forbid: appType === 'mob'
    },
    {
      type: 'text',
      field: 'code',
      label: '消息编码',
      initval: wrap.code || '',
      tooltip: '用于记录消息是否已读的标识,如果不同页面中存在相同消息,可指定固定值。',
      required: false,
      rules: [{
        pattern: /^[0-9a-zA-Z_]*$/ig,
        message: '只允许包含数字、字母以及_。'
      }]
    },
    {
      type: 'radio',
@@ -56,7 +123,10 @@
      required: false,
      options: [
        {value: 'false', label: '否'},
        {value: 'true', label: '是'},
        {value: 'true', label: '是'}
      ],
      controlFields: [
        {field: 'speed', values: ['true']}
      ]
    },
    {
@@ -64,7 +134,7 @@
      field: 'speed',
      label: '时间间隔',
      initval: wrap.speed || 3,
      tooltip: '使用自动切换时有效,默认为3秒',
      tooltip: '默认为3秒',
      min: 1,
      max: 100,
      precision: 0,
@@ -120,6 +190,31 @@
      forbid: appType === 'mob'
    },
    {
      type: 'radio',
      field: 'empty',
      label: '空值隐藏',
      initval: wrap.empty || 'show',
      tooltip: '当查询数据为空时,隐藏该组件。',
      required: false,
      skip: true,
      options: [
        {value: 'show', label: '否'},
        {value: 'hidden', label: '是'},
      ],
    },
    {
      type: 'radio',
      field: 'permission',
      label: '权限验证',
      initval: wrap.permission || (!appType ? 'true' : 'false'),
      required: false,
      options: [
        {value: 'true', label: '启用'},
        {value: 'false', label: '禁用'},
      ],
      forbid: sessionStorage.getItem('editMenuType') === 'popview'
    },
    {
      type: 'multiselect',
      field: 'blacklist',
      label: '黑名单',