king
2022-04-13 b63b085814103cabe989d9600bc925559cc6d56d
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**
 * @description Wrap表单配置信息
 */
export default function (wrap) {
  const menuWrapForm = [
    {
      type: 'text',
      field: 'title',
      label: '标题',
      initval: wrap.title || '',
      required: false
    },
    {
      type: 'text',
      field: 'name',
      label: '组件名称',
      initval: wrap.name || '',
      tooltip: '用于组件间的区分。',
      required: true
    },
    {
      type: 'number',
      field: 'width',
      label: '宽度',
      initval: wrap.width || 24,
      tooltip: '栅格布局,每行等分为24列。',
      min: 1,
      max: 24,
      precision: 0,
      required: true
    },
    {
      type: 'radio',
      field: 'datatype',
      label: '数据来源',
      initval: wrap.datatype || 'static',
      tooltip: '选择静态值,无需配置数据源。',
      required: false,
      options: [
        {value: 'dynamic', label: '动态'},
        {value: 'static', label: '静态'},
      ]
    },
    {
      type: 'radio',
      field: 'layout',
      label: '菜单布局',
      initval: wrap.layout || 'grid',
      required: false,
      options: [
        {value: 'grid', label: '栅格布局'},
        {value: 'vertical', label: '上下布局'},
      ]
    },
    {
      type: 'radio',
      field: 'common',
      label: '常用',
      initval: wrap.common || 'true',
      tooltip: '当前菜单组中的菜单是否可添加至常用菜单组。',
      required: false,
      options: [
        {value: 'true', label: '可添加'},
        {value: 'false', label: '不可添加'},
      ]
    }
  ]
 
  return menuWrapForm