king
2022-11-07 af6486b3629d23e426ce85b87dbc20dfa15b1afe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
 * @description tab表单配置信息
 */
export function getTabForm(tab) {
  const tabForm = [
    {
      type: 'text',
      field: 'label',
      label: '名称',
      initval: tab.label || '',
      required: true,
      focus: true
    },
    {
      type: 'mkicon',
      field: 'icon',
      label: '图标',
      initval: tab.icon || '',
      required: false,
      allowClear: true
    },
    {
      type: 'radio',
      field: 'hide',
      label: '隐藏',
      initval: tab.hide || 'false',
      required: false,
      options: [
        {value: 'false', label: '否'},
        {value: 'true', label: '是'},
      ],
    },
    {
      type: 'radio',
      field: 'permission',
      label: '权限验证',
      initval: tab.permission || 'false',
      required: false,
      options: [
        {value: 'true', label: '启用'},
        {value: 'false', label: '禁用'},
      ]
    }
  ]
 
  return tabForm
}