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.
- package/dist/6dbcbb49b6fd405190a9.png +0 -0
- package/dist/component/Editor.d.ts +16 -0
- package/dist/component/RegionWrapper.d.ts +10 -0
- package/dist/component/VRenderer.d.ts +10 -0
- package/dist/component/base/BackTop.d.ts +1 -1
- package/dist/component/control/APIControl.d.ts +1158 -0
- package/dist/component/control/ActionAPIControl.d.ts +1158 -0
- package/dist/component/control/BadgeControl.d.ts +133 -0
- package/dist/component/control/BaseControl.d.ts +248 -0
- package/dist/component/control/DataBindingControl.d.ts +14 -0
- package/dist/component/control/DataPickerControl.d.ts +13 -0
- package/dist/component/control/DateShortCutControl.d.ts +83 -0
- package/dist/component/control/FormulaControl.d.ts +51 -0
- package/dist/component/{Control → control}/OptionControl.d.ts +23 -34
- package/dist/component/{Control → control}/PopoverEdit.d.ts +0 -0
- package/dist/component/control/StatusControl.d.ts +44 -0
- package/dist/component/control/SwitchMoreControl.d.ts +224 -0
- package/dist/component/control/ValidationControl.d.ts +65 -0
- package/dist/component/control/ValidationItem.d.ts +46 -0
- package/dist/component/control/style-control/Background.d.ts +17 -0
- package/dist/component/control/style-control/Border.d.ts +18 -0
- package/dist/component/control/style-control/BoxModel.d.ts +17 -0
- package/dist/component/control/style-control/BoxShadow.d.ts +18 -0
- package/dist/component/control/style-control/Display.d.ts +14 -0
- package/dist/component/control/style-control/Font.d.ts +16 -0
- package/dist/component/control/style-control/font-family.d.ts +11 -0
- package/dist/component/control/style-control/transformation.d.ts +29 -0
- package/dist/component/control/style-control/types.d.ts +8 -0
- package/dist/component/schemaTpl.d.ts +8 -0
- package/dist/component/validator.d.ts +62 -0
- package/dist/dnd/index.d.ts +1 -1
- package/dist/event-action/action-config-panel.d.ts +8 -0
- package/dist/event-action/actions.d.ts +3 -0
- package/dist/event-action/comp-action-select.d.ts +11 -0
- package/dist/event-action/config.d.ts +13 -0
- package/dist/event-action/index.d.ts +459 -0
- package/dist/event-action/schema.d.ts +32 -0
- package/dist/exports.min.js +1 -1
- package/dist/index.d.ts +23 -5
- package/dist/index.min.js +1 -1
- package/dist/manager.d.ts +46 -1
- package/dist/plugin/Alert.d.ts +4 -2
- package/dist/plugin/Button.d.ts +5 -1
- package/dist/plugin/ButtonGroup.d.ts +13 -34
- package/dist/plugin/ButtonToolbar.d.ts +4 -10
- package/dist/plugin/CRUD.d.ts +2 -0
- package/dist/plugin/Chart.d.ts +2 -0
- package/dist/plugin/Collapse.d.ts +1 -0
- package/dist/plugin/CollapseGroup.d.ts +28 -4
- package/dist/plugin/Container.d.ts +2 -1
- package/dist/plugin/Dialog.d.ts +12 -2
- package/dist/plugin/Drawer.d.ts +12 -2
- package/dist/plugin/DropDownButton.d.ts +11 -11
- package/dist/plugin/Form/ButtonGroupSelect.d.ts +7 -2
- package/dist/plugin/Form/ButtonToolbar.d.ts +8 -7
- package/dist/plugin/Form/ChainedSelect.d.ts +3 -0
- package/dist/plugin/Form/Checkbox.d.ts +7 -2
- package/dist/plugin/Form/Checkboxes.d.ts +8 -2
- package/dist/plugin/Form/CodeEditor.d.ts +7 -22
- package/dist/plugin/Form/Combo.d.ts +3 -0
- package/dist/plugin/Form/Control.d.ts +6 -2
- package/dist/plugin/Form/DiffEditor.d.ts +7 -1
- package/dist/plugin/Form/Form.d.ts +6 -0
- package/dist/plugin/Form/Formula.d.ts +1 -25
- package/dist/plugin/Form/InputDate.d.ts +8 -2
- package/dist/plugin/Form/InputDateRange.d.ts +8 -2
- package/dist/plugin/Form/InputDateTime.d.ts +4 -4
- package/dist/plugin/Form/InputDateTimeRange.d.ts +4 -4
- package/dist/plugin/Form/InputEmail.d.ts +1 -0
- package/dist/plugin/Form/InputExcel.d.ts +6 -41
- package/dist/plugin/Form/InputFile.d.ts +7 -3
- package/dist/plugin/Form/InputKV.d.ts +6 -0
- package/dist/plugin/Form/InputMonth.d.ts +1 -0
- package/dist/plugin/Form/InputMonthRange.d.ts +4 -4
- package/dist/plugin/Form/InputPassword.d.ts +1 -0
- package/dist/plugin/Form/InputQuarter.d.ts +1 -0
- package/dist/plugin/Form/InputQuarterRange.d.ts +4 -4
- package/dist/plugin/Form/InputRange.d.ts +3 -0
- package/dist/plugin/Form/InputRating.d.ts +9 -3
- package/dist/plugin/Form/InputText.d.ts +24 -2
- package/dist/plugin/Form/InputTime.d.ts +3 -3
- package/dist/plugin/Form/InputTimeRange.d.ts +20 -0
- package/dist/plugin/Form/InputTree.d.ts +6 -2
- package/dist/plugin/Form/InputURL.d.ts +1 -0
- package/dist/plugin/Form/InputYear.d.ts +1 -0
- package/dist/plugin/Form/InputYearRange.d.ts +20 -0
- package/dist/plugin/Form/ListSelect.d.ts +6 -2
- package/dist/plugin/Form/LocationPicker.d.ts +1 -31
- package/dist/plugin/Form/NestedSelect.d.ts +5 -2
- package/dist/plugin/Form/Radios.d.ts +7 -2
- package/dist/plugin/Form/Select.d.ts +7 -2
- package/dist/plugin/Form/Switch.d.ts +7 -2
- package/dist/plugin/Form/TabsTransfer.d.ts +5 -2
- package/dist/plugin/Form/Textarea.d.ts +7 -1
- package/dist/plugin/Form/Transfer.d.ts +5 -2
- package/dist/plugin/Form/TreeSelect.d.ts +6 -2
- package/dist/plugin/IFrame.d.ts +2 -2
- package/dist/plugin/Nav.d.ts +1 -116
- package/dist/plugin/Others/Action.d.ts +5 -1
- package/dist/plugin/Page.d.ts +5 -2
- package/dist/plugin/Progress.d.ts +5 -1
- package/dist/plugin/Table.d.ts +2 -0
- package/dist/plugin/Tabs.d.ts +33 -2
- package/dist/plugin/TooltipWrapper.d.ts +10 -0
- package/dist/plugin/Tpl.d.ts +2 -1
- package/dist/plugin/Wizard.d.ts +4 -1
- package/dist/plugin.d.ts +37 -1
- package/dist/store/editor.d.ts +55 -28
- package/dist/store/node.d.ts +16 -0
- package/dist/style.css +1 -1
- package/dist/util.d.ts +36 -3
- package/package.json +14 -8
- package/src/component/schemaTpl.tsx +1209 -474
- package/src/plugin/Alert.tsx +69 -48
- package/src/plugin/AnchorNav.tsx +1 -0
- package/src/plugin/Audio.tsx +9 -15
- package/src/plugin/Avatar.tsx +2 -1
- package/src/plugin/Breadcrumb.tsx +2 -1
- package/src/plugin/Button.tsx +257 -188
- package/src/plugin/ButtonGroup.tsx +99 -38
- package/src/plugin/ButtonToolbar.tsx +7 -13
- package/src/plugin/CRUD.tsx +78 -136
- package/src/plugin/Card.tsx +1 -0
- package/src/plugin/Cards.tsx +8 -14
- package/src/plugin/Carousel.tsx +1 -1
- package/src/plugin/Chart.tsx +26 -14
- package/src/plugin/Collapse.tsx +78 -78
- package/src/plugin/CollapseGroup.tsx +165 -83
- package/src/plugin/Container.tsx +59 -6
- package/src/plugin/Custom.tsx +2 -8
- package/src/plugin/CustomRegion.tsx +4 -3
- package/src/plugin/Dialog.tsx +55 -24
- package/src/plugin/Drawer.tsx +65 -35
- package/src/plugin/DropDownButton.tsx +95 -79
- package/src/plugin/Flex.tsx +123 -65
- package/src/plugin/Form/ButtonGroupSelect.tsx +114 -26
- package/src/plugin/Form/ButtonToolbar.tsx +62 -55
- package/src/plugin/Form/ChainedSelect.tsx +45 -0
- package/src/plugin/Form/Checkbox.tsx +122 -33
- package/src/plugin/Form/Checkboxes.tsx +154 -87
- package/src/plugin/Form/CodeEditor.tsx +163 -34
- package/src/plugin/Form/Combo.tsx +104 -65
- package/src/plugin/Form/Control.tsx +16 -70
- package/src/plugin/Form/DiffEditor.tsx +158 -54
- package/src/plugin/Form/FieldSet.tsx +6 -11
- package/src/plugin/Form/Form.tsx +277 -70
- package/src/plugin/Form/Formula.tsx +8 -14
- package/src/plugin/Form/InputArray.tsx +7 -16
- package/src/plugin/Form/InputCity.tsx +1 -1
- package/src/plugin/Form/InputDate.tsx +344 -121
- package/src/plugin/Form/InputDateRange.tsx +303 -161
- package/src/plugin/Form/InputDateTime.tsx +6 -150
- package/src/plugin/Form/InputDateTimeRange.tsx +7 -187
- package/src/plugin/Form/InputEmail.tsx +1 -0
- package/src/plugin/Form/InputExcel.tsx +70 -27
- package/src/plugin/Form/InputFile.tsx +326 -152
- package/src/plugin/Form/InputImage.tsx +1 -1
- package/src/plugin/Form/InputKV.tsx +61 -0
- package/src/plugin/Form/InputMonth.tsx +3 -1
- package/src/plugin/Form/InputMonthRange.tsx +6 -160
- package/src/plugin/Form/InputNumber.tsx +1 -1
- package/src/plugin/Form/InputPassword.tsx +2 -0
- package/src/plugin/Form/InputQuarter.tsx +3 -1
- package/src/plugin/Form/InputQuarterRange.tsx +6 -160
- package/src/plugin/Form/InputRange.tsx +74 -4
- package/src/plugin/Form/InputRating.tsx +347 -35
- package/src/plugin/Form/InputRichText.tsx +2 -3
- package/src/plugin/Form/InputTable.tsx +33 -49
- package/src/plugin/Form/InputTag.tsx +1 -1
- package/src/plugin/Form/InputText.tsx +310 -132
- package/src/plugin/Form/InputTime.tsx +4 -53
- package/src/plugin/Form/InputTimeRange.tsx +41 -0
- package/src/plugin/Form/InputTree.tsx +196 -46
- package/src/plugin/Form/InputURL.tsx +2 -0
- package/src/plugin/Form/InputYear.tsx +2 -0
- package/src/plugin/Form/InputYearRange.tsx +41 -0
- package/src/plugin/Form/Item.tsx +17 -18
- package/src/plugin/Form/ListSelect.tsx +75 -20
- package/src/plugin/Form/LocationPicker.tsx +2 -7
- package/src/plugin/Form/MatrixCheckboxes.tsx +1 -1
- package/src/plugin/Form/NestedSelect.tsx +110 -43
- package/src/plugin/Form/Picker.tsx +2 -5
- package/src/plugin/Form/Radios.tsx +122 -52
- package/src/plugin/Form/Select.tsx +239 -168
- package/src/plugin/Form/Static.tsx +1 -1
- package/src/plugin/Form/Switch.tsx +170 -58
- package/src/plugin/Form/TabsTransfer.tsx +175 -79
- package/src/plugin/Form/Textarea.tsx +146 -36
- package/src/plugin/Form/Transfer.tsx +295 -233
- package/src/plugin/Form/TreeSelect.tsx +287 -146
- package/src/plugin/Grid.tsx +340 -312
- package/src/plugin/HBox.tsx +1 -0
- package/src/plugin/IFrame.tsx +21 -12
- package/src/plugin/Image.tsx +7 -12
- package/src/plugin/Images.tsx +7 -12
- package/src/plugin/Link.tsx +6 -12
- package/src/plugin/List.tsx +6 -10
- package/src/plugin/ListItem.tsx +1 -0
- package/src/plugin/Nav.tsx +7 -9
- package/src/plugin/Others/Action.tsx +16 -10
- package/src/plugin/Others/BasicToolbar.tsx +4 -1
- package/src/plugin/Others/TableCell.tsx +19 -39
- package/src/plugin/Page.tsx +315 -229
- package/src/plugin/Panel.tsx +6 -7
- package/src/plugin/Plain.tsx +3 -6
- package/src/plugin/Progress.tsx +234 -94
- package/src/plugin/Service.tsx +10 -6
- package/src/plugin/Table.tsx +49 -20
- package/src/plugin/TableView.tsx +212 -106
- package/src/plugin/Tabs.tsx +306 -146
- package/src/plugin/TooltipWrapper.tsx +231 -135
- package/src/plugin/Tpl.tsx +68 -52
- package/src/plugin/Video.tsx +9 -20
- package/src/plugin/Wizard.tsx +537 -336
- package/src/plugin/Wrapper.tsx +82 -61
- package/src/plugin.ts +66 -4
- package/static/empty.png +0 -0
- package/dist/component/Control/APIControl.d.ts +0 -504
- package/dist/component/Control/ValidationControl.d.ts +0 -30
- 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
|
-
|
98
|
-
|
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
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
268
|
+
getSchemaTpl('fieldSet', {
|
269
|
+
title: '选项',
|
270
|
+
body: [
|
271
|
+
{
|
272
|
+
$ref: 'options',
|
273
|
+
name: 'options'
|
274
|
+
},
|
123
275
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
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
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
295
|
+
{
|
296
|
+
label: '选项B',
|
297
|
+
value: 'b'
|
298
|
+
}
|
299
|
+
]
|
300
|
+
}
|
301
|
+
},
|
302
|
+
null,
|
303
|
+
2
|
304
|
+
)
|
305
|
+
}),
|
154
306
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
307
|
+
getSchemaTpl('api', {
|
308
|
+
name: 'autoComplete',
|
309
|
+
label: '自动完成接口',
|
310
|
+
description:
|
311
|
+
'每次输入新内容后,将调用接口,根据接口返回更新选项。当前用户输入值在 `\\${term}` 中。<code>请不要与获取选项接口同时设置。</code>'
|
312
|
+
}),
|
161
313
|
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
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
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
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
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
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
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
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
|
-
|
342
|
+
getSchemaTpl('multiple'),
|
206
343
|
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
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
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
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
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
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
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
364
|
+
getSchemaTpl('joinValues'),
|
365
|
+
getSchemaTpl('delimiter'),
|
366
|
+
getSchemaTpl('extractValue'),
|
367
|
+
getSchemaTpl('autoFill'),
|
240
368
|
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
369
|
+
getSchemaTpl('creatable'),
|
370
|
+
getSchemaTpl('api', {
|
371
|
+
label: '新增选项接口',
|
372
|
+
name: 'addApi'
|
373
|
+
}),
|
246
374
|
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
375
|
+
getSchemaTpl('editable'),
|
376
|
+
getSchemaTpl('api', {
|
377
|
+
label: '编辑选项接口',
|
378
|
+
name: 'editApi'
|
379
|
+
}),
|
252
380
|
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
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);
|