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,8 @@
|
|
1
|
+
import {RendererAction, RendererEvent} from '../../event-action';
|
1
2
|
import {getSchemaTpl} from '../../component/schemaTpl';
|
2
3
|
import {registerEditorPlugin} from '../../manager';
|
3
|
-
import {BasePlugin} from '../../plugin';
|
4
|
+
import {BaseEventContext, BasePlugin} from '../../plugin';
|
5
|
+
import {getEventControlConfig} from '../../util';
|
4
6
|
|
5
7
|
export class NestedSelectControlPlugin extends BasePlugin {
|
6
8
|
// 关联渲染器名字
|
@@ -95,7 +97,84 @@ export class NestedSelectControlPlugin extends BasePlugin {
|
|
95
97
|
]
|
96
98
|
}
|
97
99
|
};
|
98
|
-
|
100
|
+
|
101
|
+
// 事件定义
|
102
|
+
events: RendererEvent[] = [
|
103
|
+
{
|
104
|
+
eventName: 'change',
|
105
|
+
eventLabel: '值变化',
|
106
|
+
description: '选中值变化时触发',
|
107
|
+
dataSchema: [
|
108
|
+
{
|
109
|
+
type: 'object',
|
110
|
+
properties: {
|
111
|
+
'event.data.value': {
|
112
|
+
type: 'string',
|
113
|
+
title: '选中值'
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
]
|
118
|
+
},
|
119
|
+
{
|
120
|
+
eventName: 'focus',
|
121
|
+
eventLabel: '获取焦点',
|
122
|
+
description: '输入框获取焦点时触发',
|
123
|
+
dataSchema: [
|
124
|
+
{
|
125
|
+
type: 'object',
|
126
|
+
properties: {
|
127
|
+
'event.data.value': {
|
128
|
+
type: 'string',
|
129
|
+
title: '选中值'
|
130
|
+
}
|
131
|
+
}
|
132
|
+
}
|
133
|
+
]
|
134
|
+
},
|
135
|
+
{
|
136
|
+
eventName: 'blur',
|
137
|
+
eventLabel: '失去焦点',
|
138
|
+
description: '输入框失去焦点时触发',
|
139
|
+
dataSchema: [
|
140
|
+
{
|
141
|
+
type: 'object',
|
142
|
+
properties: {
|
143
|
+
'event.data.value': {
|
144
|
+
type: 'string',
|
145
|
+
title: '选中值'
|
146
|
+
}
|
147
|
+
}
|
148
|
+
}
|
149
|
+
]
|
150
|
+
}
|
151
|
+
];
|
152
|
+
|
153
|
+
// 动作定义
|
154
|
+
actions: RendererAction[] = [
|
155
|
+
{
|
156
|
+
actionType: 'clear',
|
157
|
+
actionLabel: '清空',
|
158
|
+
description: '清除选中值'
|
159
|
+
},
|
160
|
+
{
|
161
|
+
actionType: 'reset',
|
162
|
+
actionLabel: '重置',
|
163
|
+
description: '将值重置为resetValue,若没有配置resetValue,则清空'
|
164
|
+
},
|
165
|
+
{
|
166
|
+
actionType: 'reload',
|
167
|
+
actionLabel: '重新加载',
|
168
|
+
description: '触发组件数据刷新并重新渲染'
|
169
|
+
},
|
170
|
+
{
|
171
|
+
actionType: 'setValue',
|
172
|
+
actionLabel: '赋值',
|
173
|
+
description: '触发组件数据更新'
|
174
|
+
}
|
175
|
+
];
|
176
|
+
|
177
|
+
panelBodyCreator = (context: BaseEventContext) =>
|
99
178
|
getSchemaTpl('tabs', [
|
100
179
|
{
|
101
180
|
title: '常规',
|
@@ -109,14 +188,8 @@ export class NestedSelectControlPlugin extends BasePlugin {
|
|
109
188
|
},
|
110
189
|
|
111
190
|
getSchemaTpl('clearable'),
|
191
|
+
getSchemaTpl('searchable'),
|
112
192
|
|
113
|
-
{
|
114
|
-
type: 'switch',
|
115
|
-
name: 'searchable',
|
116
|
-
label: '可否检索',
|
117
|
-
mode: 'inline',
|
118
|
-
className: 'w-full'
|
119
|
-
},
|
120
193
|
{
|
121
194
|
type: 'input-text',
|
122
195
|
name: 'searchPromptText',
|
@@ -127,27 +200,18 @@ export class NestedSelectControlPlugin extends BasePlugin {
|
|
127
200
|
name: 'noResultsText',
|
128
201
|
label: '无结果时的文本'
|
129
202
|
},
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
label: '隐藏选中节点的祖先节点文本信息',
|
134
|
-
mode: 'inline',
|
135
|
-
className: 'w-full'
|
136
|
-
},
|
137
|
-
{
|
138
|
-
type: 'switch',
|
203
|
+
getSchemaTpl('hideNodePathLabel'),
|
204
|
+
|
205
|
+
getSchemaTpl('switch', {
|
139
206
|
name: 'enableNodePath',
|
140
|
-
label: '节点路径模式'
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
{
|
145
|
-
type: 'switch',
|
207
|
+
label: '节点路径模式'
|
208
|
+
}),
|
209
|
+
|
210
|
+
getSchemaTpl('switch', {
|
146
211
|
name: 'onlyChildren',
|
147
|
-
label: '选中父节点时只使用子节点的值'
|
148
|
-
|
149
|
-
|
150
|
-
},
|
212
|
+
label: '选中父节点时只使用子节点的值'
|
213
|
+
}),
|
214
|
+
|
151
215
|
{
|
152
216
|
type: 'input-text',
|
153
217
|
name: 'pathSeparator',
|
@@ -168,24 +232,18 @@ export class NestedSelectControlPlugin extends BasePlugin {
|
|
168
232
|
}),
|
169
233
|
getSchemaTpl('multiple'),
|
170
234
|
|
171
|
-
{
|
235
|
+
getSchemaTpl('switch', {
|
172
236
|
name: 'cascade',
|
237
|
+
label: '不自动选中子节点',
|
173
238
|
visibleOn: 'data.multiple',
|
174
|
-
|
175
|
-
|
176
|
-
type: 'switch',
|
177
|
-
mode: 'inline',
|
178
|
-
className: 'w-full'
|
179
|
-
},
|
239
|
+
description: '选中父级时,孩子节点是否自动选中'
|
240
|
+
}),
|
180
241
|
|
181
|
-
{
|
242
|
+
getSchemaTpl('switch', {
|
182
243
|
name: 'withChildren',
|
183
|
-
visibleOn: 'data.cascade !== true && data.multiple',
|
184
244
|
label: '数值是否携带子节点',
|
185
|
-
|
186
|
-
|
187
|
-
className: 'w-full'
|
188
|
-
},
|
245
|
+
visibleOn: 'data.cascade !== true && data.multiple'
|
246
|
+
}),
|
189
247
|
|
190
248
|
getSchemaTpl('joinValues'),
|
191
249
|
getSchemaTpl('delimiter'),
|
@@ -203,9 +261,18 @@ export class NestedSelectControlPlugin extends BasePlugin {
|
|
203
261
|
name: 'menuClassName'
|
204
262
|
})
|
205
263
|
]
|
264
|
+
},
|
265
|
+
{
|
266
|
+
title: '事件',
|
267
|
+
className: 'p-none',
|
268
|
+
body: [
|
269
|
+
getSchemaTpl('eventControl', {
|
270
|
+
name: 'onEvent',
|
271
|
+
...getEventControlConfig(this.manager, context)
|
272
|
+
})
|
273
|
+
]
|
206
274
|
}
|
207
|
-
])
|
208
|
-
];
|
275
|
+
]);
|
209
276
|
}
|
210
277
|
|
211
278
|
registerEditorPlugin(NestedSelectControlPlugin);
|
@@ -55,13 +55,10 @@ export class PickerControlPlugin extends BasePlugin {
|
|
55
55
|
panelTitle = '列表选取';
|
56
56
|
panelBodyCreator = (context: BaseEventContext) => {
|
57
57
|
return [
|
58
|
-
{
|
59
|
-
type: 'switch',
|
58
|
+
getSchemaTpl('switch', {
|
60
59
|
name: 'embed',
|
61
|
-
mode: 'inline',
|
62
|
-
className: 'w-full',
|
63
60
|
label: '开启内嵌模式'
|
64
|
-
},
|
61
|
+
}),
|
65
62
|
|
66
63
|
getSchemaTpl('switchDefaultValue'),
|
67
64
|
|
@@ -1,6 +1,10 @@
|
|
1
1
|
import {defaultValue, getSchemaTpl} from '../../component/schemaTpl';
|
2
2
|
import {registerEditorPlugin} from '../../manager';
|
3
|
-
import {BasePlugin} from '../../plugin';
|
3
|
+
import {BasePlugin, BaseEventContext} from '../../plugin';
|
4
|
+
|
5
|
+
import {ValidatorTag} from '../../component/validator';
|
6
|
+
import {getEventControlConfig} from '../../util';
|
7
|
+
import {RendererAction, RendererEvent} from '../../event-action';
|
4
8
|
import flatten = require('lodash/flatten');
|
5
9
|
|
6
10
|
export class RadiosControlPlugin extends BasePlugin {
|
@@ -46,74 +50,140 @@ export class RadiosControlPlugin extends BasePlugin {
|
|
46
50
|
]
|
47
51
|
};
|
48
52
|
|
53
|
+
notRenderFormZone = true;
|
54
|
+
|
49
55
|
panelTitle = '单选框';
|
50
|
-
|
51
|
-
|
56
|
+
|
57
|
+
// 事件定义
|
58
|
+
events: RendererEvent[] = [
|
59
|
+
{
|
60
|
+
eventName: 'change',
|
61
|
+
eventLabel: '值变化',
|
62
|
+
description: '选中值变化时触发',
|
63
|
+
dataSchema: [
|
64
|
+
{
|
65
|
+
type: 'object',
|
66
|
+
properties: {
|
67
|
+
'event.data.value': {
|
68
|
+
type: 'string',
|
69
|
+
title: '选中值'
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
]
|
74
|
+
}
|
75
|
+
];
|
76
|
+
|
77
|
+
// 动作定义
|
78
|
+
actions: RendererAction[] = [
|
79
|
+
{
|
80
|
+
actionType: 'clear',
|
81
|
+
actionLabel: '清空',
|
82
|
+
description: '清除选中值'
|
83
|
+
},
|
84
|
+
{
|
85
|
+
actionType: 'reset',
|
86
|
+
actionLabel: '重置',
|
87
|
+
description: '将值重置为resetValue,若没有配置resetValue,则清空'
|
88
|
+
},
|
89
|
+
{
|
90
|
+
actionType: 'reload',
|
91
|
+
actionLabel: '重新加载',
|
92
|
+
description: '触发组件数据刷新并重新渲染'
|
93
|
+
},
|
94
|
+
{
|
95
|
+
actionType: 'setValue',
|
96
|
+
actionLabel: '赋值',
|
97
|
+
description: '触发组件数据更新'
|
98
|
+
}
|
99
|
+
];
|
100
|
+
|
101
|
+
panelJustify = true;
|
102
|
+
panelBodyCreator = (context: BaseEventContext) => {
|
103
|
+
return getSchemaTpl('tabs', [
|
52
104
|
{
|
53
|
-
title: '
|
54
|
-
body: [
|
55
|
-
getSchemaTpl('switchDefaultValue'),
|
105
|
+
title: '属性',
|
106
|
+
body: getSchemaTpl('collapseGroup', [
|
56
107
|
{
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
108
|
+
title: '基本',
|
109
|
+
body: [
|
110
|
+
getSchemaTpl('formItemName', {
|
111
|
+
required: true
|
112
|
+
}),
|
113
|
+
getSchemaTpl('label'),
|
114
|
+
// getSchemaTpl('autoFill')
|
115
|
+
getSchemaTpl('labelRemark'),
|
116
|
+
getSchemaTpl('remark')
|
117
|
+
]
|
63
118
|
},
|
64
119
|
{
|
65
|
-
label: '是否默认选择第一个',
|
66
|
-
name: 'selectFirst',
|
67
|
-
type: 'switch',
|
68
|
-
mode: 'inline',
|
69
|
-
className: 'w-full'
|
70
|
-
},
|
71
|
-
getSchemaTpl('fieldSet', {
|
72
120
|
title: '选项',
|
73
121
|
body: [
|
74
|
-
getSchemaTpl('
|
75
|
-
getSchemaTpl('
|
76
|
-
|
77
|
-
|
78
|
-
|
122
|
+
getSchemaTpl('optionControl'),
|
123
|
+
getSchemaTpl('switch', {
|
124
|
+
label: '默认选择第一个',
|
125
|
+
name: 'selectFirst',
|
126
|
+
horizontal: {justify: true, left: 5},
|
127
|
+
visibleOn: '!this.options'
|
79
128
|
}),
|
80
|
-
|
81
|
-
|
82
|
-
|
129
|
+
getSchemaTpl('value', {
|
130
|
+
visibleOn: '!this.options && this.selectFirst !== true'
|
131
|
+
})
|
83
132
|
]
|
133
|
+
},
|
134
|
+
getSchemaTpl('status', {isFormItem: true}),
|
135
|
+
getSchemaTpl('validation', {
|
136
|
+
tag: ValidatorTag.All
|
84
137
|
})
|
85
|
-
]
|
138
|
+
])
|
86
139
|
},
|
87
140
|
{
|
88
141
|
title: '外观',
|
89
142
|
body: [
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
143
|
+
getSchemaTpl('collapseGroup', [
|
144
|
+
getSchemaTpl('style:formItem', {
|
145
|
+
renderer: context.info.renderer,
|
146
|
+
schema: [
|
147
|
+
getSchemaTpl('switch', {
|
148
|
+
label: '一行选项显示',
|
149
|
+
name: 'inline',
|
150
|
+
hiddenOn: 'data.mode === "inline"',
|
151
|
+
pipeIn: defaultValue(true)
|
152
|
+
}),
|
153
|
+
{
|
154
|
+
label: '每行选项个数',
|
155
|
+
name: 'columnsCount',
|
156
|
+
hiddenOn: 'data.mode === "inline" || data.inline !== false',
|
157
|
+
type: 'input-range',
|
158
|
+
min: 1,
|
159
|
+
max: 6,
|
160
|
+
pipeIn: defaultValue(1)
|
161
|
+
}
|
162
|
+
]
|
163
|
+
}),
|
164
|
+
getSchemaTpl('style:classNames', {
|
165
|
+
schema: [
|
166
|
+
getSchemaTpl('className', {
|
167
|
+
label: '单个选项',
|
168
|
+
name: 'itemClassName'
|
169
|
+
})
|
170
|
+
]
|
171
|
+
})
|
172
|
+
])
|
173
|
+
]
|
174
|
+
},
|
175
|
+
{
|
176
|
+
title: '事件',
|
177
|
+
className: 'p-none',
|
178
|
+
body: [
|
179
|
+
getSchemaTpl('eventControl', {
|
180
|
+
name: 'onEvent',
|
181
|
+
...getEventControlConfig(this.manager, context)
|
112
182
|
})
|
113
183
|
]
|
114
184
|
}
|
115
|
-
])
|
116
|
-
|
185
|
+
]);
|
186
|
+
};
|
117
187
|
}
|
118
188
|
|
119
189
|
registerEditorPlugin(RadiosControlPlugin);
|