king
2022-11-30 e5980907614ee16c8eac404501b0f7a9d9316515
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
/**
 * @description Wrap表单配置信息
 */
export default function (wrap) {
  let menulist = sessionStorage.getItem('appMenus')
 
  if (menulist) {
    try {
      menulist = JSON.parse(menulist)
    } catch (e) {
      menulist = []
    }
  } else {
    menulist = []
  }
 
  const wrapForm = [
    {
      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: 'select',
      field: 'linkMenuId',
      label: '关联菜单',
      initval: wrap.linkMenuId || '',
      tooltip: '可自定义分享菜单,空值时为当前页面。',
      required: false,
      options: menulist
    },
    {
      type: 'color',
      field: 'color',
      label: '颜色',
      initval: wrap.color || '#000000',
      isHex: true,
      required: true
    },
  ]
 
  return wrapForm