king
2021-05-20 5d48f8215284ca8de312f1c85f78e07215a0faf1
src/templates/zshare/formconfig.jsx
@@ -1927,46 +1927,7 @@
    roleList = []
  }
  
  let _openType = []
  let _fieldlength = 50
  if (subtable) {
    _openType.push({
      value: 'linkMain',
      text: Formdict['header.form.linkMain']
    })
  }
  if (['fileupload', 'multiselect', 'checkbox'].includes(card.type)) {
    _fieldlength = 512
  } else if (['textarea', 'brafteditor'].includes(card.type)) {
    _fieldlength = 8000
  }
  return [
    {
      type: 'text',
      key: 'label',
      label: Formdict['model.name'],
      initVal: card.label,
      required: true,
      readonly: false
    },
    {
      type: 'text',
      key: 'field',
      label: Formdict['model.form.field'],
      initVal: card.field || '',
      required: true,
      readonly: false
    },
    {
      type: 'select',
      key: 'type',
      label: Formdict['model.form.type'],
      initVal: card.type,
      required: true,
      options: [{
  let _openType = [{
        value: 'text',
        text: Formdict['model.form.text']
      }, {
@@ -2023,8 +1984,97 @@
      }, {
        value: 'split',
        text: '分隔线'
  }]
  let _fieldlength = 50
  if (appType === 'mob') {
    _openType = [{
      value: 'text',
      text: Formdict['model.form.text']
    }, {
      value: 'number',
      text: Formdict['model.form.number']
    }, {
      value: 'select',
      text: '选择器'
    }, {
      value: 'link',
      text: Formdict['model.form.link']
    }, {
      value: 'switch',
      text: '开关'
    }, {
      value: 'checkbox',
      text: '多选框'
    }, {
      value: 'radio',
      text: '单选框'
    }, {
      value: 'checkcard',
      text: '选项卡'
    }, {
      value: 'fileupload',
      text: Formdict['header.form.fileupload']
    }, {
      value: 'date',
      text: Formdict['model.form.dateday']
    }, {
      value: 'datemonth',
      text: Formdict['model.form.datemonth']
    }, {
      value: 'datetime',
      text: Formdict['model.form.datetime']
    }, {
      value: 'textarea',
      text: Formdict['model.form.textarea']
    }, {
      value: 'funcvar',
      text: Formdict['header.form.funcvar']
    }, {
      value: 'hint',
      text: '提示'
    }, {
      value: 'split',
      text: '分隔线'
    }]
  } else if (subtable) {
    _openType.push({
      value: 'linkMain',
      text: Formdict['header.form.linkMain']
    })
  }
  if (['fileupload', 'multiselect', 'checkbox'].includes(card.type)) {
    _fieldlength = 512
  } else if (['textarea', 'brafteditor'].includes(card.type)) {
    _fieldlength = 8000
  }
  return [
    {
      type: 'text',
      key: 'label',
      label: Formdict['model.name'],
      initVal: card.label,
      required: true,
      readonly: false
      },
      ..._openType]
    {
      type: 'text',
      key: 'field',
      label: Formdict['model.form.field'],
      initVal: card.field || '',
      required: true,
      readonly: false
    },
    {
      type: 'select',
      key: 'type',
      label: Formdict['model.form.type'],
      initVal: card.type,
      required: true,
      options: _openType
    },
    {
      type: 'text',
@@ -2061,14 +2111,16 @@
      key: 'openText',
      label: '开启提示',
      initVal: card.openText || '',
      required: false
      required: false,
      forbid: appType === 'mob'
    },
    {
      type: 'text',
      key: 'closeText',
      label: '关闭提示',
      initVal: card.closeText || '',
      required: false
      required: false,
      forbid: appType === 'mob'
    },
    {
      type: 'radio',
@@ -2399,6 +2451,19 @@
    },
    {
      type: 'radio',
      key: 'cursor',
      label: '光标',
      initVal: card.cursor || 'right',
      options: [{
        value: 'right',
        text: '右对齐'
      }, {
        value: 'left',
        text: '左对齐'
      }]
    },
    {
      type: 'radio',
      key: 'readin',
      label: Formdict['header.form.readin'],
      tooltip: Formdict['header.form.readin.tooltip'],
@@ -2448,7 +2513,8 @@
      label: '表单宽度',
      initVal: card.span || (['textarea', 'hint', 'checkcard', 'brafteditor'].includes(card.type) ? 24 : 12),
      tooltip: '栅格布局整行24等分。',
      required: true
      required: true,
      forbid: appType === 'mob'
    },
    {
      type: 'number',