amis-editor 4.2.0-beta.2 → 5.1.9
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/Control/APIControl.d.ts +1101 -447
- 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/OptionControl.d.ts +23 -34
- package/dist/component/Control/StatusControl.d.ts +39 -0
- package/dist/component/Control/SwitchMoreControl.d.ts +224 -0
- package/dist/component/Control/ValidationControl.d.ts +50 -15
- 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/Editor.d.ts +16 -0
- package/dist/component/RegionWrapper.d.ts +10 -0
- package/dist/component/VRenderer.d.ts +10 -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 +65 -38
- 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 +1198 -474
- package/src/plugin/.DS_Store +0 -0
- 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 +77 -135
- 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/src/plugin/Grid.tsx
CHANGED
@@ -176,183 +176,195 @@ export class GridPlugin extends BasePlugin {
|
|
176
176
|
panelWithOutOthers = false;
|
177
177
|
panelBodyCreator(context: BaseEventContext) {
|
178
178
|
const asSecondFactor = context.secondFactor;
|
179
|
+
|
179
180
|
return [
|
180
|
-
getSchemaTpl('
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
181
|
+
getSchemaTpl('tabs', [
|
182
|
+
{
|
183
|
+
title: '属性',
|
184
|
+
className: 'p-none',
|
185
|
+
body: [
|
186
|
+
getSchemaTpl('collapseGroup', [
|
187
|
+
{
|
188
|
+
title: '插入',
|
189
|
+
body: [
|
190
|
+
asSecondFactor
|
191
|
+
? null
|
192
|
+
: {
|
193
|
+
type: 'wrapper',
|
194
|
+
size: 'none',
|
195
|
+
className: 'grid grid-cols-2 gap-4 mb-4',
|
196
|
+
body: [
|
197
|
+
{
|
198
|
+
children: (
|
199
|
+
<Button
|
200
|
+
size="sm"
|
201
|
+
onClick={() =>
|
202
|
+
this.insertRowAfter(context.node)
|
203
|
+
}
|
204
|
+
>
|
205
|
+
<Icon className="icon" icon="arrow-to-bottom" />
|
206
|
+
<span>下方插入新行</span>
|
207
|
+
</Button>
|
208
|
+
)
|
209
|
+
},
|
210
|
+
{
|
211
|
+
children: (
|
212
|
+
<Button
|
213
|
+
size="sm"
|
214
|
+
onClick={() =>
|
215
|
+
this.insertRowBefore(context.node)
|
216
|
+
}
|
217
|
+
>
|
218
|
+
<Icon
|
219
|
+
className="icon"
|
220
|
+
icon="top-arrow-to-top"
|
221
|
+
/>
|
222
|
+
<span>上方插入新行</span>
|
223
|
+
</Button>
|
224
|
+
)
|
225
|
+
}
|
226
|
+
]
|
227
|
+
}
|
228
|
+
].filter(item => item)
|
229
|
+
},
|
230
|
+
{
|
231
|
+
title: '布局',
|
190
232
|
body: [
|
191
233
|
{
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
234
|
+
label: '列数',
|
235
|
+
name: 'columns',
|
236
|
+
type: 'select',
|
237
|
+
pipeIn: (value: any) =>
|
238
|
+
Array.isArray(value) ? value.length : undefined,
|
239
|
+
pipeOut: (value: any, origin: any) => {
|
240
|
+
if (Array.isArray(origin)) {
|
241
|
+
if (origin.length > value) {
|
242
|
+
origin = origin.concat();
|
243
|
+
origin.splice(value - 1, origin.length - value);
|
244
|
+
} else {
|
245
|
+
origin = origin.concat(
|
246
|
+
repeatArray(
|
247
|
+
{
|
248
|
+
body: []
|
249
|
+
},
|
250
|
+
value - origin.length
|
251
|
+
)
|
252
|
+
);
|
253
|
+
}
|
254
|
+
}
|
255
|
+
|
256
|
+
return origin;
|
257
|
+
},
|
258
|
+
options: repeatArray(null, 12).map((_, index) => ({
|
259
|
+
label: `${index + 1}`,
|
260
|
+
value: index + 1
|
261
|
+
}))
|
201
262
|
},
|
202
|
-
{
|
203
|
-
children: (
|
204
|
-
<Button
|
205
|
-
size="sm"
|
206
|
-
onClick={() => this.insertRowBefore(context.node)}
|
207
|
-
>
|
208
|
-
<Icon className="icon" icon="top-arrow-to-top" />
|
209
|
-
<span>上方插入新行</span>
|
210
|
-
</Button>
|
211
|
-
)
|
212
|
-
}
|
213
|
-
]
|
214
|
-
},
|
215
263
|
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
if (origin.length > value) {
|
225
|
-
origin = origin.concat();
|
226
|
-
origin.splice(value - 1, origin.length - value);
|
227
|
-
} else {
|
228
|
-
origin = origin.concat(
|
229
|
-
repeatArray(
|
264
|
+
{
|
265
|
+
type: 'button-group-select',
|
266
|
+
name: 'gap',
|
267
|
+
label: '列间距',
|
268
|
+
size: 'sm',
|
269
|
+
clearable: true,
|
270
|
+
tiled: true,
|
271
|
+
options: [
|
230
272
|
{
|
231
|
-
|
273
|
+
label: '无',
|
274
|
+
value: 'none'
|
232
275
|
},
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
{
|
309
|
-
value: 'between',
|
310
|
-
label: '两端对齐'
|
311
|
-
}
|
312
|
-
]
|
313
|
-
},
|
314
|
-
{
|
315
|
-
type: 'button-group-select',
|
316
|
-
name: 'valign',
|
317
|
-
size: 'sm',
|
318
|
-
label: '垂直对齐',
|
319
|
-
tiled: true,
|
320
|
-
pipeIn: defaultValue('top'),
|
321
|
-
options: [
|
322
|
-
{
|
323
|
-
value: 'top',
|
324
|
-
label: '顶部对齐'
|
325
|
-
},
|
326
|
-
{
|
327
|
-
value: 'middle',
|
328
|
-
label: '中间对齐'
|
329
|
-
},
|
330
|
-
{
|
331
|
-
value: 'bottom',
|
332
|
-
label: '底部对齐'
|
333
|
-
},
|
334
|
-
{
|
335
|
-
value: 'between',
|
336
|
-
label: '两端对齐'
|
276
|
+
{
|
277
|
+
label: '极小',
|
278
|
+
value: 'xs'
|
279
|
+
},
|
280
|
+
{
|
281
|
+
label: '小',
|
282
|
+
value: 'sm'
|
283
|
+
},
|
284
|
+
{
|
285
|
+
label: '正常',
|
286
|
+
value: 'base'
|
287
|
+
},
|
288
|
+
{
|
289
|
+
label: '中',
|
290
|
+
value: 'md'
|
291
|
+
},
|
292
|
+
{
|
293
|
+
label: '大',
|
294
|
+
value: 'lg'
|
295
|
+
}
|
296
|
+
]
|
297
|
+
},
|
298
|
+
{
|
299
|
+
type: 'button-group-select',
|
300
|
+
name: 'align',
|
301
|
+
size: 'sm',
|
302
|
+
label: '水平对齐',
|
303
|
+
tiled: true,
|
304
|
+
pipeIn: defaultValue('left'),
|
305
|
+
options: [
|
306
|
+
{
|
307
|
+
value: 'left',
|
308
|
+
label: '左对齐'
|
309
|
+
},
|
310
|
+
{
|
311
|
+
value: 'center',
|
312
|
+
label: '中间对齐'
|
313
|
+
},
|
314
|
+
{
|
315
|
+
value: 'right',
|
316
|
+
label: '右对齐'
|
317
|
+
},
|
318
|
+
{
|
319
|
+
value: 'between',
|
320
|
+
label: '两端对齐'
|
321
|
+
}
|
322
|
+
]
|
323
|
+
},
|
324
|
+
{
|
325
|
+
type: 'button-group-select',
|
326
|
+
name: 'valign',
|
327
|
+
size: 'sm',
|
328
|
+
label: '垂直对齐',
|
329
|
+
tiled: true,
|
330
|
+
pipeIn: defaultValue('top'),
|
331
|
+
options: [
|
332
|
+
{
|
333
|
+
value: 'top',
|
334
|
+
label: '顶部对齐'
|
335
|
+
},
|
336
|
+
{
|
337
|
+
value: 'middle',
|
338
|
+
label: '中间对齐'
|
339
|
+
},
|
340
|
+
{
|
341
|
+
value: 'bottom',
|
342
|
+
label: '底部对齐'
|
343
|
+
},
|
344
|
+
{
|
345
|
+
value: 'between',
|
346
|
+
label: '两端对齐'
|
347
|
+
}
|
348
|
+
]
|
349
|
+
}
|
350
|
+
]
|
337
351
|
}
|
338
|
-
]
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
})
|
355
|
-
].filter(item => item);
|
352
|
+
])
|
353
|
+
]
|
354
|
+
},
|
355
|
+
this.panelWithOutOthers
|
356
|
+
? null
|
357
|
+
: {
|
358
|
+
title: '外观',
|
359
|
+
body: [
|
360
|
+
getSchemaTpl('className'),
|
361
|
+
getSchemaTpl('subFormItemMode'),
|
362
|
+
getSchemaTpl('subFormHorizontalMode'),
|
363
|
+
getSchemaTpl('subFormHorizontal')
|
364
|
+
]
|
365
|
+
}
|
366
|
+
])
|
367
|
+
];
|
356
368
|
}
|
357
369
|
|
358
370
|
vRendererConfig: VRendererConfig = {
|
@@ -369,155 +381,170 @@ export class GridPlugin extends BasePlugin {
|
|
369
381
|
const host = context.node.host;
|
370
382
|
|
371
383
|
return [
|
372
|
-
getSchemaTpl('
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
size: 'none',
|
379
|
-
className: 'grid grid-cols-2 gap-4',
|
380
|
-
body: [
|
381
|
-
host.isSecondFactor
|
382
|
-
? null
|
383
|
-
: {
|
384
|
-
children: (
|
385
|
-
<Button
|
386
|
-
size="sm"
|
387
|
-
onClick={() => this.insertRowAfter(context.node.host)}
|
388
|
-
>
|
389
|
-
<Icon className="icon" icon="arrow-to-bottom" />
|
390
|
-
<span>下方插入新行</span>
|
391
|
-
</Button>
|
392
|
-
)
|
393
|
-
},
|
394
|
-
host.isSecondFactor
|
395
|
-
? null
|
396
|
-
: {
|
397
|
-
children: (
|
398
|
-
<Button
|
399
|
-
size="sm"
|
400
|
-
onClick={() =>
|
401
|
-
this.insertRowBefore(context.node.host)
|
402
|
-
}
|
403
|
-
>
|
404
|
-
<Icon className="icon" icon="top-arrow-to-top" />
|
405
|
-
<span>上方插入新行</span>
|
406
|
-
</Button>
|
407
|
-
)
|
408
|
-
},
|
409
|
-
{
|
410
|
-
children: (
|
411
|
-
<Button
|
412
|
-
size="sm"
|
413
|
-
onClick={() => this.insertColumnBefore(context)}
|
414
|
-
>
|
415
|
-
<Icon className="icon" icon="left-arrow-to-left" />
|
416
|
-
<span>左侧插入新列</span>
|
417
|
-
</Button>
|
418
|
-
)
|
419
|
-
},
|
420
|
-
{
|
421
|
-
children: (
|
422
|
-
<Button
|
423
|
-
size="sm"
|
424
|
-
onClick={() => this.insertColumnAfter(context)}
|
425
|
-
>
|
426
|
-
<Icon className="icon" icon="arrow-to-right" />
|
427
|
-
<span>右侧插入新列</span>
|
428
|
-
</Button>
|
429
|
-
)
|
430
|
-
}
|
431
|
-
].filter(item => item)
|
432
|
-
}
|
433
|
-
]
|
434
|
-
}),
|
435
|
-
getSchemaTpl('fieldSet', {
|
436
|
-
title: '宽度设置',
|
437
|
-
collapsable: false,
|
438
|
-
body: [
|
439
|
-
{
|
440
|
-
type: 'button-group-select',
|
441
|
-
name: 'md',
|
442
|
-
size: 'sm',
|
443
|
-
label: false,
|
444
|
-
pipeIn: (value: any) =>
|
445
|
-
typeof value === 'number' ? 'manual' : value || '',
|
446
|
-
pipeOut: (value: any) => (value === 'manual' ? 1 : value),
|
447
|
-
tiled: true,
|
448
|
-
options: [
|
449
|
-
{
|
450
|
-
value: '',
|
451
|
-
label: '适配宽度'
|
452
|
-
},
|
453
|
-
{
|
454
|
-
value: 'auto',
|
455
|
-
label: '适配内容'
|
456
|
-
},
|
457
|
-
{
|
458
|
-
value: 'manual',
|
459
|
-
label: '手动'
|
460
|
-
}
|
461
|
-
]
|
462
|
-
},
|
463
|
-
|
464
|
-
{
|
465
|
-
visibleOn: 'typeof this.md === "number"',
|
466
|
-
label: '宽度占比',
|
467
|
-
type: 'input-range',
|
468
|
-
name: 'md',
|
469
|
-
min: 1,
|
470
|
-
max: 12,
|
471
|
-
step: 1
|
472
|
-
}
|
473
|
-
]
|
474
|
-
}),
|
475
|
-
|
476
|
-
getSchemaTpl('fieldSet', {
|
477
|
-
title: '垂直对齐',
|
478
|
-
collapsable: false,
|
479
|
-
body: [
|
480
|
-
{
|
481
|
-
type: 'button-group-select',
|
482
|
-
name: 'valign',
|
483
|
-
size: 'sm',
|
484
|
-
label: false,
|
485
|
-
tiled: true,
|
486
|
-
clearable: true,
|
487
|
-
options: [
|
488
|
-
{
|
489
|
-
value: 'top',
|
490
|
-
label: '顶部对齐'
|
491
|
-
},
|
384
|
+
getSchemaTpl('tabs', [
|
385
|
+
{
|
386
|
+
title: '属性',
|
387
|
+
className: 'p-none',
|
388
|
+
body: [
|
389
|
+
getSchemaTpl('collapseGroup', [
|
492
390
|
{
|
493
|
-
|
494
|
-
|
391
|
+
title: '插入',
|
392
|
+
body: [
|
393
|
+
{
|
394
|
+
type: 'wrapper',
|
395
|
+
size: 'none',
|
396
|
+
className: 'grid grid-cols-2 gap-4',
|
397
|
+
body: [
|
398
|
+
host.isSecondFactor
|
399
|
+
? null
|
400
|
+
: {
|
401
|
+
children: (
|
402
|
+
<Button
|
403
|
+
size="sm"
|
404
|
+
onClick={() =>
|
405
|
+
this.insertRowAfter(context.node.host)
|
406
|
+
}
|
407
|
+
>
|
408
|
+
<Icon
|
409
|
+
className="icon"
|
410
|
+
icon="arrow-to-bottom"
|
411
|
+
/>
|
412
|
+
<span>下方插入新行</span>
|
413
|
+
</Button>
|
414
|
+
)
|
415
|
+
},
|
416
|
+
host.isSecondFactor
|
417
|
+
? null
|
418
|
+
: {
|
419
|
+
children: (
|
420
|
+
<Button
|
421
|
+
size="sm"
|
422
|
+
onClick={() =>
|
423
|
+
this.insertRowBefore(context.node.host)
|
424
|
+
}
|
425
|
+
>
|
426
|
+
<Icon
|
427
|
+
className="icon"
|
428
|
+
icon="top-arrow-to-top"
|
429
|
+
/>
|
430
|
+
<span>上方插入新行</span>
|
431
|
+
</Button>
|
432
|
+
)
|
433
|
+
},
|
434
|
+
{
|
435
|
+
children: (
|
436
|
+
<Button
|
437
|
+
size="sm"
|
438
|
+
onClick={() => this.insertColumnBefore(context)}
|
439
|
+
>
|
440
|
+
<Icon
|
441
|
+
className="icon"
|
442
|
+
icon="left-arrow-to-left"
|
443
|
+
/>
|
444
|
+
<span>左侧插入新列</span>
|
445
|
+
</Button>
|
446
|
+
)
|
447
|
+
},
|
448
|
+
{
|
449
|
+
children: (
|
450
|
+
<Button
|
451
|
+
size="sm"
|
452
|
+
onClick={() => this.insertColumnAfter(context)}
|
453
|
+
>
|
454
|
+
<Icon className="icon" icon="arrow-to-right" />
|
455
|
+
<span>右侧插入新列</span>
|
456
|
+
</Button>
|
457
|
+
)
|
458
|
+
}
|
459
|
+
].filter(item => item)
|
460
|
+
}
|
461
|
+
]
|
495
462
|
},
|
496
463
|
{
|
497
|
-
|
498
|
-
|
464
|
+
title: '宽度',
|
465
|
+
body: [
|
466
|
+
{
|
467
|
+
type: 'button-group-select',
|
468
|
+
name: 'md',
|
469
|
+
size: 'sm',
|
470
|
+
label: false,
|
471
|
+
pipeIn: (value: any) =>
|
472
|
+
typeof value === 'number' ? 'manual' : value || '',
|
473
|
+
pipeOut: (value: any) => (value === 'manual' ? 1 : value),
|
474
|
+
tiled: true,
|
475
|
+
options: [
|
476
|
+
{
|
477
|
+
value: '',
|
478
|
+
label: '适配宽度'
|
479
|
+
},
|
480
|
+
{
|
481
|
+
value: 'auto',
|
482
|
+
label: '适配内容'
|
483
|
+
},
|
484
|
+
{
|
485
|
+
value: 'manual',
|
486
|
+
label: '手动'
|
487
|
+
}
|
488
|
+
]
|
489
|
+
},
|
490
|
+
{
|
491
|
+
visibleOn: 'typeof this.md === "number"',
|
492
|
+
label: '宽度占比',
|
493
|
+
type: 'input-range',
|
494
|
+
name: 'md',
|
495
|
+
min: 1,
|
496
|
+
max: 12,
|
497
|
+
step: 1
|
498
|
+
}
|
499
|
+
]
|
499
500
|
},
|
500
501
|
{
|
501
|
-
|
502
|
-
|
502
|
+
title: '布局',
|
503
|
+
body: [
|
504
|
+
{
|
505
|
+
type: 'button-group-select',
|
506
|
+
name: 'valign',
|
507
|
+
size: 'sm',
|
508
|
+
label: false,
|
509
|
+
tiled: true,
|
510
|
+
clearable: true,
|
511
|
+
options: [
|
512
|
+
{
|
513
|
+
value: 'top',
|
514
|
+
label: '顶部对齐'
|
515
|
+
},
|
516
|
+
{
|
517
|
+
value: 'middle',
|
518
|
+
label: '中间对齐'
|
519
|
+
},
|
520
|
+
{
|
521
|
+
value: 'bottom',
|
522
|
+
label: '底部对齐'
|
523
|
+
},
|
524
|
+
{
|
525
|
+
value: 'between',
|
526
|
+
label: '两端对齐'
|
527
|
+
}
|
528
|
+
]
|
529
|
+
}
|
530
|
+
]
|
503
531
|
}
|
504
|
-
]
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
].filter(item => item);
|
532
|
+
])
|
533
|
+
]
|
534
|
+
},
|
535
|
+
{
|
536
|
+
title: '外观',
|
537
|
+
body: [
|
538
|
+
this.panelWithOutOthers
|
539
|
+
? null
|
540
|
+
: getSchemaTpl('className', {
|
541
|
+
label: '栏 CSS 类名',
|
542
|
+
name: 'columnClassName'
|
543
|
+
})
|
544
|
+
]
|
545
|
+
}
|
546
|
+
])
|
547
|
+
];
|
521
548
|
}
|
522
549
|
};
|
523
550
|
|
@@ -542,6 +569,7 @@ export class GridPlugin extends BasePlugin {
|
|
542
569
|
return (
|
543
570
|
<VRenderer
|
544
571
|
key={`${node.$$id}-${index}`}
|
572
|
+
type={info.type}
|
545
573
|
plugin={info.plugin}
|
546
574
|
renderer={info.renderer}
|
547
575
|
$schema="/schemas/GridColumn.json"
|