wangrong
2026-08-30 4c949c0dc9bcae785c281c9d8125295f09810b15
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
export const positionData = [
  { key: 'left', label: 'X', min: -1000, max: 20000, step: 1 },
  { key: 'width', label: 'W', min: 2, max: 20000, step: 1 },
  { key: 'top', label: 'Y', min: -1000, max: 20000, step: 1 },
  { key: 'height', label: 'H', min: 2, max: 20000, step: 1 }
]
 
export const multiDimensionalData = [
  { key: 'x', label: 'X', min: -360, max: 360, step: 1 },
  { key: 'y', label: 'W', min: -360, max: 360, step: 1 },
  { key: 'z', label: 'Y', min: -360, max: 360, step: 1 }
]
 
export const styleData = [
  { key: 'lineHeight', label: '行高', min: 0, max: 50, step: 1 },
  { key: 'opacity', label: '不透明度', min: 0, max: 1, step: 0.1 },
  { key: 'borderWidth', label: '边框宽度', min: 0, max: 20, step: 1 },
  { key: 'borderStyle', label: '边框风格' },
  { key: 'borderColor', label: '边框颜色' },
  { key: 'borderRadius', label: '圆角', min: 0, max: 50, step: 1 },
  { key: 'letterSpacing', label: '字间距', min: 0, max: 50, step: 1 },
  { key: 'fontSize', label: '字体大小', min: 0, max: 128, step: 1 },
  { key: 'activeFontSize', label: '激活字体大小', min: 0, max: 128, step: 1 },
  { key: 'headFontColor', label: '标题字体颜色' },
  { key: 'headFontActiveColor', label: '标题字体激活颜色' },
  { key: 'headBorderColor', label: '标题边框颜色' },
  { key: 'headBorderActiveColor', label: '标题激活边框颜色' },
  { key: 'headHorizontalPosition', label: '标题位置' },
  { key: 'fontWeight', label: '字体粗细', min: 100, max: 900, step: 100 },
  { key: 'textAlign', label: '左右对齐' },
  { key: 'verticalAlign', label: '上下对齐' },
  { key: 'color', label: '颜色' },
  { key: 'backgroundColor', label: '背景色' }
]
 
export const styleMap = {
  left: 'x 坐标',
  top: 'y 坐标',
  rotate: '旋转角度',
  width: '宽',
  height: '高',
  color: '颜色',
  backgroundColor: '背景色',
  borderWidth: '边框宽度',
  borderStyle: '边框风格',
  borderColor: '边框颜色',
  borderRadius: '圆角',
  fontSize: '字体大小',
  fontWeight: '字体粗细',
  lineHeight: '行高',
  letterSpacing: '字间距',
  textAlign: '左右对齐',
  verticalAlign: '上下对齐',
  opacity: '不透明度'
}
 
export const textAlignOptions = [
  {
    label: '左对齐',
    value: 'left'
  },
  {
    label: '居中',
    value: 'center'
  },
  {
    label: '右对齐',
    value: 'right'
  }
]
 
export const borderStyleOptions = [
  {
    label: '实线',
    value: 'solid'
  },
  {
    label: '虚线',
    value: 'dashed'
  }
]
 
export const verticalAlignOptions = [
  {
    label: '上对齐',
    value: 'top'
  },
  {
    label: '居中对齐',
    value: 'middle'
  },
  {
    label: '下对齐',
    value: 'bottom'
  }
]
 
export const selectKey = ['textAlign', 'borderStyle', 'verticalAlign']
 
export const horizontalPosition = ['headHorizontalPosition']
 
export const fieldType = ['text', 'time', 'value', 'value', 'value', 'location', 'binary', 'url']
export const fieldTypeText = [
  '文本',
  '时间',
  '数值',
  '数值(小数)',
  '数值',
  '地理位置',
  '文件',
  'URL'
]
 
export const optionMap = {
  textAlign: textAlignOptions,
  borderStyle: borderStyleOptions,
  verticalAlign: verticalAlignOptions
}