king
2023-01-13 7adf0212cd71a8ec604f65ba2c2e9bdfc5dec22d
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/**
 * @description Wrap表单配置信息
 */
export default function (wrap) {
  const wrapForm = [
    {
      type: 'text',
      field: 'name',
      label: '导航栏名称',
      initval: wrap.name || '',
      required: true
    },
    {
      type: 'text',
      field: 'MenuNo',
      label: '菜单参数',
      initval: wrap.MenuNo || '',
      required: true
    },
    {
      type: 'radio',
      field: 'datatype',
      label: '数据来源',
      initval: wrap.datatype || 'static',
      tooltip: '选择静态值,无需配置数据源。',
      required: false,
      options: [
        {value: 'dynamic', label: '动态'},
        {value: 'static', label: '静态'},
      ]
    },
    {
      type: 'styleInput',
      field: 'height',
      label: '高度',
      initval: wrap.height || 50,
      required: true,
      options: ['px']
    },
    {
      type: 'radio',
      field: 'switch',
      label: '切换方式',
      initval: wrap.switch || 'default',
      tooltip: '默认时在H5中会切换页面,APP中会切换标签页,使用标签页时会强制使用标签切换。',
      required: false,
      options: [
        {value: 'default', label: '默认'},
        {value: 'tab', label: '标签页'},
      ],
      controlFields: [
        {field: 'position', values: ['tab']},
      ]
    },
    {
      type: 'radio',
      field: 'position',
      label: '菜单位置',
      initval: wrap.position || 'bottom',
      required: false,
      options: [
        {value: 'bottom', label: '底部'},
        {value: 'left', label: '左侧'},
        {value: 'right', label: '右侧'},
      ],
      controlFields: [
        {field: 'marginTop', values: ['left', 'right']},
      ]
    },
    {
      type: 'radio',
      field: 'menuStyle',
      label: '菜单样式',
      initval: wrap.menuStyle || 'default',
      tooltip: '使用APP中原生菜单栏时无效。',
      required: false,
      options: [
        {value: 'default', label: '默认'},
        {value: 'class1', label: '样式二'},
      ]
    },
    {
      type: 'styleInput',
      field: 'marginTop',
      label: '顶部缩进',
      initval: wrap.marginTop || '',
      required: false,
      options: ['px', 'vh']
    },
    {
      type: 'radio',
      field: 'permission',
      label: '权限验证',
      initval: wrap.permission || 'false',
      required: false,
      options: [
        {value: 'true', label: '启用'},
        {value: 'false', label: '禁用'},
      ]
    },
  ]
 
  return wrapForm