amis-editor 4.2.0-beta.2 → 5.1.9-beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (220) hide show
  1. package/dist/6dbcbb49b6fd405190a9.png +0 -0
  2. package/dist/component/Editor.d.ts +16 -0
  3. package/dist/component/RegionWrapper.d.ts +10 -0
  4. package/dist/component/VRenderer.d.ts +10 -0
  5. package/dist/component/base/BackTop.d.ts +1 -1
  6. package/dist/component/control/APIControl.d.ts +1158 -0
  7. package/dist/component/control/ActionAPIControl.d.ts +1158 -0
  8. package/dist/component/control/BadgeControl.d.ts +133 -0
  9. package/dist/component/control/BaseControl.d.ts +248 -0
  10. package/dist/component/control/DataBindingControl.d.ts +14 -0
  11. package/dist/component/control/DataPickerControl.d.ts +13 -0
  12. package/dist/component/control/DateShortCutControl.d.ts +83 -0
  13. package/dist/component/control/FormulaControl.d.ts +51 -0
  14. package/dist/component/{Control → control}/OptionControl.d.ts +23 -34
  15. package/dist/component/{Control → control}/PopoverEdit.d.ts +0 -0
  16. package/dist/component/control/StatusControl.d.ts +44 -0
  17. package/dist/component/control/SwitchMoreControl.d.ts +224 -0
  18. package/dist/component/control/ValidationControl.d.ts +65 -0
  19. package/dist/component/control/ValidationItem.d.ts +46 -0
  20. package/dist/component/control/style-control/Background.d.ts +17 -0
  21. package/dist/component/control/style-control/Border.d.ts +18 -0
  22. package/dist/component/control/style-control/BoxModel.d.ts +17 -0
  23. package/dist/component/control/style-control/BoxShadow.d.ts +18 -0
  24. package/dist/component/control/style-control/Display.d.ts +14 -0
  25. package/dist/component/control/style-control/Font.d.ts +16 -0
  26. package/dist/component/control/style-control/font-family.d.ts +11 -0
  27. package/dist/component/control/style-control/transformation.d.ts +29 -0
  28. package/dist/component/control/style-control/types.d.ts +8 -0
  29. package/dist/component/schemaTpl.d.ts +8 -0
  30. package/dist/component/validator.d.ts +62 -0
  31. package/dist/dnd/index.d.ts +1 -1
  32. package/dist/event-action/action-config-panel.d.ts +8 -0
  33. package/dist/event-action/actions.d.ts +3 -0
  34. package/dist/event-action/comp-action-select.d.ts +11 -0
  35. package/dist/event-action/config.d.ts +13 -0
  36. package/dist/event-action/index.d.ts +459 -0
  37. package/dist/event-action/schema.d.ts +32 -0
  38. package/dist/exports.min.js +1 -1
  39. package/dist/index.d.ts +23 -5
  40. package/dist/index.min.js +1 -1
  41. package/dist/manager.d.ts +46 -1
  42. package/dist/plugin/Alert.d.ts +4 -2
  43. package/dist/plugin/Button.d.ts +5 -1
  44. package/dist/plugin/ButtonGroup.d.ts +13 -34
  45. package/dist/plugin/ButtonToolbar.d.ts +4 -10
  46. package/dist/plugin/CRUD.d.ts +2 -0
  47. package/dist/plugin/Chart.d.ts +2 -0
  48. package/dist/plugin/Collapse.d.ts +1 -0
  49. package/dist/plugin/CollapseGroup.d.ts +28 -4
  50. package/dist/plugin/Container.d.ts +2 -1
  51. package/dist/plugin/Dialog.d.ts +12 -2
  52. package/dist/plugin/Drawer.d.ts +12 -2
  53. package/dist/plugin/DropDownButton.d.ts +11 -11
  54. package/dist/plugin/Form/ButtonGroupSelect.d.ts +7 -2
  55. package/dist/plugin/Form/ButtonToolbar.d.ts +8 -7
  56. package/dist/plugin/Form/ChainedSelect.d.ts +3 -0
  57. package/dist/plugin/Form/Checkbox.d.ts +7 -2
  58. package/dist/plugin/Form/Checkboxes.d.ts +8 -2
  59. package/dist/plugin/Form/CodeEditor.d.ts +7 -22
  60. package/dist/plugin/Form/Combo.d.ts +3 -0
  61. package/dist/plugin/Form/Control.d.ts +6 -2
  62. package/dist/plugin/Form/DiffEditor.d.ts +7 -1
  63. package/dist/plugin/Form/Form.d.ts +6 -0
  64. package/dist/plugin/Form/Formula.d.ts +1 -25
  65. package/dist/plugin/Form/InputDate.d.ts +8 -2
  66. package/dist/plugin/Form/InputDateRange.d.ts +8 -2
  67. package/dist/plugin/Form/InputDateTime.d.ts +4 -4
  68. package/dist/plugin/Form/InputDateTimeRange.d.ts +4 -4
  69. package/dist/plugin/Form/InputEmail.d.ts +1 -0
  70. package/dist/plugin/Form/InputExcel.d.ts +6 -41
  71. package/dist/plugin/Form/InputFile.d.ts +7 -3
  72. package/dist/plugin/Form/InputKV.d.ts +6 -0
  73. package/dist/plugin/Form/InputMonth.d.ts +1 -0
  74. package/dist/plugin/Form/InputMonthRange.d.ts +4 -4
  75. package/dist/plugin/Form/InputPassword.d.ts +1 -0
  76. package/dist/plugin/Form/InputQuarter.d.ts +1 -0
  77. package/dist/plugin/Form/InputQuarterRange.d.ts +4 -4
  78. package/dist/plugin/Form/InputRange.d.ts +3 -0
  79. package/dist/plugin/Form/InputRating.d.ts +9 -3
  80. package/dist/plugin/Form/InputText.d.ts +24 -2
  81. package/dist/plugin/Form/InputTime.d.ts +3 -3
  82. package/dist/plugin/Form/InputTimeRange.d.ts +20 -0
  83. package/dist/plugin/Form/InputTree.d.ts +6 -2
  84. package/dist/plugin/Form/InputURL.d.ts +1 -0
  85. package/dist/plugin/Form/InputYear.d.ts +1 -0
  86. package/dist/plugin/Form/InputYearRange.d.ts +20 -0
  87. package/dist/plugin/Form/ListSelect.d.ts +6 -2
  88. package/dist/plugin/Form/LocationPicker.d.ts +1 -31
  89. package/dist/plugin/Form/NestedSelect.d.ts +5 -2
  90. package/dist/plugin/Form/Radios.d.ts +7 -2
  91. package/dist/plugin/Form/Select.d.ts +7 -2
  92. package/dist/plugin/Form/Switch.d.ts +7 -2
  93. package/dist/plugin/Form/TabsTransfer.d.ts +5 -2
  94. package/dist/plugin/Form/Textarea.d.ts +7 -1
  95. package/dist/plugin/Form/Transfer.d.ts +5 -2
  96. package/dist/plugin/Form/TreeSelect.d.ts +6 -2
  97. package/dist/plugin/IFrame.d.ts +2 -2
  98. package/dist/plugin/Nav.d.ts +1 -116
  99. package/dist/plugin/Others/Action.d.ts +5 -1
  100. package/dist/plugin/Page.d.ts +5 -2
  101. package/dist/plugin/Progress.d.ts +5 -1
  102. package/dist/plugin/Table.d.ts +2 -0
  103. package/dist/plugin/Tabs.d.ts +33 -2
  104. package/dist/plugin/TooltipWrapper.d.ts +10 -0
  105. package/dist/plugin/Tpl.d.ts +2 -1
  106. package/dist/plugin/Wizard.d.ts +4 -1
  107. package/dist/plugin.d.ts +37 -1
  108. package/dist/store/editor.d.ts +55 -28
  109. package/dist/store/node.d.ts +16 -0
  110. package/dist/style.css +1 -1
  111. package/dist/util.d.ts +36 -3
  112. package/package.json +14 -8
  113. package/src/component/schemaTpl.tsx +1209 -474
  114. package/src/plugin/Alert.tsx +69 -48
  115. package/src/plugin/AnchorNav.tsx +1 -0
  116. package/src/plugin/Audio.tsx +9 -15
  117. package/src/plugin/Avatar.tsx +2 -1
  118. package/src/plugin/Breadcrumb.tsx +2 -1
  119. package/src/plugin/Button.tsx +257 -188
  120. package/src/plugin/ButtonGroup.tsx +99 -38
  121. package/src/plugin/ButtonToolbar.tsx +7 -13
  122. package/src/plugin/CRUD.tsx +78 -136
  123. package/src/plugin/Card.tsx +1 -0
  124. package/src/plugin/Cards.tsx +8 -14
  125. package/src/plugin/Carousel.tsx +1 -1
  126. package/src/plugin/Chart.tsx +26 -14
  127. package/src/plugin/Collapse.tsx +78 -78
  128. package/src/plugin/CollapseGroup.tsx +165 -83
  129. package/src/plugin/Container.tsx +59 -6
  130. package/src/plugin/Custom.tsx +2 -8
  131. package/src/plugin/CustomRegion.tsx +4 -3
  132. package/src/plugin/Dialog.tsx +55 -24
  133. package/src/plugin/Drawer.tsx +65 -35
  134. package/src/plugin/DropDownButton.tsx +95 -79
  135. package/src/plugin/Flex.tsx +123 -65
  136. package/src/plugin/Form/ButtonGroupSelect.tsx +114 -26
  137. package/src/plugin/Form/ButtonToolbar.tsx +62 -55
  138. package/src/plugin/Form/ChainedSelect.tsx +45 -0
  139. package/src/plugin/Form/Checkbox.tsx +122 -33
  140. package/src/plugin/Form/Checkboxes.tsx +154 -87
  141. package/src/plugin/Form/CodeEditor.tsx +163 -34
  142. package/src/plugin/Form/Combo.tsx +104 -65
  143. package/src/plugin/Form/Control.tsx +16 -70
  144. package/src/plugin/Form/DiffEditor.tsx +158 -54
  145. package/src/plugin/Form/FieldSet.tsx +6 -11
  146. package/src/plugin/Form/Form.tsx +277 -70
  147. package/src/plugin/Form/Formula.tsx +8 -14
  148. package/src/plugin/Form/InputArray.tsx +7 -16
  149. package/src/plugin/Form/InputCity.tsx +1 -1
  150. package/src/plugin/Form/InputDate.tsx +344 -121
  151. package/src/plugin/Form/InputDateRange.tsx +303 -161
  152. package/src/plugin/Form/InputDateTime.tsx +6 -150
  153. package/src/plugin/Form/InputDateTimeRange.tsx +7 -187
  154. package/src/plugin/Form/InputEmail.tsx +1 -0
  155. package/src/plugin/Form/InputExcel.tsx +70 -27
  156. package/src/plugin/Form/InputFile.tsx +326 -152
  157. package/src/plugin/Form/InputImage.tsx +1 -1
  158. package/src/plugin/Form/InputKV.tsx +61 -0
  159. package/src/plugin/Form/InputMonth.tsx +3 -1
  160. package/src/plugin/Form/InputMonthRange.tsx +6 -160
  161. package/src/plugin/Form/InputNumber.tsx +1 -1
  162. package/src/plugin/Form/InputPassword.tsx +2 -0
  163. package/src/plugin/Form/InputQuarter.tsx +3 -1
  164. package/src/plugin/Form/InputQuarterRange.tsx +6 -160
  165. package/src/plugin/Form/InputRange.tsx +74 -4
  166. package/src/plugin/Form/InputRating.tsx +347 -35
  167. package/src/plugin/Form/InputRichText.tsx +2 -3
  168. package/src/plugin/Form/InputTable.tsx +33 -49
  169. package/src/plugin/Form/InputTag.tsx +1 -1
  170. package/src/plugin/Form/InputText.tsx +310 -132
  171. package/src/plugin/Form/InputTime.tsx +4 -53
  172. package/src/plugin/Form/InputTimeRange.tsx +41 -0
  173. package/src/plugin/Form/InputTree.tsx +196 -46
  174. package/src/plugin/Form/InputURL.tsx +2 -0
  175. package/src/plugin/Form/InputYear.tsx +2 -0
  176. package/src/plugin/Form/InputYearRange.tsx +41 -0
  177. package/src/plugin/Form/Item.tsx +17 -18
  178. package/src/plugin/Form/ListSelect.tsx +75 -20
  179. package/src/plugin/Form/LocationPicker.tsx +2 -7
  180. package/src/plugin/Form/MatrixCheckboxes.tsx +1 -1
  181. package/src/plugin/Form/NestedSelect.tsx +110 -43
  182. package/src/plugin/Form/Picker.tsx +2 -5
  183. package/src/plugin/Form/Radios.tsx +122 -52
  184. package/src/plugin/Form/Select.tsx +239 -168
  185. package/src/plugin/Form/Static.tsx +1 -1
  186. package/src/plugin/Form/Switch.tsx +170 -58
  187. package/src/plugin/Form/TabsTransfer.tsx +175 -79
  188. package/src/plugin/Form/Textarea.tsx +146 -36
  189. package/src/plugin/Form/Transfer.tsx +295 -233
  190. package/src/plugin/Form/TreeSelect.tsx +287 -146
  191. package/src/plugin/Grid.tsx +340 -312
  192. package/src/plugin/HBox.tsx +1 -0
  193. package/src/plugin/IFrame.tsx +21 -12
  194. package/src/plugin/Image.tsx +7 -12
  195. package/src/plugin/Images.tsx +7 -12
  196. package/src/plugin/Link.tsx +6 -12
  197. package/src/plugin/List.tsx +6 -10
  198. package/src/plugin/ListItem.tsx +1 -0
  199. package/src/plugin/Nav.tsx +7 -9
  200. package/src/plugin/Others/Action.tsx +16 -10
  201. package/src/plugin/Others/BasicToolbar.tsx +4 -1
  202. package/src/plugin/Others/TableCell.tsx +19 -39
  203. package/src/plugin/Page.tsx +315 -229
  204. package/src/plugin/Panel.tsx +6 -7
  205. package/src/plugin/Plain.tsx +3 -6
  206. package/src/plugin/Progress.tsx +234 -94
  207. package/src/plugin/Service.tsx +10 -6
  208. package/src/plugin/Table.tsx +49 -20
  209. package/src/plugin/TableView.tsx +212 -106
  210. package/src/plugin/Tabs.tsx +306 -146
  211. package/src/plugin/TooltipWrapper.tsx +231 -135
  212. package/src/plugin/Tpl.tsx +68 -52
  213. package/src/plugin/Video.tsx +9 -20
  214. package/src/plugin/Wizard.tsx +537 -336
  215. package/src/plugin/Wrapper.tsx +82 -61
  216. package/src/plugin.ts +66 -4
  217. package/static/empty.png +0 -0
  218. package/dist/component/Control/APIControl.d.ts +0 -504
  219. package/dist/component/Control/ValidationControl.d.ts +0 -30
  220. package/dist/component/remarkTpl.d.ts +0 -150
