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
package/src/plugin/Wizard.tsx
CHANGED
@@ -11,6 +11,10 @@ import React from 'react';
|
|
11
11
|
import {VRenderer} from '../component/VRenderer';
|
12
12
|
import {mapReactElement} from '../component/factory';
|
13
13
|
import {RegionWrapper as Region} from '../component/RegionWrapper';
|
14
|
+
import {getComboWrapper} from '../event-action/schema';
|
15
|
+
|
16
|
+
import {getEventControlConfig} from '../util';
|
17
|
+
import {RendererAction, RendererEvent} from '../event-action';
|
14
18
|
|
15
19
|
export class WizardPlugin extends BasePlugin {
|
16
20
|
// 关联渲染器名字
|
@@ -74,357 +78,555 @@ export class WizardPlugin extends BasePlugin {
|
|
74
78
|
]
|
75
79
|
};
|
76
80
|
|
81
|
+
// 事件定义
|
82
|
+
events: RendererEvent[] = [
|
83
|
+
{
|
84
|
+
eventName: 'inited',
|
85
|
+
eventLabel: '初始化完成',
|
86
|
+
description: '远程初始化接口请求成功时触发',
|
87
|
+
dataSchema: [
|
88
|
+
{
|
89
|
+
type: 'object',
|
90
|
+
properties: {
|
91
|
+
'event.data': {
|
92
|
+
type: 'object',
|
93
|
+
title: 'initApi 远程请求返回的初始化数据'
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
]
|
98
|
+
},
|
99
|
+
{
|
100
|
+
eventName: 'finished',
|
101
|
+
eventLabel: '点击完成',
|
102
|
+
description: '最终提交时触发',
|
103
|
+
dataSchema: [
|
104
|
+
{
|
105
|
+
type: 'object',
|
106
|
+
properties: {
|
107
|
+
'event.data': {
|
108
|
+
type: 'object',
|
109
|
+
title: '提交的表单数据'
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
113
|
+
]
|
114
|
+
},
|
115
|
+
{
|
116
|
+
eventName: 'stepChange',
|
117
|
+
eventLabel: '步骤切换',
|
118
|
+
description: '切换步骤时触发',
|
119
|
+
dataSchema: [
|
120
|
+
{
|
121
|
+
type: 'object',
|
122
|
+
properties: {
|
123
|
+
'event.data.step': {
|
124
|
+
type: 'string',
|
125
|
+
title: '步骤索引'
|
126
|
+
}
|
127
|
+
}
|
128
|
+
}
|
129
|
+
]
|
130
|
+
},
|
131
|
+
{
|
132
|
+
eventName: 'change',
|
133
|
+
eventLabel: '数值变化',
|
134
|
+
description: '表单值变化时触发',
|
135
|
+
dataSchema: [
|
136
|
+
{
|
137
|
+
type: 'object',
|
138
|
+
properties: {
|
139
|
+
'event.data': {
|
140
|
+
type: 'object',
|
141
|
+
title: '当前表单数据'
|
142
|
+
}
|
143
|
+
}
|
144
|
+
}
|
145
|
+
]
|
146
|
+
},
|
147
|
+
{
|
148
|
+
eventName: 'submitSucc',
|
149
|
+
eventLabel: '提交成功',
|
150
|
+
description: '最终提交成功时触发',
|
151
|
+
dataSchema: [
|
152
|
+
{
|
153
|
+
type: 'object',
|
154
|
+
properties: {
|
155
|
+
'event.data': {
|
156
|
+
type: 'object',
|
157
|
+
title: '提交成功后返回的数据'
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|
161
|
+
]
|
162
|
+
},
|
163
|
+
{
|
164
|
+
eventName: 'submitFail',
|
165
|
+
eventLabel: '提交失败',
|
166
|
+
description: '最终提交失败时触发',
|
167
|
+
dataSchema: [
|
168
|
+
{
|
169
|
+
type: 'object',
|
170
|
+
properties: {
|
171
|
+
'event.data.error': {
|
172
|
+
type: 'object',
|
173
|
+
title: '提交失败后返回的错误信息'
|
174
|
+
}
|
175
|
+
}
|
176
|
+
}
|
177
|
+
]
|
178
|
+
},
|
179
|
+
{
|
180
|
+
eventName: 'stepSubmitSucc',
|
181
|
+
eventLabel: '步骤提交成功',
|
182
|
+
description: '单个步骤提交成功'
|
183
|
+
},
|
184
|
+
{
|
185
|
+
eventName: 'stepSubmitFail',
|
186
|
+
eventLabel: '步骤提交失败',
|
187
|
+
description: '单个步骤提交失败',
|
188
|
+
dataSchema: [
|
189
|
+
{
|
190
|
+
type: 'object',
|
191
|
+
properties: {
|
192
|
+
'event.data.error': {
|
193
|
+
type: 'object',
|
194
|
+
title: '单个步骤提交失败后返回的错误信息'
|
195
|
+
}
|
196
|
+
}
|
197
|
+
}
|
198
|
+
]
|
199
|
+
}
|
200
|
+
];
|
201
|
+
|
202
|
+
// 动作定义
|
203
|
+
actions: RendererAction[] = [
|
204
|
+
{
|
205
|
+
actionType: 'submit',
|
206
|
+
actionLabel: '全部提交',
|
207
|
+
description: '提交全部数据'
|
208
|
+
},
|
209
|
+
{
|
210
|
+
actionType: 'stepSubmit',
|
211
|
+
actionLabel: '分步提交',
|
212
|
+
description: '提交当前步骤数据',
|
213
|
+
desc: (info: any) => {
|
214
|
+
return (
|
215
|
+
<div>
|
216
|
+
<span className="variable-right">{info?.__rendererLabel}</span>
|
217
|
+
提交当前步骤数据
|
218
|
+
</div>
|
219
|
+
);
|
220
|
+
}
|
221
|
+
},
|
222
|
+
{
|
223
|
+
actionType: 'prev',
|
224
|
+
actionLabel: '上一步',
|
225
|
+
description: '返回上一步'
|
226
|
+
},
|
227
|
+
{
|
228
|
+
actionType: 'next',
|
229
|
+
actionLabel: '下一步',
|
230
|
+
description: '提交当前步骤数据'
|
231
|
+
},
|
232
|
+
{
|
233
|
+
actionType: 'goto-step',
|
234
|
+
actionLabel: '定位步骤',
|
235
|
+
description: '切换到指定步骤',
|
236
|
+
config: ['step'],
|
237
|
+
desc: (info: any) => {
|
238
|
+
return (
|
239
|
+
<div>
|
240
|
+
<span className="variable-right">{info?.__rendererLabel}</span>
|
241
|
+
切换到第
|
242
|
+
<span className="variable-left variable-right">
|
243
|
+
{info?.args?.step}
|
244
|
+
</span>
|
245
|
+
步
|
246
|
+
</div>
|
247
|
+
);
|
248
|
+
},
|
249
|
+
schema: getComboWrapper([
|
250
|
+
{
|
251
|
+
type: 'input-formula',
|
252
|
+
variables: '${variables}',
|
253
|
+
evalMode: false,
|
254
|
+
required: true,
|
255
|
+
variableMode: 'tabs',
|
256
|
+
label: '目标步骤',
|
257
|
+
size: 'lg',
|
258
|
+
name: 'step',
|
259
|
+
mode: 'horizontal'
|
260
|
+
}
|
261
|
+
])
|
262
|
+
},
|
263
|
+
{
|
264
|
+
actionType: 'reload',
|
265
|
+
actionLabel: '重新加载',
|
266
|
+
description: '触发组件数据刷新并重新渲染'
|
267
|
+
},
|
268
|
+
{
|
269
|
+
actionType: 'setValue',
|
270
|
+
actionLabel: '更新数据',
|
271
|
+
description: '触发组件数据更新'
|
272
|
+
}
|
273
|
+
];
|
274
|
+
|
77
275
|
panelTitle = '向导';
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
276
|
+
panelBodyCreator = (context: BaseEventContext) => {
|
277
|
+
return [
|
278
|
+
getSchemaTpl('tabs', [
|
279
|
+
{
|
280
|
+
title: '常规',
|
281
|
+
body: [
|
282
|
+
{
|
283
|
+
name: 'steps',
|
284
|
+
label: '步骤设置',
|
285
|
+
type: 'combo',
|
286
|
+
multiple: true,
|
287
|
+
multiLine: true,
|
288
|
+
addButtonText: '新增一步',
|
289
|
+
scaffold: {
|
290
|
+
title: '标题',
|
291
|
+
items: [
|
292
|
+
{
|
293
|
+
type: 'input-text',
|
294
|
+
name: 'var1',
|
295
|
+
label: '文本'
|
296
|
+
}
|
297
|
+
]
|
298
|
+
},
|
92
299
|
items: [
|
93
300
|
{
|
301
|
+
name: 'title',
|
94
302
|
type: 'input-text',
|
95
|
-
|
96
|
-
|
303
|
+
label: '标题',
|
304
|
+
pipeIn: (value: any, data: any) => value || data.label
|
305
|
+
},
|
306
|
+
|
307
|
+
{
|
308
|
+
type: 'fieldSet',
|
309
|
+
title: '其他设置',
|
310
|
+
collapsed: true,
|
311
|
+
collapsable: true,
|
312
|
+
className: 'fieldset m-b-none',
|
313
|
+
body: [
|
314
|
+
{
|
315
|
+
name: 'mode',
|
316
|
+
label: '展示模式',
|
317
|
+
type: 'button-group-select',
|
318
|
+
size: 'xs',
|
319
|
+
mode: 'inline',
|
320
|
+
className: 'w-full',
|
321
|
+
value: 'normal',
|
322
|
+
options: [
|
323
|
+
{
|
324
|
+
label: '默认',
|
325
|
+
value: 'normal'
|
326
|
+
},
|
327
|
+
{
|
328
|
+
label: '左右摆放',
|
329
|
+
value: 'horizontal'
|
330
|
+
},
|
331
|
+
{
|
332
|
+
label: '内联',
|
333
|
+
value: 'inline'
|
334
|
+
}
|
335
|
+
]
|
336
|
+
},
|
337
|
+
|
338
|
+
getSchemaTpl('horizontal', {
|
339
|
+
visibleOn: 'data.mode == "horizontal"'
|
340
|
+
}),
|
341
|
+
|
342
|
+
getSchemaTpl('api', {
|
343
|
+
label: '保存接口',
|
344
|
+
description:
|
345
|
+
'如果接口返回了 <code>step</code> 变量,且数值是数字类型,比如 <code>3</code>,提交完后回跳到第 3 步'
|
346
|
+
}),
|
347
|
+
|
348
|
+
getSchemaTpl('switch', {
|
349
|
+
label: '采用异步方式?',
|
350
|
+
name: 'asyncApi',
|
351
|
+
visibleOn: 'data.api',
|
352
|
+
labelRemark: {
|
353
|
+
trigger: 'click',
|
354
|
+
rootClose: true,
|
355
|
+
title: '什么是异步方式?',
|
356
|
+
content:
|
357
|
+
'异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。',
|
358
|
+
placement: 'left'
|
359
|
+
},
|
360
|
+
pipeIn: (value: any) => value != null,
|
361
|
+
pipeOut: (value: any) => (value ? '' : undefined)
|
362
|
+
}),
|
363
|
+
|
364
|
+
getSchemaTpl('api', {
|
365
|
+
name: 'asyncApi',
|
366
|
+
label: '异步检测接口',
|
367
|
+
visibleOn: 'data.asyncApi != null',
|
368
|
+
description:
|
369
|
+
'设置此属性后,表单提交发送保存接口后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束'
|
370
|
+
}),
|
371
|
+
|
372
|
+
{
|
373
|
+
type: 'divider'
|
374
|
+
},
|
375
|
+
|
376
|
+
getSchemaTpl('api', {
|
377
|
+
name: 'initApi',
|
378
|
+
label: '初始化接口',
|
379
|
+
description: '用来初始化表单数据'
|
380
|
+
}),
|
381
|
+
|
382
|
+
getSchemaTpl('switch', {
|
383
|
+
label: '采用异步方式?',
|
384
|
+
name: 'initAsyncApi',
|
385
|
+
visibleOn: 'data.initApi',
|
386
|
+
labelRemark: {
|
387
|
+
trigger: 'click',
|
388
|
+
rootClose: true,
|
389
|
+
title: '什么是异步方式?',
|
390
|
+
content:
|
391
|
+
'异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。',
|
392
|
+
placement: 'left'
|
393
|
+
},
|
394
|
+
pipeIn: (value: any) => value != null,
|
395
|
+
pipeOut: (value: any) => (value ? '' : undefined)
|
396
|
+
}),
|
397
|
+
|
398
|
+
getSchemaTpl('api', {
|
399
|
+
name: 'initAsyncApi',
|
400
|
+
label: '异步检测接口',
|
401
|
+
visibleOn: 'data.initAsyncApi != null',
|
402
|
+
description:
|
403
|
+
'设置此属性后,表单请求 initApi 后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束'
|
404
|
+
}),
|
405
|
+
|
406
|
+
getSchemaTpl('initFetch'),
|
407
|
+
|
408
|
+
{
|
409
|
+
label: '是否可被点开',
|
410
|
+
type: 'input-text',
|
411
|
+
name: 'jumpableOn',
|
412
|
+
description:
|
413
|
+
'用表达式来决定,当前步骤是否可被点开。额外可用变量:currentStep 表示当前步骤。'
|
414
|
+
}
|
415
|
+
]
|
97
416
|
}
|
98
417
|
]
|
99
418
|
},
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
419
|
+
{
|
420
|
+
type: 'input-text',
|
421
|
+
name: 'startStep',
|
422
|
+
label: '起始默认值',
|
423
|
+
description:
|
424
|
+
'从第几步开始。可支持模版,但是只有在组件创建时渲染模版并设置当前步数,在之后组件被刷新时,当前step不会根据startStep改变'
|
425
|
+
}
|
426
|
+
]
|
427
|
+
},
|
107
428
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
label: '展示模式',
|
118
|
-
type: 'button-group-select',
|
119
|
-
size: 'xs',
|
120
|
-
mode: 'inline',
|
121
|
-
className: 'w-full',
|
122
|
-
value: 'normal',
|
123
|
-
options: [
|
124
|
-
{
|
125
|
-
label: '默认',
|
126
|
-
value: 'normal'
|
127
|
-
},
|
128
|
-
{
|
129
|
-
label: '左右摆放',
|
130
|
-
value: 'horizontal'
|
131
|
-
},
|
132
|
-
{
|
133
|
-
label: '内联',
|
134
|
-
value: 'inline'
|
135
|
-
}
|
136
|
-
]
|
137
|
-
},
|
138
|
-
|
139
|
-
getSchemaTpl('horizontal', {
|
140
|
-
visibleOn: 'data.mode == "horizontal"'
|
141
|
-
}),
|
142
|
-
|
143
|
-
getSchemaTpl('api', {
|
144
|
-
label: '保存接口',
|
145
|
-
description:
|
146
|
-
'如果接口返回了 <code>step</code> 变量,且数值是数字类型,比如 <code>3</code>,提交完后回跳到第 3 步'
|
147
|
-
}),
|
429
|
+
{
|
430
|
+
title: '接口',
|
431
|
+
body: [
|
432
|
+
getSchemaTpl('api', {
|
433
|
+
name: 'initApi',
|
434
|
+
label: '初始化接口',
|
435
|
+
description:
|
436
|
+
'用来初始化向导数据,当接口中返回 <code>step</code> 字段时,可以控制默认跳转到第几步,注意数值一定得是数字类型。当返回 <code>submiting</code> 并且当前步骤中存在异步保存接口时,可以让 wizard 初始进入异步提交状态。'
|
437
|
+
}),
|
148
438
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
visibleOn: 'data.api',
|
162
|
-
pipeIn: (value: any) => value != null,
|
163
|
-
pipeOut: (value: any) => (value ? '' : undefined),
|
164
|
-
mode: 'inline',
|
165
|
-
className: 'block'
|
166
|
-
},
|
167
|
-
|
168
|
-
getSchemaTpl('api', {
|
169
|
-
name: 'asyncApi',
|
170
|
-
label: '异步检测接口',
|
171
|
-
visibleOn: 'data.asyncApi != null',
|
172
|
-
description:
|
173
|
-
'设置此属性后,表单提交发送保存接口后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束'
|
174
|
-
}),
|
439
|
+
getSchemaTpl('switch', {
|
440
|
+
label: '采用异步方式?',
|
441
|
+
name: 'initAsyncApi',
|
442
|
+
visibleOn: 'data.initApi',
|
443
|
+
labelRemark: {
|
444
|
+
trigger: 'click',
|
445
|
+
rootClose: true,
|
446
|
+
title: '什么是异步方式?',
|
447
|
+
content:
|
448
|
+
'异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。',
|
449
|
+
placement: 'left'
|
450
|
+
},
|
175
451
|
|
176
|
-
|
177
|
-
|
178
|
-
|
452
|
+
pipeIn: (value: any) => value != null,
|
453
|
+
pipeOut: (value: any) => (value ? '' : undefined)
|
454
|
+
}),
|
179
455
|
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
456
|
+
getSchemaTpl('api', {
|
457
|
+
name: 'initAsyncApi',
|
458
|
+
label: '异步检测接口',
|
459
|
+
visibleOn: 'data.initAsyncApi != null',
|
460
|
+
description:
|
461
|
+
'设置此属性后,表单请求 initApi 后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束'
|
462
|
+
}),
|
185
463
|
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
name: 'initAsyncApi',
|
198
|
-
visibleOn: 'data.initApi',
|
199
|
-
pipeIn: (value: any) => value != null,
|
200
|
-
pipeOut: (value: any) => (value ? '' : undefined),
|
201
|
-
mode: 'inline',
|
202
|
-
className: 'block'
|
203
|
-
},
|
204
|
-
|
205
|
-
getSchemaTpl('api', {
|
206
|
-
name: 'initAsyncApi',
|
207
|
-
label: '异步检测接口',
|
208
|
-
visibleOn: 'data.initAsyncApi != null',
|
209
|
-
description:
|
210
|
-
'设置此属性后,表单请求 initApi 后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束'
|
211
|
-
}),
|
212
|
-
|
213
|
-
getSchemaTpl('initFetch'),
|
464
|
+
{
|
465
|
+
name: 'initFetch',
|
466
|
+
type: 'radios',
|
467
|
+
label: '是否初始拉取',
|
468
|
+
inline: true,
|
469
|
+
onChange: () => {},
|
470
|
+
options: [
|
471
|
+
{
|
472
|
+
label: '是',
|
473
|
+
value: true
|
474
|
+
},
|
214
475
|
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
description:
|
220
|
-
'用表达式来决定,当前步骤是否可被点开。额外可用变量:currentStep 表示当前步骤。'
|
221
|
-
}
|
222
|
-
]
|
223
|
-
}
|
224
|
-
]
|
225
|
-
},
|
226
|
-
{
|
227
|
-
type: 'input-text',
|
228
|
-
name: 'startStep',
|
229
|
-
label: '起始默认值',
|
230
|
-
description:
|
231
|
-
'从第几步开始。可支持模版,但是只有在组件创建时渲染模版并设置当前步数,在之后组件被刷新时,当前step不会根据startStep改变'
|
232
|
-
}
|
233
|
-
]
|
234
|
-
},
|
476
|
+
{
|
477
|
+
label: '否',
|
478
|
+
value: false
|
479
|
+
},
|
235
480
|
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
description:
|
243
|
-
'用来初始化向导数据,当接口中返回 <code>step</code> 字段时,可以控制默认跳转到第几步,注意数值一定得是数字类型。当返回 <code>submiting</code> 并且当前步骤中存在异步保存接口时,可以让 wizard 初始进入异步提交状态。'
|
244
|
-
}),
|
481
|
+
{
|
482
|
+
label: '表达式',
|
483
|
+
value: ''
|
484
|
+
}
|
485
|
+
]
|
486
|
+
},
|
245
487
|
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
'异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。',
|
254
|
-
placement: 'left'
|
488
|
+
{
|
489
|
+
name: 'initFetch',
|
490
|
+
autoComplete: false,
|
491
|
+
visibleOn: 'typeof this.initFetch !== "boolean"',
|
492
|
+
type: 'input-text',
|
493
|
+
placeholder: '',
|
494
|
+
className: 'm-t-n-sm'
|
255
495
|
},
|
256
|
-
type: 'switch',
|
257
|
-
name: 'initAsyncApi',
|
258
|
-
visibleOn: 'data.initApi',
|
259
|
-
pipeIn: (value: any) => value != null,
|
260
|
-
pipeOut: (value: any) => (value ? '' : undefined),
|
261
|
-
mode: 'inline'
|
262
|
-
},
|
263
|
-
|
264
|
-
getSchemaTpl('api', {
|
265
|
-
name: 'initAsyncApi',
|
266
|
-
label: '异步检测接口',
|
267
|
-
visibleOn: 'data.initAsyncApi != null',
|
268
|
-
description:
|
269
|
-
'设置此属性后,表单请求 initApi 后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束'
|
270
|
-
}),
|
271
496
|
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
label: '是否初始拉取',
|
276
|
-
inline: true,
|
277
|
-
onChange: () => {},
|
278
|
-
options: [
|
279
|
-
{
|
280
|
-
label: '是',
|
281
|
-
value: true
|
282
|
-
},
|
497
|
+
{
|
498
|
+
type: 'divider'
|
499
|
+
},
|
283
500
|
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
501
|
+
getSchemaTpl('api', {
|
502
|
+
label: '保存接口',
|
503
|
+
description:
|
504
|
+
'用来保存表单数据, 最后一步点击完成触发,<code>如果最后一步中已经设置保存接口,则此处设置无效。</code>'
|
505
|
+
}),
|
288
506
|
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
507
|
+
getSchemaTpl('switch', {
|
508
|
+
label: '采用异步方式?',
|
509
|
+
name: 'asyncApi',
|
510
|
+
visibleOn: 'data.api',
|
511
|
+
labelRemark: {
|
512
|
+
trigger: 'click',
|
513
|
+
rootClose: true,
|
514
|
+
title: '什么是异步方式?',
|
515
|
+
content:
|
516
|
+
'异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。',
|
517
|
+
placement: 'left'
|
518
|
+
},
|
519
|
+
pipeIn: (value: any) => value != null,
|
520
|
+
pipeOut: (value: any) => (value ? '' : undefined)
|
521
|
+
}),
|
295
522
|
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
523
|
+
getSchemaTpl('api', {
|
524
|
+
name: 'asyncApi',
|
525
|
+
label: '异步检测接口',
|
526
|
+
visibleOn: 'data.asyncApi != null',
|
527
|
+
description:
|
528
|
+
'设置此属性后,表单提交发送保存接口后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束'
|
529
|
+
})
|
530
|
+
]
|
531
|
+
},
|
304
532
|
|
305
|
-
|
306
|
-
|
307
|
-
|
533
|
+
{
|
534
|
+
title: '外观',
|
535
|
+
body: [
|
536
|
+
{
|
537
|
+
name: 'mode',
|
538
|
+
label: '展示模式',
|
539
|
+
type: 'button-group-select',
|
540
|
+
size: 'sm',
|
541
|
+
mode: 'inline',
|
542
|
+
className: 'w-full',
|
543
|
+
value: 'horizontal',
|
544
|
+
options: [
|
545
|
+
{
|
546
|
+
label: '水平',
|
547
|
+
value: 'horizontal'
|
548
|
+
},
|
308
549
|
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
550
|
+
{
|
551
|
+
label: '垂直',
|
552
|
+
value: 'vertical'
|
553
|
+
}
|
554
|
+
]
|
555
|
+
},
|
314
556
|
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
title: '什么是异步方式?',
|
321
|
-
content:
|
322
|
-
'异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。',
|
323
|
-
placement: 'left'
|
557
|
+
{
|
558
|
+
name: 'actionPrevLabel',
|
559
|
+
label: '上一步按钮名称',
|
560
|
+
type: 'input-text',
|
561
|
+
pipeIn: defaultValue('上一步')
|
324
562
|
},
|
325
|
-
type: 'switch',
|
326
|
-
name: 'asyncApi',
|
327
|
-
visibleOn: 'data.api',
|
328
|
-
pipeIn: (value: any) => value != null,
|
329
|
-
pipeOut: (value: any) => (value ? '' : undefined),
|
330
|
-
mode: 'inline'
|
331
|
-
},
|
332
|
-
|
333
|
-
getSchemaTpl('api', {
|
334
|
-
name: 'asyncApi',
|
335
|
-
label: '异步检测接口',
|
336
|
-
visibleOn: 'data.asyncApi != null',
|
337
|
-
description:
|
338
|
-
'设置此属性后,表单提交发送保存接口后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束'
|
339
|
-
})
|
340
|
-
]
|
341
|
-
},
|
342
563
|
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
type: 'button-group-select',
|
350
|
-
size: 'sm',
|
351
|
-
mode: 'inline',
|
352
|
-
className: 'w-full',
|
353
|
-
value: 'horizontal',
|
354
|
-
options: [
|
355
|
-
{
|
356
|
-
label: '水平',
|
357
|
-
value: 'horizontal'
|
358
|
-
},
|
564
|
+
{
|
565
|
+
name: 'actionNextLabel',
|
566
|
+
label: '下一步按钮名称',
|
567
|
+
type: 'input-text',
|
568
|
+
pipeIn: defaultValue('下一步')
|
569
|
+
},
|
359
570
|
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
571
|
+
{
|
572
|
+
name: 'actionNextSaveLabel',
|
573
|
+
label: '保存并下一步按钮名称',
|
574
|
+
type: 'input-text',
|
575
|
+
pipeIn: defaultValue('保存并下一步')
|
576
|
+
},
|
366
577
|
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
578
|
+
{
|
579
|
+
name: 'actionFinishLabel',
|
580
|
+
label: '完成按钮名称',
|
581
|
+
type: 'input-text',
|
582
|
+
pipeIn: defaultValue('完成')
|
583
|
+
},
|
373
584
|
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
},
|
585
|
+
// {
|
586
|
+
// type: 'alert',
|
587
|
+
// level: 'info',
|
588
|
+
// body: `温馨提示:操作按钮每个步骤可以单独配置,请在右侧切换到需要单独配置的步骤后,点击下方的【自定义按钮】定制。`
|
589
|
+
// },
|
380
590
|
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
591
|
+
getSchemaTpl('className'),
|
592
|
+
getSchemaTpl('className', {
|
593
|
+
name: 'actionClassName',
|
594
|
+
label: '按钮 CSS 类名'
|
595
|
+
})
|
596
|
+
]
|
597
|
+
},
|
387
598
|
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
// {
|
396
|
-
// type: 'alert',
|
397
|
-
// level: 'info',
|
398
|
-
// body: `温馨提示:操作按钮每个步骤可以单独配置,请在右侧切换到需要单独配置的步骤后,点击下方的【自定义按钮】定制。`
|
399
|
-
// },
|
400
|
-
|
401
|
-
getSchemaTpl('className'),
|
402
|
-
getSchemaTpl('className', {
|
403
|
-
name: 'actionClassName',
|
404
|
-
label: '按钮 CSS 类名'
|
405
|
-
})
|
406
|
-
]
|
407
|
-
},
|
599
|
+
{
|
600
|
+
title: '其他',
|
601
|
+
body: [
|
602
|
+
getSchemaTpl('ref'),
|
603
|
+
getSchemaTpl('name'),
|
604
|
+
getSchemaTpl('reload'),
|
408
605
|
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
606
|
+
{
|
607
|
+
label: '跳转',
|
608
|
+
name: 'redirect',
|
609
|
+
type: 'input-text',
|
610
|
+
description: '当设置此值后,表单提交完后跳转到目标地址。'
|
611
|
+
},
|
415
612
|
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
type: 'input-text',
|
420
|
-
description: '当设置此值后,表单提交完后跳转到目标地址。'
|
421
|
-
},
|
613
|
+
getSchemaTpl('visible')
|
614
|
+
]
|
615
|
+
},
|
422
616
|
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
617
|
+
{
|
618
|
+
title: '事件',
|
619
|
+
className: 'p-none',
|
620
|
+
body: [
|
621
|
+
getSchemaTpl('eventControl', {
|
622
|
+
name: 'onEvent',
|
623
|
+
...getEventControlConfig(this.manager, context)
|
624
|
+
})
|
625
|
+
]
|
626
|
+
}
|
627
|
+
])
|
628
|
+
];
|
629
|
+
};
|
428
630
|
|
429
631
|
/**
|
430
632
|
* 补充切换的 toolbar
|
@@ -510,9 +712,12 @@ export class WizardPlugin extends BasePlugin {
|
|
510
712
|
description:
|
511
713
|
'如果接口返回了 <code>step</code> 变量,且数值是数字类型,比如 <code>3</code>,提交完后回跳到第 3 步'
|
512
714
|
}),
|
513
|
-
|
715
|
+
|
716
|
+
getSchemaTpl('switch', {
|
514
717
|
label: '采用异步方式?',
|
515
|
-
|
718
|
+
name: 'asyncApi',
|
719
|
+
visibleOn: 'data.api',
|
720
|
+
labelRemark: {
|
516
721
|
trigger: 'click',
|
517
722
|
rootClose: true,
|
518
723
|
title: '什么是异步方式?',
|
@@ -520,14 +725,10 @@ export class WizardPlugin extends BasePlugin {
|
|
520
725
|
'异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。',
|
521
726
|
placement: 'left'
|
522
727
|
},
|
523
|
-
type: 'switch',
|
524
|
-
name: 'asyncApi',
|
525
|
-
visibleOn: 'data.api',
|
526
728
|
pipeIn: (value: any) => value != null,
|
527
|
-
pipeOut: (value: any) => (value ? '' : undefined)
|
528
|
-
|
529
|
-
|
530
|
-
},
|
729
|
+
pipeOut: (value: any) => (value ? '' : undefined)
|
730
|
+
}),
|
731
|
+
|
531
732
|
getSchemaTpl('api', {
|
532
733
|
name: 'asyncApi',
|
533
734
|
label: '异步检测接口',
|
@@ -543,9 +744,12 @@ export class WizardPlugin extends BasePlugin {
|
|
543
744
|
label: '初始化接口',
|
544
745
|
description: '用来初始化表单数据'
|
545
746
|
}),
|
546
|
-
|
747
|
+
|
748
|
+
getSchemaTpl('switch', {
|
547
749
|
label: '采用异步方式?',
|
548
|
-
|
750
|
+
name: 'initAsyncApi',
|
751
|
+
visibleOn: 'data.initApi',
|
752
|
+
labelRemark: {
|
549
753
|
trigger: 'click',
|
550
754
|
rootClose: true,
|
551
755
|
title: '什么是异步方式?',
|
@@ -553,14 +757,10 @@ export class WizardPlugin extends BasePlugin {
|
|
553
757
|
'异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。',
|
554
758
|
placement: 'left'
|
555
759
|
},
|
556
|
-
type: 'switch',
|
557
|
-
name: 'initAsyncApi',
|
558
|
-
visibleOn: 'data.initApi',
|
559
760
|
pipeIn: (value: any) => value != null,
|
560
|
-
pipeOut: (value: any) => (value ? '' : undefined)
|
561
|
-
|
562
|
-
|
563
|
-
},
|
761
|
+
pipeOut: (value: any) => (value ? '' : undefined)
|
762
|
+
}),
|
763
|
+
|
564
764
|
getSchemaTpl('api', {
|
565
765
|
name: 'initAsyncApi',
|
566
766
|
label: '异步检测接口',
|
@@ -647,6 +847,7 @@ export class WizardPlugin extends BasePlugin {
|
|
647
847
|
return (
|
648
848
|
<VRenderer
|
649
849
|
key={id}
|
850
|
+
type={info.type}
|
650
851
|
plugin={info.plugin}
|
651
852
|
renderer={info.renderer}
|
652
853
|
$schema="/schemas/WizardStepSchema.json"
|