amis-editor 4.2.0-beta.0 → 5.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) 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/ShortcutKey.d.ts +23 -0
  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 +1 -1
  16. package/dist/component/control/StatusControl.d.ts +39 -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 +24 -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 +65 -38
  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 -9
  113. package/src/component/schemaTpl.tsx +1198 -474
  114. package/src/plugin/.DS_Store +0 -0
  115. package/src/plugin/Alert.tsx +69 -48
  116. package/src/plugin/AnchorNav.tsx +1 -0
  117. package/src/plugin/Audio.tsx +9 -15
  118. package/src/plugin/Avatar.tsx +2 -1
  119. package/src/plugin/Breadcrumb.tsx +2 -1
  120. package/src/plugin/Button.tsx +257 -188
  121. package/src/plugin/ButtonGroup.tsx +99 -38
  122. package/src/plugin/ButtonToolbar.tsx +7 -13
  123. package/src/plugin/CRUD.tsx +77 -135
  124. package/src/plugin/Card.tsx +1 -0
  125. package/src/plugin/Cards.tsx +8 -14
  126. package/src/plugin/Carousel.tsx +1 -1
  127. package/src/plugin/Chart.tsx +26 -14
  128. package/src/plugin/Collapse.tsx +78 -78
  129. package/src/plugin/CollapseGroup.tsx +165 -83
  130. package/src/plugin/Container.tsx +59 -6
  131. package/src/plugin/Custom.tsx +2 -8
  132. package/src/plugin/CustomRegion.tsx +4 -3
  133. package/src/plugin/Dialog.tsx +55 -24
  134. package/src/plugin/Drawer.tsx +65 -35
  135. package/src/plugin/DropDownButton.tsx +95 -79
  136. package/src/plugin/Flex.tsx +123 -65
  137. package/src/plugin/Form/ButtonGroupSelect.tsx +114 -26
  138. package/src/plugin/Form/ButtonToolbar.tsx +62 -55
  139. package/src/plugin/Form/ChainedSelect.tsx +45 -0
  140. package/src/plugin/Form/Checkbox.tsx +122 -33
  141. package/src/plugin/Form/Checkboxes.tsx +154 -87
  142. package/src/plugin/Form/CodeEditor.tsx +163 -34
  143. package/src/plugin/Form/Combo.tsx +104 -65
  144. package/src/plugin/Form/Control.tsx +16 -70
  145. package/src/plugin/Form/DiffEditor.tsx +158 -54
  146. package/src/plugin/Form/FieldSet.tsx +6 -11
  147. package/src/plugin/Form/Form.tsx +277 -70
  148. package/src/plugin/Form/Formula.tsx +8 -14
  149. package/src/plugin/Form/InputArray.tsx +7 -16
  150. package/src/plugin/Form/InputCity.tsx +1 -1
  151. package/src/plugin/Form/InputDate.tsx +344 -121
  152. package/src/plugin/Form/InputDateRange.tsx +303 -161
  153. package/src/plugin/Form/InputDateTime.tsx +6 -150
  154. package/src/plugin/Form/InputDateTimeRange.tsx +7 -187
  155. package/src/plugin/Form/InputEmail.tsx +1 -0
  156. package/src/plugin/Form/InputExcel.tsx +70 -27
  157. package/src/plugin/Form/InputFile.tsx +326 -152
  158. package/src/plugin/Form/InputImage.tsx +1 -1
  159. package/src/plugin/Form/InputKV.tsx +61 -0
  160. package/src/plugin/Form/InputMonth.tsx +3 -1
  161. package/src/plugin/Form/InputMonthRange.tsx +6 -160
  162. package/src/plugin/Form/InputNumber.tsx +1 -1
  163. package/src/plugin/Form/InputPassword.tsx +2 -0
  164. package/src/plugin/Form/InputQuarter.tsx +3 -1
  165. package/src/plugin/Form/InputQuarterRange.tsx +6 -160
  166. package/src/plugin/Form/InputRange.tsx +74 -4
  167. package/src/plugin/Form/InputRating.tsx +347 -35
  168. package/src/plugin/Form/InputRichText.tsx +2 -3
  169. package/src/plugin/Form/InputTable.tsx +33 -49
  170. package/src/plugin/Form/InputTag.tsx +1 -1
  171. package/src/plugin/Form/InputText.tsx +310 -132
  172. package/src/plugin/Form/InputTime.tsx +4 -53
  173. package/src/plugin/Form/InputTimeRange.tsx +41 -0
  174. package/src/plugin/Form/InputTree.tsx +196 -46
  175. package/src/plugin/Form/InputURL.tsx +2 -0
  176. package/src/plugin/Form/InputYear.tsx +2 -0
  177. package/src/plugin/Form/InputYearRange.tsx +41 -0
  178. package/src/plugin/Form/Item.tsx +17 -18
  179. package/src/plugin/Form/ListSelect.tsx +75 -20
  180. package/src/plugin/Form/LocationPicker.tsx +2 -7
  181. package/src/plugin/Form/MatrixCheckboxes.tsx +1 -1
  182. package/src/plugin/Form/NestedSelect.tsx +110 -43
  183. package/src/plugin/Form/Picker.tsx +2 -5
  184. package/src/plugin/Form/Radios.tsx +122 -52
  185. package/src/plugin/Form/Select.tsx +239 -168
  186. package/src/plugin/Form/Static.tsx +1 -1
  187. package/src/plugin/Form/Switch.tsx +170 -58
  188. package/src/plugin/Form/TabsTransfer.tsx +175 -79
  189. package/src/plugin/Form/Textarea.tsx +146 -36
  190. package/src/plugin/Form/Transfer.tsx +295 -233
  191. package/src/plugin/Form/TreeSelect.tsx +287 -146
  192. package/src/plugin/Grid.tsx +340 -312
  193. package/src/plugin/HBox.tsx +1 -0
  194. package/src/plugin/IFrame.tsx +21 -12
  195. package/src/plugin/Image.tsx +7 -12
  196. package/src/plugin/Images.tsx +7 -12
  197. package/src/plugin/Link.tsx +6 -12
  198. package/src/plugin/List.tsx +6 -10
  199. package/src/plugin/ListItem.tsx +1 -0
  200. package/src/plugin/Nav.tsx +7 -9
  201. package/src/plugin/Others/Action.tsx +16 -10
  202. package/src/plugin/Others/BasicToolbar.tsx +4 -1
  203. package/src/plugin/Others/TableCell.tsx +19 -39
  204. package/src/plugin/Page.tsx +315 -229
  205. package/src/plugin/Panel.tsx +6 -7
  206. package/src/plugin/Plain.tsx +3 -6
  207. package/src/plugin/Progress.tsx +234 -94
  208. package/src/plugin/Service.tsx +10 -6
  209. package/src/plugin/Table.tsx +49 -20
  210. package/src/plugin/TableView.tsx +212 -106
  211. package/src/plugin/Tabs.tsx +306 -146
  212. package/src/plugin/TooltipWrapper.tsx +231 -135
  213. package/src/plugin/Tpl.tsx +68 -52
  214. package/src/plugin/Video.tsx +9 -20
  215. package/src/plugin/Wizard.tsx +537 -336
  216. package/src/plugin/Wrapper.tsx +82 -61
  217. package/src/plugin.ts +66 -4
  218. package/static/empty.png +0 -0
  219. package/dist/component/Control/APIControl.d.ts +0 -504
  220. package/dist/component/Control/ValidationControl.d.ts +0 -30
  221. package/dist/component/remarkTpl.d.ts +0 -150