@@ -1,15 +1,8 @@
1
- import {relativeValueRe} from 'amis';
2
- import {defaultValue, getSchemaTpl} from '../../component/schemaTpl';
3
1
  import {registerEditorPlugin} from '../../manager';
4
- import {
5
- BasePlugin,
6
- BasicSubRenderInfo,
7
- RendererEventContext,
8
- SubRendererInfo
9
- } from '../../plugin';
10
- import moment from 'moment';
11
2
 
12
- export class DateTimeRangeControlPlugin extends BasePlugin {
3
+ import {DateRangeControlPlugin} from './InputDateRange';
4
+
5
+ export class DateTimeRangeControlPlugin extends DateRangeControlPlugin {
13
6
  // 关联渲染器名字
14
7
  rendererName = 'input-datetime-range';
15
8
  $schema = '/schemas/DateTimeRangeControlSchema.json';
@@ -26,8 +19,8 @@ export class DateTimeRangeControlPlugin extends BasePlugin {
26
19
  tags = ['表单项'];
27
20
  scaffold = {
28
21
  type: 'input-datetime-range',
29
- label: '日期时间范围',
30
- name: 'input-datetime-range'
22
+ label: '日期范围',
23
+ name: 'datetime-range'
31
24
  };
32
25
  previewSchema: any = {
33
26
  type: 'form',
@@ -41,181 +34,8 @@ export class DateTimeRangeControlPlugin extends BasePlugin {
41
34
  ]
42
35
  };
43
36
 
44
- panelTitle = '日期时间范围';
45
- panelBody = [
46
- getSchemaTpl('placeholder', {
47
- pipeIn: defaultValue('请选择日期时间范围')
48
- }),
49
-
50
- {
51
- type: 'input-text',
52
- name: 'format',
53
- label: '值格式',
54
- description:
55
- '请参考 <a href="https://momentjs.com/" target="_blank">moment</a> 中的格式用法。',
56
- pipeIn: defaultValue('X'),
57
- onChange: (value: any, oldValue: any, model: any, form: any) => {
58
- form.setValueByName('value', '');
59
- form.setValueByName('minDate', '');
60
- form.setValueByName('maxDate', '');
61
- }
62
- },
63
-
64
- getSchemaTpl('switchDefaultValue'),
65
-
66
- {
67
- type: 'input-text',
68
- name: 'value',
69
- label: '默认值',
70
- visibleOn: 'typeof this.value !== "undefined"',
71
- placeholder: '请输入相对值',
72
- description:
73
- '支持 <code>now、+1day、-2weeks</code>这种相对值用法,由于包含开始和结束时间,请用逗号隔开。'
74
- },
75
-
76
- {
77
- type: 'fieldSet',
78
- title: '使用固定值',
79
- visibleOn: 'typeof this.value !== "undefined"',
80
- collapsed: true,
81
- collapsable: true,
82
- className: 'fieldset',
83
- body: [
84
- {
85
- type: 'input-datetime-range',
86
- name: 'value',
87
- pipeIn: (value: any) =>
88
- value
89
- ? value
90
- .split(',')
91
- .map((item: any) =>
92
- moment(
93
- relativeValueRe.test(item) ||
94
- ~['now', 'today'].indexOf(item)
95
- ? ''
96
- : item
97
- ).format('X')
98
- )
99
- : '',
100
- pipeOut: (value: any, old: any, data: any) => {
101
- let {format} = data;
102
- if (format) {
103
- let val = value.split(',');
104
- value = val
105
- .map((item: string) =>
106
- moment(parseInt(item, 10), 'X').format(format)
107
- )
108
- .join(',');
109
- }
110
- return value;
111
- }
112
- }
113
- ]
114
- },
115
- getSchemaTpl('clearable', {
116
- pipeIn: defaultValue(true)
117
- }),
118
- {
119
- type: 'input-text',
120
- name: 'minDate',
121
- label: '最小日期时间',
122
- placeholder: '请输入相对值',
123
- description:
124
- '支持 <code>now、+1day、-2weeks</code>这种相对值用法,同时支持变量如<code>\\${start_date}</code>'
125
- },
126
-
127
- {
128
- type: 'fieldSet',
129
- title: '使用固定值',
130
- collapsed: true,
131
- collapsable: true,
132
- className: 'fieldset',
133
- body: [
134
- {
135
- type: 'input-datetime',
136
- name: 'minDate',
137
- pipeIn: (value: any) =>
138
- moment(
139
- relativeValueRe.test(value) || ~['now', 'today'].indexOf(value)
140
- ? ''
141
- : value
142
- ).format('X'),
143
- pipeOut: (value: any, old: any, data: any) => {
144
- return moment(parseInt(value, 10), 'X').format(data.format);
145
- }
146
- }
147
- ]
148
- },
149
-
150
- {
151
- type: 'divider'
152
- },
153
-
154
- {
155
- type: 'input-text',
156
- name: 'maxDate',
157
- label: '最大日期时间',
158
- placeholder: '请输入相对值',
159
- description:
160
- '支持 <code>now、+1day、-2weeks</code>这种相对值用法,同时支持变量如<code>\\${start_date}</code>'
161
- },
162
-
163
- {
164
- type: 'fieldSet',
165
- title: '使用固定值',
166
- collapsed: true,
167
- collapsable: true,
168
- className: 'fieldset',
169
- body: [
170
- {
171
- type: 'input-datetime',
172
- name: 'maxDate',
173
- pipeIn: (value: any) =>
174
- moment(
175
- relativeValueRe.test(value) || ~['now', 'today'].indexOf(value)
176
- ? ''
177
- : value
178
- ).format('X'),
179
- pipeOut: (value: any, old: any, data: any) => {
180
- return moment(parseInt(value, 10), 'X').format(data.format);
181
- }
182
- }
183
- ]
184
- },
185
- {
186
- type: 'input-text',
187
- name: 'minDuration',
188
- label: '限制最小跨度',
189
- description: '比如 2days'
190
- },
191
- {
192
- type: 'input-text',
193
- name: 'ranges',
194
- label: '日期范围快捷键',
195
- description:
196
- '比如 today, yesterday, 1dayago, 7daysago, 90daysago, prevweek, thismonth, prevmonth, prevquarter, thisquarter'
197
- },
198
- {
199
- type: 'input-text',
200
- name: 'maxDuration',
201
- label: '限制最大跨度',
202
- description: '比如 1year'
203
- },
204
- {
205
- name: 'utc',
206
- label: '是否使用 UTC 时间',
207
- type: 'switch',
208
- mode: 'inline',
209
- className: 'block'
210
- },
211
- {
212
- name: 'embed',
213
- label: '是否内嵌模式',
214
- type: 'switch',
215
- mode: 'inline',
216
- className: 'block'
217
- }
218
- ];
37
+ disabledRendererPlugin = true;
38
+ notRenderFormZone = true;
219
39
  }
220
40
 
221
41
  registerEditorPlugin(DateTimeRangeControlPlugin);
@@ -17,6 +17,7 @@ export class EmailControlPlugin extends TextControlPlugin {
17
17
  name: 'email'
18
18
  };
19
19
 
20
+ disabledRendererPlugin = true;
20
21
  previewSchema = {
21
22
  type: 'form',
22
23
  className: 'text-left',
@@ -9,10 +9,13 @@ import {
9
9
  import {registerEditorPlugin} from '../../manager';
10
10
  import {
11
11
  BasePlugin,
12
+ BaseEventContext,
12
13
  BasicSubRenderInfo,
13
14
  RendererEventContext,
14
15
  SubRendererInfo
15
16
  } from '../../plugin';
17
+ import {formItemControl} from '../../component/control/BaseControl';
18
+ import {RendererAction, RendererEvent} from '../../event-action';
16
19
 
17
20
  export class ExcelControlPlugin extends BasePlugin {
18
21
  // 关联渲染器名字
@@ -43,43 +46,83 @@ export class ExcelControlPlugin extends BasePlugin {
43
46
  ]
44
47
  };
45
48
  panelTitle = '上传 Excel';
46
- panelBody = [
49
+
50
+ notRenderFormZone = true;
51
+
52
+ // 事件定义
53
+ events: RendererEvent[] = [
47
54
  {
48
- label: '解析模式',
49
- name: 'parseMode',
50
- type: 'select',
51
- options: [
55
+ eventName: 'change',
56
+ eventLabel: '值变化',
57
+ description: 'excel 上传解析完成后触发',
58
+ dataSchema: [
52
59
  {
53
- label: '对象',
54
- value: 'object'
55
- },
56
- {label: '数组', value: 'array'}
60
+ type: 'object',
61
+ properties: {
62
+ 'event.data.value': {
63
+ type: 'string',
64
+ title: 'excel 解析后的数据'
65
+ }
66
+ }
67
+ }
57
68
  ]
58
- },
69
+ }
70
+ ];
71
+
72
+ // 动作定义
73
+ actions: RendererAction[] = [
59
74
  {
60
- type: 'switch',
61
- name: 'allSheets',
62
- label: '是否解析所有 Sheet',
63
- mode: 'inline',
64
- className: 'w-full'
75
+ actionType: 'clear',
76
+ actionLabel: '清空',
77
+ description: '清除选中值'
65
78
  },
66
79
  {
67
- type: 'switch',
68
- name: 'plainText',
69
- label: '是否解析为纯文本',
70
- pipeIn: defaultValue(true),
71
- mode: 'inline',
72
- className: 'w-full'
80
+ actionType: 'reset',
81
+ actionLabel: '重置',
82
+ description: '将值重置为resetValue,若没有配置resetValue,则清空'
73
83
  },
74
84
  {
75
- type: 'switch',
76
- name: 'includeEmpty',
77
- label: '是否包含空内容',
78
- mode: 'inline',
79
- visibleOn: 'data.parseMode === "array"',
80
- className: 'w-full'
85
+ actionType: 'setValue',
86
+ actionLabel: '赋值',
87
+ description: '触发组件数据更新'
81
88
  }
82
89
  ];
90
+ panelBodyCreator = (context: BaseEventContext) => {
91
+ return formItemControl({
92
+ common: {
93
+ body: [
94
+ {
95
+ label: '解析模式',
96
+ name: 'parseMode',
97
+ type: 'select',
98
+ options: [
99
+ {
100
+ label: '对象',
101
+ value: 'object'
102
+ },
103
+ {label: '数组', value: 'array'}
104
+ ]
105
+ },
106
+ getSchemaTpl('switch', {
107
+ name: 'allSheets',
108
+ label: '是否解析所有 Sheet'
109
+ }),
110
+
111
+ getSchemaTpl('switch', {
112
+ name: 'plainText',
113
+ label: '是否解析为纯文本',
114
+ pipeIn: defaultValue(true)
115
+ }),
116
+
117
+ getSchemaTpl('switch', {
118
+ name: 'includeEmpty',
119
+ label: '是否包含空内容',
120
+ visibleOn: 'data.parseMode === "array"'
121
+ })
122
+ ]
123
+ }
124
+ }, context);
125
+ };
83
126
  }
84
127
 
85
128
  registerEditorPlugin(ExcelControlPlugin);