king
2022-04-15 21d92eff0e23974d76e3e5a79ba50e3fc1c0b879
src/menu/components/table/edit-table/options.jsx
@@ -32,18 +32,130 @@
      required: true
    },
    {
      type: 'number',
      field: 'width',
      label: '宽度',
      initval: wrap.width || 24,
      tooltip: '栅格布局,每行等分为24列。',
      min: 1,
      max: 24,
      precision: 0,
      required: true
    },
    {
      type: 'number',
      field: 'height',
      label: '高度',
      initval: wrap.height || '',
      tooltip: '表格高度,空值时高度自适应。',
      min: 10,
      max: 3000,
      precision: 0,
      required: false
    },
    {
      type: 'radio',
      field: 'editable',
      label: '初始化',
      initval: wrap.editable || 'false',
      required: false,
      options: [
        {value: 'true', label: '可编辑'},
        {value: 'false', label: '不可编辑'},
      ]
    },
    {
      type: 'radio',
      field: 'submittal',
      label: '提交后',
      initval: wrap.submittal || 'false',
      required: false,
      options: [
        {value: 'true', label: '可编辑'},
        {value: 'false', label: '不可编辑'},
      ]
    },
    {
      type: 'radio',
      field: 'addable',
      label: '可新增',
      initval: wrap.addable || 'false',
      required: false,
      options: [
        {value: 'true', label: '是'},
        {value: 'false', label: '否'},
      ]
    },
    {
      type: 'radio',
      field: 'delable',
      label: '可删除',
      initval: wrap.delable || 'true',
      required: false,
      options: [
        {value: 'true', label: '是'},
        {value: 'false', label: '否'},
      ]
    },
    {
      type: 'radio',
      field: 'commit',
      label: '数据提交',
      initval: wrap.commit || 'all',
      tooltip: '单项提交指在表单中回车或删除行时,设置为单项时如点击提交按钮,会提交修改项。',
      required: false,
      options: [
        {value: 'all', label: '全部'},
        {value: 'change', label: '修改项'},
        {value: 'simple', label: '单项'},
      ]
    },
    {
      type: 'radio',
      field: 'operType',
      label: '编辑按钮',
      initval: wrap.operType || 'btnMode',
      tooltip: '编辑时的添加、删除按钮显示位置,注:使用浮标时表格横向滚动失效,表格设置高度时浮标无效。',
      required: false,
      options: [
        {value: 'btnMode', label: '按钮式'},
        {value: 'buoyMode', label: '浮标式'},
      ]
    },
    {
      type: 'radio',
      field: 'editType',
      label: '编辑模式',
      initval: wrap.editType || 'simple',
      tooltip: '可编辑表单是否全部放开。',
      required: false,
      options: [
        {value: 'simple', label: '单项'},
        {value: 'multi', label: '整体'},
      ]
    },
    {
      type: 'radio',
      field: 'cache',
      label: '缓存',
      initval: wrap.cache || 'true',
      tooltip: '对于使用数据源的下拉菜单,下拉选项是否缓存到本地。',
      required: false,
      options: [
        {value: 'true', label: '使用'},
        {value: 'false', label: '不使用'},
      ]
    },
    {
      type: 'radio',
      field: 'tableType',
      label: '表格属性',
      initval: wrap.tableType,
      initval: wrap.tableType || '',
      required: false,
      options: [
        {value: '', label: '不可选'},
        {value: 'radio', label: '单选'},
        {value: 'checkbox', label: '多选'},
      ],
      controlFields: [
        {field: 'selected', values: ['radio', 'checkbox']},
      ]
    },
    {
@@ -95,18 +207,6 @@
    },
    {
      type: 'radio',
      field: 'selected',
      label: '首行选中',
      initval: wrap.selected || 'false',
      required: false,
      options: [
        {value: 'false', label: '无'},
        {value: 'init', label: '初始化'},
        {value: 'always', label: '数据加载'},
      ]
    },
    {
      type: 'radio',
      field: 'show',
      label: '搜索按钮',
      initval: wrap.show || 'true',
@@ -135,17 +235,6 @@
    },
    {
      type: 'number',
      field: 'width',
      label: '宽度',
      initval: wrap.width || 24,
      tooltip: '栅格布局,每行等分为24列。',
      min: 1,
      max: 24,
      precision: 0,
      required: true
    },
    {
      type: 'number',
      field: 'fontSize',
      label: '字体大小',
      initval: wrap.fontSize || 14,
@@ -156,18 +245,6 @@
    },
    {
      type: 'number',
      field: 'height',
      label: '高度',
      initval: wrap.height || '',
      tooltip: '表格高度,空值时高度自适应。',
      min: 10,
      max: 3000,
      precision: 0,
      required: false,
      forbid: appType === 'mob'
    },
    {
      type: 'number',
      field: 'advanceWidth',
      label: '高级搜索',
      initval: wrap.advanceWidth || 1000,
@@ -175,19 +252,19 @@
      min: 10,
      max: 3000,
      precision: 0,
      required: false,
      forbid: appType === 'mob'
      required: false
    },
    {
      type: 'select',
      field: 'doubleClick',
      label: '双击事件',
      initval: wrap.doubleClick || '',
      tooltip: '双击表格中行,触发的按钮。',
      type: 'radio',
      field: 'permission',
      label: '权限验证',
      initval: wrap.permission || 'false',
      required: false,
      allowClear: true,
      options: action.map(item => ({value: item.uuid, label: item.label})),
      forbid: appType === 'mob'
      options: [
        {value: 'true', label: '启用'},
        {value: 'false', label: '禁用'},
      ],
      forbid: !appType
    },
    {
      type: 'multiselect',