@@ -1,6 +1,9 @@
1
+ import content from '*.svg';
2
+ import {RendererAction, RendererEvent} from '../../event-action';
1
3
  import {defaultValue, getSchemaTpl} from '../../component/schemaTpl';
2
4
  import {registerEditorPlugin} from '../../manager';
3
- import {BasePlugin} from '../../plugin';
5
+ import {BaseEventContext, BasePlugin} from '../../plugin';
6
+ import {getEventControlConfig} from '../../util';
4
7
 
5
8
  export class TreeSelectControlPlugin extends BasePlugin {
6
9
  // 关联渲染器名字
@@ -50,8 +53,157 @@ export class TreeSelectControlPlugin extends BasePlugin {
50
53
  }
51
54
  };
52
55
 
56
+ notRenderFormZone = true;
57
+
53
58
  panelTitle = '树下拉';
54
59
 
60
+ // 事件定义
61
+ events: RendererEvent[] = [
62
+ {
63
+ eventName: 'change',
64
+ eventLabel: '值变化',
65
+ description: '选中值变化时触发',
66
+ dataSchema: [
67
+ {
68
+ type: 'object',
69
+ properties: {
70
+ 'event.data.value': {
71
+ type: 'string',
72
+ title: '选中节点的值'
73
+ }
74
+ }
75
+ }
76
+ ]
77
+ },
78
+ {
79
+ eventName: 'add',
80
+ eventLabel: '新增选项',
81
+ description: '新增选项提交时触发',
82
+ dataSchema: [
83
+ {
84
+ type: 'object',
85
+ properties: {
86
+ 'event.data.value': {
87
+ type: 'object',
88
+ title: '新增的选项信息'
89
+ },
90
+ 'event.data.options': {
91
+ type: 'array',
92
+ title: '选项集合'
93
+ }
94
+ }
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ eventName: 'edit',
100
+ eventLabel: '编辑选项',
101
+ description: '编辑选项提交时触发',
102
+ dataSchema: [
103
+ {
104
+ type: 'object',
105
+ properties: {
106
+ 'event.data.value': {
107
+ type: 'object',
108
+ title: '编辑的选项信息'
109
+ },
110
+ 'event.data.options': {
111
+ type: 'array',
112
+ title: '选项集合'
113
+ }
114
+ }
115
+ }
116
+ ]
117
+ },
118
+ {
119
+ eventName: 'delete',
120
+ eventLabel: '删除节点',
121
+ description: '删除选项提交时触发',
122
+ dataSchema: [
123
+ {
124
+ type: 'object',
125
+ properties: {
126
+ 'event.data.value': {
127
+ type: 'object',
128
+ title: '删除的选项信息'
129
+ },
130
+ 'event.data.options': {
131
+ type: 'array',
132
+ title: '选项集合'
133
+ }
134
+ }
135
+ }
136
+ ]
137
+ },
138
+ {
139
+ eventName: 'loadFinished',
140
+ eventLabel: '懒加载完成',
141
+ description: '懒加载接口远程请求成功时触发',
142
+ dataSchema: [
143
+ {
144
+ type: 'object',
145
+ properties: {
146
+ 'event.data.value': {
147
+ type: 'string',
148
+ title: 'deferApi 懒加载远程请求成功后返回的数据'
149
+ }
150
+ }
151
+ }
152
+ ]
153
+ },
154
+ {
155
+ eventName: 'focus',
156
+ eventLabel: '获取焦点',
157
+ description: '输入框获取焦点时触发',
158
+ dataSchema: [
159
+ {
160
+ type: 'object',
161
+ properties: {
162
+ 'event.data.value': {
163
+ type: 'string',
164
+ title: '选中值'
165
+ }
166
+ }
167
+ }
168
+ ]
169
+ },
170
+ {
171
+ eventName: 'blur',
172
+ eventLabel: '失去焦点',
173
+ description: '输入框失去焦点时触发',
174
+ dataSchema: [
175
+ {
176
+ type: 'object',
177
+ properties: {
178
+ 'event.data.value': {
179
+ type: 'string',
180
+ title: '选中值'
181
+ }
182
+ }
183
+ }
184
+ ]
185
+ }
186
+ ];
187
+
188
+ // 动作定义
189
+ actions: RendererAction[] = [
190
+ {
191
+ actionType: 'clear',
192
+ actionLabel: '清空',
193
+ description: '清除数据'
194
+ },
195
+ {
196
+ actionType: 'reset',
197
+ actionLabel: '重置',
198
+ description: '重置数据'
199
+ },
200
+ {
201
+ actionType: 'setValue',
202
+ actionLabel: '赋值',
203
+ description: '触发组件数据更新'
204
+ }
205
+ ];
206
+
55
207
  panelDefinitions = {
56
208
  options: {
57
209
  label: '选项 Options',
@@ -94,170 +246,159 @@ export class TreeSelectControlPlugin extends BasePlugin {
94
246
  }
95
247
  };
96
248
 
97
- panelBody = [
98
- getSchemaTpl('switchDefaultValue'),
249
+ panelBodyCreator = (context: BaseEventContext) => {
250
+ return [
251
+ getSchemaTpl('tabs', [
252
+ {
253
+ title: '常规',
254
+ body: [
255
+ getSchemaTpl('switchDefaultValue'),
256
+
257
+ {
258
+ type: 'input-text',
259
+ name: 'value',
260
+ label: '默认值',
261
+ visibleOn: 'typeof this.value !== "undefined"'
262
+ },
99
263
 
100
- {
101
- type: 'input-text',
102
- name: 'value',
103
- label: '默认值',
104
- visibleOn: 'typeof this.value !== "undefined"'
105
- },
106
- getSchemaTpl('clearable'),
264
+ getSchemaTpl('clearable'),
107
265
 
108
- {
109
- type: 'switch',
110
- name: 'hideNodePathLabel',
111
- label: '隐藏选中节点的祖先节点文本信息',
112
- mode: 'inline',
113
- className: 'w-full'
114
- },
266
+ getSchemaTpl('hideNodePathLabel'),
115
267
 
116
- getSchemaTpl('fieldSet', {
117
- title: '选项',
118
- body: [
119
- {
120
- $ref: 'options',
121
- name: 'options'
122
- },
268
+ getSchemaTpl('fieldSet', {
269
+ title: '选项',
270
+ body: [
271
+ {
272
+ $ref: 'options',
273
+ name: 'options'
274
+ },
123
275
 
124
- getSchemaTpl('source', {
125
- sampleBuilder: (schema: any) =>
126
- JSON.stringify(
127
- {
128
- status: 0,
129
- msg: '',
130
- data: {
131
- options: [
132
- {
133
- label: '选项A',
134
- value: 'a',
135
- children: [
136
- {
137
- label: '子选项',
138
- value: 'c'
139
- }
140
- ]
141
- },
276
+ getSchemaTpl('source', {
277
+ sampleBuilder: (schema: any) =>
278
+ JSON.stringify(
279
+ {
280
+ status: 0,
281
+ msg: '',
282
+ data: {
283
+ options: [
284
+ {
285
+ label: '选项A',
286
+ value: 'a',
287
+ children: [
288
+ {
289
+ label: '子选项',
290
+ value: 'c'
291
+ }
292
+ ]
293
+ },
142
294
 
143
- {
144
- label: '选项B',
145
- value: 'b'
146
- }
147
- ]
148
- }
149
- },
150
- null,
151
- 2
152
- )
153
- }),
295
+ {
296
+ label: '选项B',
297
+ value: 'b'
298
+ }
299
+ ]
300
+ }
301
+ },
302
+ null,
303
+ 2
304
+ )
305
+ }),
154
306
 
155
- getSchemaTpl('api', {
156
- name: 'autoComplete',
157
- label: '自动完成接口',
158
- description:
159
- '每次输入新内容后,将调用接口,根据接口返回更新选项。当前用户输入值在 `\\${term}` 中。<code>请不要与获取选项接口同时设置。</code>'
160
- }),
307
+ getSchemaTpl('api', {
308
+ name: 'autoComplete',
309
+ label: '自动完成接口',
310
+ description:
311
+ '每次输入新内容后,将调用接口,根据接口返回更新选项。当前用户输入值在 `\\${term}` 中。<code>请不要与获取选项接口同时设置。</code>'
312
+ }),
161
313
 
162
- {
163
- name: 'initiallyOpen',
164
- label: '是否默认展开子选项',
165
- type: 'switch',
166
- mode: 'inline',
167
- className: 'w-full',
168
- pipeIn: defaultValue(true)
169
- },
314
+ getSchemaTpl('switch', {
315
+ name: 'initiallyOpen',
316
+ label: '是否默认展开子选项',
317
+ pipeIn: defaultValue(true)
318
+ }),
170
319
 
171
- {
172
- type: 'input-text',
173
- name: 'unfoldedLevel',
174
- label: '选项默认展开级数',
175
- visibleOn:
176
- 'typeof this.initiallyOpen !== "undefined" || !this.initiallyOpen'
177
- },
320
+ {
321
+ type: 'input-text',
322
+ name: 'unfoldedLevel',
323
+ label: '选项默认展开级数',
324
+ visibleOn:
325
+ 'typeof this.initiallyOpen !== "undefined" || !this.initiallyOpen'
326
+ },
178
327
 
179
- {
180
- name: 'showIcon',
181
- label: '是否显示图标',
182
- type: 'switch',
183
- mode: 'inline',
184
- className: 'w-full',
185
- pipeIn: defaultValue(true)
186
- },
328
+ getSchemaTpl('switch', {
329
+ name: 'showIcon',
330
+ label: '是否显示图标',
331
+ pipeIn: defaultValue(true)
332
+ }),
187
333
 
188
- {
189
- label: '可搜索?',
190
- name: 'searchable',
191
- type: 'switch',
192
- mode: 'inline',
193
- className: 'w-full'
194
- },
334
+ getSchemaTpl('searchable'),
195
335
 
196
- {
197
- label: '是否显示单选按钮',
198
- name: 'showRadio',
199
- type: 'switch',
200
- mode: 'inline',
201
- className: 'w-full',
202
- visibleOn: '!data.multiple'
203
- },
336
+ getSchemaTpl('switch', {
337
+ label: '是否显示单选按钮',
338
+ name: 'showRadio',
339
+ visibleOn: '!data.multiple'
340
+ }),
204
341
 
205
- getSchemaTpl('multiple'),
342
+ getSchemaTpl('multiple'),
206
343
 
207
- {
208
- name: 'cascade',
209
- visibleOn: 'data.multiple',
210
- label: '不自动选中子节点?',
211
- description: '选中父级时,孩子节点是否自动选中',
212
- type: 'switch',
213
- mode: 'inline',
214
- className: 'w-full'
215
- },
344
+ getSchemaTpl('switch', {
345
+ name: 'cascade',
346
+ label: '不自动选中子节点',
347
+ visibleOn: 'data.multiple',
348
+ description: '选中父级时,孩子节点是否自动选中'
349
+ }),
216
350
 
217
- {
218
- name: 'withChildren',
219
- visibleOn: 'data.cascade !== true && data.multiple',
220
- label: '数值是否携带子节点',
221
- type: 'switch',
222
- mode: 'inline',
223
- className: 'w-full'
224
- },
351
+ getSchemaTpl('switch', {
352
+ name: 'withChildren',
353
+ label: '数值是否携带子节点',
354
+ visibleOn: 'data.cascade !== true && data.multiple'
355
+ }),
225
356
 
226
- {
227
- name: 'onlyChildren',
228
- visibleOn: 'data.cascade !== true && data.multiple',
229
- label: '数值是否只包含子节点',
230
- disabledOn: 'data.withChildren',
231
- type: 'switch',
232
- mode: 'inline',
233
- className: 'w-full'
234
- },
357
+ getSchemaTpl('switch', {
358
+ name: 'onlyChildren',
359
+ label: '数值是否只包含子节点',
360
+ visibleOn: 'data.cascade !== true && data.multiple',
361
+ disabledOn: 'data.withChildren'
362
+ }),
235
363
 
236
- getSchemaTpl('joinValues'),
237
- getSchemaTpl('delimiter'),
238
- getSchemaTpl('extractValue'),
239
- getSchemaTpl('autoFill'),
364
+ getSchemaTpl('joinValues'),
365
+ getSchemaTpl('delimiter'),
366
+ getSchemaTpl('extractValue'),
367
+ getSchemaTpl('autoFill'),
240
368
 
241
- getSchemaTpl('creatable'),
242
- getSchemaTpl('api', {
243
- label: '新增选项接口',
244
- name: 'addApi'
245
- }),
369
+ getSchemaTpl('creatable'),
370
+ getSchemaTpl('api', {
371
+ label: '新增选项接口',
372
+ name: 'addApi'
373
+ }),
246
374
 
247
- getSchemaTpl('editable'),
248
- getSchemaTpl('api', {
249
- label: '编辑选项接口',
250
- name: 'editApi'
251
- }),
375
+ getSchemaTpl('editable'),
376
+ getSchemaTpl('api', {
377
+ label: '编辑选项接口',
378
+ name: 'editApi'
379
+ }),
252
380
 
253
- getSchemaTpl('removable'),
254
- getSchemaTpl('api', {
255
- label: '删除选项接口',
256
- name: 'deleteApi'
257
- })
258
- ]
259
- })
260
- ];
381
+ getSchemaTpl('removable'),
382
+ getSchemaTpl('api', {
383
+ label: '删除选项接口',
384
+ name: 'deleteApi'
385
+ })
386
+ ]
387
+ })
388
+ ]
389
+ },
390
+ {
391
+ title: '事件',
392
+ body: [
393
+ getSchemaTpl('eventControl', {
394
+ name: 'onEvent',
395
+ ...getEventControlConfig(this.manager, context)
396
+ })
397
+ ]
398
+ }
399
+ ])
400
+ ];
401
+ };
261
402
  }
262
403
 
263
404
  registerEditorPlugin(TreeSelectControlPlugin);