@dckj-npm/dc-material 0.1.359 → 0.1.361
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/docs/colorful-button.html +3 -3
- package/build/docs/colorful-input.html +3 -3
- package/build/docs/index.html +3 -3
- package/build/docs/{umi.d22560a0.css → umi.a2a18b22.css} +1 -1
- package/build/docs/umi.e8fefa28.js +1 -0
- package/build/docs/~demos/colorful-button-demo.html +3 -3
- package/build/docs/~demos/colorful-input-demo.html +3 -3
- package/build/lowcode/assets-daily.json +13 -13
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +13 -13
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.design.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +6 -6
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +5 -5
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +5 -5
- package/dist/BizComps.css +1 -1
- package/dist/BizComps.js +2 -2
- package/dist/BizComps.js.map +1 -1
- package/es/components/custom-form/custom-form.d.ts +37 -0
- package/es/components/custom-form/custom-form.js +158 -0
- package/es/components/custom-form/index.d.ts +6 -0
- package/es/components/custom-form/index.js +6 -0
- package/es/components/custom-form/index.scss +25 -0
- package/es/components/teletext-list/schema.json +1278 -0
- package/es/components/teletext-list/teletext-list-item.js +13 -9
- package/es/components/teletext-list/teletext-list-item.scss +16 -0
- package/es/components/teletext-list/teletext-list.js +2 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +4 -0
- package/es/style.js +8 -0
- package/es/utils/children-node-handle.js +5 -0
- package/lib/components/custom-form/custom-form.d.ts +37 -0
- package/lib/components/custom-form/custom-form.js +164 -0
- package/lib/components/custom-form/index.d.ts +6 -0
- package/lib/components/custom-form/index.js +6 -0
- package/lib/components/custom-form/index.scss +25 -0
- package/lib/components/teletext-list/schema.json +1278 -0
- package/lib/components/teletext-list/teletext-list-item.js +13 -9
- package/lib/components/teletext-list/teletext-list-item.scss +16 -0
- package/lib/components/teletext-list/teletext-list.js +2 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -1
- package/lib/style.js +8 -0
- package/lib/utils/children-node-handle.js +5 -0
- package/lowcode/custom-form/meta.ts +307 -0
- package/lowcode_es/custom-form/meta.d.ts +22 -0
- package/lowcode_es/custom-form/meta.js +302 -0
- package/lowcode_es/meta.js +3 -2
- package/lowcode_lib/custom-form/meta.d.ts +22 -0
- package/lowcode_lib/custom-form/meta.js +307 -0
- package/lowcode_lib/meta.js +41 -40
- package/package.json +3 -3
- package/build/docs/umi.d7be81d3.js +0 -1
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
var CustomFormMeta = {
|
|
3
|
+
group: '低代码组件',
|
|
4
|
+
componentName: 'CustomForm',
|
|
5
|
+
title: '自定义表单',
|
|
6
|
+
docUrl: '',
|
|
7
|
+
screenshot: '',
|
|
8
|
+
devMode: 'proCode',
|
|
9
|
+
category: '信息输入',
|
|
10
|
+
npm: {
|
|
11
|
+
"package": '@dckj-npm/dc-material',
|
|
12
|
+
version: '0.1.359',
|
|
13
|
+
exportName: 'CustomForm',
|
|
14
|
+
main: 'src/index.tsx',
|
|
15
|
+
destructuring: true,
|
|
16
|
+
subName: ''
|
|
17
|
+
},
|
|
18
|
+
configure: {
|
|
19
|
+
component: {
|
|
20
|
+
isContainer: true
|
|
21
|
+
},
|
|
22
|
+
props: [{
|
|
23
|
+
title: '列数',
|
|
24
|
+
name: 'columns',
|
|
25
|
+
setter: {
|
|
26
|
+
componentName: 'RadioGroupSetter',
|
|
27
|
+
props: {
|
|
28
|
+
dataSource: [{
|
|
29
|
+
label: '一列',
|
|
30
|
+
value: 1
|
|
31
|
+
}, {
|
|
32
|
+
label: '二列',
|
|
33
|
+
value: 2
|
|
34
|
+
}, {
|
|
35
|
+
label: '三列',
|
|
36
|
+
value: 3
|
|
37
|
+
}, {
|
|
38
|
+
label: '四列',
|
|
39
|
+
value: 4
|
|
40
|
+
}],
|
|
41
|
+
options: [{
|
|
42
|
+
label: '一列',
|
|
43
|
+
value: 1
|
|
44
|
+
}, {
|
|
45
|
+
label: '二列',
|
|
46
|
+
value: 2
|
|
47
|
+
}, {
|
|
48
|
+
label: '三列',
|
|
49
|
+
value: 3
|
|
50
|
+
}, {
|
|
51
|
+
label: '四列',
|
|
52
|
+
value: 4
|
|
53
|
+
}]
|
|
54
|
+
},
|
|
55
|
+
initialValue: 1
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
title: '间距',
|
|
59
|
+
name: 'spacing',
|
|
60
|
+
setter: {
|
|
61
|
+
componentName: 'JsonSetter',
|
|
62
|
+
isRequired: false,
|
|
63
|
+
initialValue: [0, 16, 16, 0]
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
title: '空态文案',
|
|
67
|
+
name: 'emptyContent',
|
|
68
|
+
setter: {
|
|
69
|
+
componentName: 'StringSetter',
|
|
70
|
+
isRequired: false,
|
|
71
|
+
initialValue: '添加表单项'
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
title: '表单项',
|
|
75
|
+
name: 'formItems',
|
|
76
|
+
setter: {
|
|
77
|
+
componentName: 'ArraySetter',
|
|
78
|
+
props: {
|
|
79
|
+
itemSetter: {
|
|
80
|
+
componentName: 'ObjectSetter',
|
|
81
|
+
props: {
|
|
82
|
+
config: {
|
|
83
|
+
items: [{
|
|
84
|
+
title: '字段名',
|
|
85
|
+
name: 'field',
|
|
86
|
+
setter: {
|
|
87
|
+
componentName: 'StringSetter',
|
|
88
|
+
isRequired: true,
|
|
89
|
+
initialValue: ''
|
|
90
|
+
}
|
|
91
|
+
}, {
|
|
92
|
+
title: '标题',
|
|
93
|
+
name: 'label',
|
|
94
|
+
setter: {
|
|
95
|
+
componentName: 'StringSetter',
|
|
96
|
+
isRequired: false,
|
|
97
|
+
initialValue: ''
|
|
98
|
+
}
|
|
99
|
+
}, {
|
|
100
|
+
title: '必填',
|
|
101
|
+
name: 'required',
|
|
102
|
+
setter: {
|
|
103
|
+
componentName: 'BoolSetter',
|
|
104
|
+
isRequired: false,
|
|
105
|
+
initialValue: false
|
|
106
|
+
}
|
|
107
|
+
}, {
|
|
108
|
+
title: '组件类型',
|
|
109
|
+
name: 'componentType',
|
|
110
|
+
setter: {
|
|
111
|
+
componentName: 'SelectSetter',
|
|
112
|
+
props: {
|
|
113
|
+
options: [{
|
|
114
|
+
label: '输入框',
|
|
115
|
+
value: 'Input'
|
|
116
|
+
}, {
|
|
117
|
+
label: '多行文本',
|
|
118
|
+
value: 'TextArea'
|
|
119
|
+
}, {
|
|
120
|
+
label: '下拉选择',
|
|
121
|
+
value: 'Select'
|
|
122
|
+
}, {
|
|
123
|
+
label: '单选组',
|
|
124
|
+
value: 'RadioGroup'
|
|
125
|
+
}, {
|
|
126
|
+
label: '复选组',
|
|
127
|
+
value: 'CheckboxGroup'
|
|
128
|
+
}, {
|
|
129
|
+
label: '数字输入',
|
|
130
|
+
value: 'NumberPicker'
|
|
131
|
+
}, {
|
|
132
|
+
label: '日期选择',
|
|
133
|
+
value: 'DatePicker'
|
|
134
|
+
}, {
|
|
135
|
+
label: '上传',
|
|
136
|
+
value: 'Upload'
|
|
137
|
+
}]
|
|
138
|
+
},
|
|
139
|
+
initialValue: 'Input'
|
|
140
|
+
}
|
|
141
|
+
}, {
|
|
142
|
+
title: '选项',
|
|
143
|
+
name: 'options',
|
|
144
|
+
setter: {
|
|
145
|
+
componentName: 'ArraySetter',
|
|
146
|
+
props: {
|
|
147
|
+
itemSetter: {
|
|
148
|
+
componentName: 'ObjectSetter',
|
|
149
|
+
props: {
|
|
150
|
+
config: {
|
|
151
|
+
items: [{
|
|
152
|
+
title: '名称',
|
|
153
|
+
name: 'label',
|
|
154
|
+
setter: {
|
|
155
|
+
componentName: 'StringSetter',
|
|
156
|
+
isRequired: true,
|
|
157
|
+
initialValue: ''
|
|
158
|
+
}
|
|
159
|
+
}, {
|
|
160
|
+
title: '值',
|
|
161
|
+
name: 'value',
|
|
162
|
+
setter: {
|
|
163
|
+
componentName: 'StringSetter',
|
|
164
|
+
isRequired: true,
|
|
165
|
+
initialValue: ''
|
|
166
|
+
}
|
|
167
|
+
}]
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
initialValue: []
|
|
173
|
+
}
|
|
174
|
+
}, {
|
|
175
|
+
title: '列跨度',
|
|
176
|
+
name: 'columnSpan',
|
|
177
|
+
setter: {
|
|
178
|
+
componentName: 'NumberSetter',
|
|
179
|
+
props: {
|
|
180
|
+
min: 1,
|
|
181
|
+
max: 4
|
|
182
|
+
},
|
|
183
|
+
initialValue: 1
|
|
184
|
+
}
|
|
185
|
+
}, {
|
|
186
|
+
title: '组件属性',
|
|
187
|
+
name: 'componentProps',
|
|
188
|
+
setter: {
|
|
189
|
+
componentName: 'JsonSetter',
|
|
190
|
+
isRequired: false
|
|
191
|
+
}
|
|
192
|
+
}, {
|
|
193
|
+
title: '表单项属性',
|
|
194
|
+
name: 'formItemProps',
|
|
195
|
+
setter: {
|
|
196
|
+
componentName: 'JsonSetter',
|
|
197
|
+
isRequired: false
|
|
198
|
+
}
|
|
199
|
+
}],
|
|
200
|
+
extraSetter: {
|
|
201
|
+
componentName: 'MixedSetter',
|
|
202
|
+
isRequired: false,
|
|
203
|
+
props: {}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
initialValue: []
|
|
210
|
+
}
|
|
211
|
+
}, {
|
|
212
|
+
title: '显示提交按钮',
|
|
213
|
+
name: 'showSubmit',
|
|
214
|
+
setter: {
|
|
215
|
+
componentName: 'BoolSetter',
|
|
216
|
+
initialValue: true
|
|
217
|
+
}
|
|
218
|
+
}, {
|
|
219
|
+
title: '提交按钮文字',
|
|
220
|
+
name: 'submitText',
|
|
221
|
+
setter: {
|
|
222
|
+
componentName: 'StringSetter',
|
|
223
|
+
initialValue: '提交'
|
|
224
|
+
}
|
|
225
|
+
}, {
|
|
226
|
+
title: '提交时校验',
|
|
227
|
+
name: 'submitValidate',
|
|
228
|
+
setter: {
|
|
229
|
+
componentName: 'BoolSetter',
|
|
230
|
+
initialValue: true
|
|
231
|
+
}
|
|
232
|
+
}, {
|
|
233
|
+
title: '提交数据源',
|
|
234
|
+
name: 'submitDataSource',
|
|
235
|
+
setter: {
|
|
236
|
+
componentName: 'SetterFormVariable',
|
|
237
|
+
props: {
|
|
238
|
+
showAttributesPanel: false
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}, {
|
|
242
|
+
title: '显示重置按钮',
|
|
243
|
+
name: 'showReset',
|
|
244
|
+
setter: {
|
|
245
|
+
componentName: 'BoolSetter',
|
|
246
|
+
initialValue: false
|
|
247
|
+
}
|
|
248
|
+
}, {
|
|
249
|
+
title: '重置按钮文字',
|
|
250
|
+
name: 'resetText',
|
|
251
|
+
setter: {
|
|
252
|
+
componentName: 'StringSetter',
|
|
253
|
+
initialValue: '重置'
|
|
254
|
+
}
|
|
255
|
+
}],
|
|
256
|
+
supports: {
|
|
257
|
+
style: true,
|
|
258
|
+
events: [{
|
|
259
|
+
name: 'onSubmit',
|
|
260
|
+
template: "onSubmit(values, errors, field,${extParams}){\n// 提交成功(无校验错误)\nconsole.log('onSubmit', values, errors, field);\n}"
|
|
261
|
+
}, {
|
|
262
|
+
name: 'onSubmitFailed',
|
|
263
|
+
template: "onSubmitFailed(values, errors, field,${extParams}){\n// 提交失败(校验错误)\nconsole.log('onSubmitFailed', values, errors, field);\n}"
|
|
264
|
+
}]
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
var snippets = [{
|
|
269
|
+
title: '自定义表单',
|
|
270
|
+
screenshot: '',
|
|
271
|
+
schema: {
|
|
272
|
+
componentName: 'CustomForm',
|
|
273
|
+
props: {
|
|
274
|
+
columns: 1,
|
|
275
|
+
formItems: [{
|
|
276
|
+
field: 'name',
|
|
277
|
+
label: '姓名',
|
|
278
|
+
required: true,
|
|
279
|
+
componentType: 'Input',
|
|
280
|
+
componentProps: {
|
|
281
|
+
placeholder: '请输入姓名'
|
|
282
|
+
}
|
|
283
|
+
}, {
|
|
284
|
+
field: 'gender',
|
|
285
|
+
label: '性别',
|
|
286
|
+
componentType: 'RadioGroup',
|
|
287
|
+
options: [{
|
|
288
|
+
label: '男',
|
|
289
|
+
value: 'male'
|
|
290
|
+
}, {
|
|
291
|
+
label: '女',
|
|
292
|
+
value: 'female'
|
|
293
|
+
}]
|
|
294
|
+
}],
|
|
295
|
+
showSubmit: true,
|
|
296
|
+
submitText: '提交'
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}];
|
|
300
|
+
export default _extends({}, CustomFormMeta, {
|
|
301
|
+
snippets: snippets
|
|
302
|
+
});
|
package/lowcode_es/meta.js
CHANGED
|
@@ -7,6 +7,7 @@ import CollapseSelectorItemMeta from 'E:/projects/source-code/pupu-lowcode/lowco
|
|
|
7
7
|
import CollapseSelectorMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/collapse-selector/meta';
|
|
8
8
|
import CollapseMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/collapse/meta';
|
|
9
9
|
import CustomDrawerMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/custom-drawer/meta';
|
|
10
|
+
import CustomFormMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/custom-form/meta';
|
|
10
11
|
import CustomRadioGroupItemMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/custom-radio-group-item/meta';
|
|
11
12
|
import CustomRadioGroupMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/custom-radio-group/meta';
|
|
12
13
|
import CustomSelectMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/custom-select/meta';
|
|
@@ -116,7 +117,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
|
116
117
|
packageName = '@dckj-npm/dc-material';
|
|
117
118
|
}
|
|
118
119
|
if (version === void 0) {
|
|
119
|
-
version = '0.1.
|
|
120
|
+
version = '0.1.361';
|
|
120
121
|
}
|
|
121
122
|
if (basicLibraryVersion === void 0) {
|
|
122
123
|
basicLibraryVersion = {
|
|
@@ -143,7 +144,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
|
143
144
|
}
|
|
144
145
|
return meta;
|
|
145
146
|
}
|
|
146
|
-
var componentMetas = [AccordionSelectorMeta, AddressListMeta, BreadCrumbMeta, Button2Meta, CollapseSelectorItemMeta, CollapseSelectorMeta, CollapseMeta, CustomDrawerMeta, CustomRadioGroupItemMeta, CustomRadioGroupMeta, CustomSelectMeta, DCSliderMeta, DrawerMeta, FormMeta, GoodsCardListCommonMeta, GoodsCardListMeta, GridNavMeta, ImageMeta, InputMeta, IntegralTaskMeta, ItemMeta, MemberCardMeta, MenuListMeta, MessageListMeta, NavigationMeta, NoticeBarMeta, PositionMeta, ProfileMeta, RatingMeta, ReviewListMeta, RichTextMeta, SearchBarMeta, SearchHistoryListMeta, ShoppingCartMeta, StreamListMeta, SwiperMeta, SwitchMeta, TabContainerItemMeta, TabContainerMeta, TabMessageMeta, TagCMeta, TeletextListMeta, TextDescriptionDetailListMeta, Title1Meta, Title2Meta, UserCardMeta];
|
|
147
|
+
var componentMetas = [AccordionSelectorMeta, AddressListMeta, BreadCrumbMeta, Button2Meta, CollapseSelectorItemMeta, CollapseSelectorMeta, CollapseMeta, CustomDrawerMeta, CustomFormMeta, CustomRadioGroupItemMeta, CustomRadioGroupMeta, CustomSelectMeta, DCSliderMeta, DrawerMeta, FormMeta, GoodsCardListCommonMeta, GoodsCardListMeta, GridNavMeta, ImageMeta, InputMeta, IntegralTaskMeta, ItemMeta, MemberCardMeta, MenuListMeta, MessageListMeta, NavigationMeta, NoticeBarMeta, PositionMeta, ProfileMeta, RatingMeta, ReviewListMeta, RichTextMeta, SearchBarMeta, SearchHistoryListMeta, ShoppingCartMeta, StreamListMeta, SwiperMeta, SwitchMeta, TabContainerItemMeta, TabContainerMeta, TabMessageMeta, TagCMeta, TeletextListMeta, TextDescriptionDetailListMeta, Title1Meta, Title2Meta, UserCardMeta];
|
|
147
148
|
var components = [];
|
|
148
149
|
var npmInfo = {};
|
|
149
150
|
componentMetas.forEach(function (meta) {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IPublicTypeSnippet } from '@alilc/lowcode-types';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
snippets: IPublicTypeSnippet[];
|
|
4
|
+
componentName: string;
|
|
5
|
+
uri?: string;
|
|
6
|
+
title?: import("@alilc/lowcode-types").IPublicTypeTitleContent;
|
|
7
|
+
icon?: import("@alilc/lowcode-types").IPublicTypeIconType;
|
|
8
|
+
tags?: string[];
|
|
9
|
+
description?: string;
|
|
10
|
+
docUrl?: string;
|
|
11
|
+
screenshot?: string;
|
|
12
|
+
devMode?: "proCode" | "lowCode";
|
|
13
|
+
npm?: import("@alilc/lowcode-types").IPublicTypeNpmInfo;
|
|
14
|
+
props?: import("@alilc/lowcode-types").IPublicTypePropConfig[];
|
|
15
|
+
configure?: import("@alilc/lowcode-types").IPublicTypeFieldConfig[] | import("@alilc/lowcode-types").IPublicTypeConfigure;
|
|
16
|
+
experimental?: import("@alilc/lowcode-types").IPublicTypeAdvanced;
|
|
17
|
+
schema?: import("@alilc/lowcode-types").IPublicTypeComponentSchema;
|
|
18
|
+
group?: string | import("@alilc/lowcode-types").IPublicTypeI18nData;
|
|
19
|
+
category?: string | import("@alilc/lowcode-types").IPublicTypeI18nData;
|
|
20
|
+
priority?: number;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports["default"] = void 0;
|
|
6
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
|
+
var CustomFormMeta = {
|
|
8
|
+
group: '低代码组件',
|
|
9
|
+
componentName: 'CustomForm',
|
|
10
|
+
title: '自定义表单',
|
|
11
|
+
docUrl: '',
|
|
12
|
+
screenshot: '',
|
|
13
|
+
devMode: 'proCode',
|
|
14
|
+
category: '信息输入',
|
|
15
|
+
npm: {
|
|
16
|
+
"package": '@dckj-npm/dc-material',
|
|
17
|
+
version: '0.1.359',
|
|
18
|
+
exportName: 'CustomForm',
|
|
19
|
+
main: 'src/index.tsx',
|
|
20
|
+
destructuring: true,
|
|
21
|
+
subName: ''
|
|
22
|
+
},
|
|
23
|
+
configure: {
|
|
24
|
+
component: {
|
|
25
|
+
isContainer: true
|
|
26
|
+
},
|
|
27
|
+
props: [{
|
|
28
|
+
title: '列数',
|
|
29
|
+
name: 'columns',
|
|
30
|
+
setter: {
|
|
31
|
+
componentName: 'RadioGroupSetter',
|
|
32
|
+
props: {
|
|
33
|
+
dataSource: [{
|
|
34
|
+
label: '一列',
|
|
35
|
+
value: 1
|
|
36
|
+
}, {
|
|
37
|
+
label: '二列',
|
|
38
|
+
value: 2
|
|
39
|
+
}, {
|
|
40
|
+
label: '三列',
|
|
41
|
+
value: 3
|
|
42
|
+
}, {
|
|
43
|
+
label: '四列',
|
|
44
|
+
value: 4
|
|
45
|
+
}],
|
|
46
|
+
options: [{
|
|
47
|
+
label: '一列',
|
|
48
|
+
value: 1
|
|
49
|
+
}, {
|
|
50
|
+
label: '二列',
|
|
51
|
+
value: 2
|
|
52
|
+
}, {
|
|
53
|
+
label: '三列',
|
|
54
|
+
value: 3
|
|
55
|
+
}, {
|
|
56
|
+
label: '四列',
|
|
57
|
+
value: 4
|
|
58
|
+
}]
|
|
59
|
+
},
|
|
60
|
+
initialValue: 1
|
|
61
|
+
}
|
|
62
|
+
}, {
|
|
63
|
+
title: '间距',
|
|
64
|
+
name: 'spacing',
|
|
65
|
+
setter: {
|
|
66
|
+
componentName: 'JsonSetter',
|
|
67
|
+
isRequired: false,
|
|
68
|
+
initialValue: [0, 16, 16, 0]
|
|
69
|
+
}
|
|
70
|
+
}, {
|
|
71
|
+
title: '空态文案',
|
|
72
|
+
name: 'emptyContent',
|
|
73
|
+
setter: {
|
|
74
|
+
componentName: 'StringSetter',
|
|
75
|
+
isRequired: false,
|
|
76
|
+
initialValue: '添加表单项'
|
|
77
|
+
}
|
|
78
|
+
}, {
|
|
79
|
+
title: '表单项',
|
|
80
|
+
name: 'formItems',
|
|
81
|
+
setter: {
|
|
82
|
+
componentName: 'ArraySetter',
|
|
83
|
+
props: {
|
|
84
|
+
itemSetter: {
|
|
85
|
+
componentName: 'ObjectSetter',
|
|
86
|
+
props: {
|
|
87
|
+
config: {
|
|
88
|
+
items: [{
|
|
89
|
+
title: '字段名',
|
|
90
|
+
name: 'field',
|
|
91
|
+
setter: {
|
|
92
|
+
componentName: 'StringSetter',
|
|
93
|
+
isRequired: true,
|
|
94
|
+
initialValue: ''
|
|
95
|
+
}
|
|
96
|
+
}, {
|
|
97
|
+
title: '标题',
|
|
98
|
+
name: 'label',
|
|
99
|
+
setter: {
|
|
100
|
+
componentName: 'StringSetter',
|
|
101
|
+
isRequired: false,
|
|
102
|
+
initialValue: ''
|
|
103
|
+
}
|
|
104
|
+
}, {
|
|
105
|
+
title: '必填',
|
|
106
|
+
name: 'required',
|
|
107
|
+
setter: {
|
|
108
|
+
componentName: 'BoolSetter',
|
|
109
|
+
isRequired: false,
|
|
110
|
+
initialValue: false
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
title: '组件类型',
|
|
114
|
+
name: 'componentType',
|
|
115
|
+
setter: {
|
|
116
|
+
componentName: 'SelectSetter',
|
|
117
|
+
props: {
|
|
118
|
+
options: [{
|
|
119
|
+
label: '输入框',
|
|
120
|
+
value: 'Input'
|
|
121
|
+
}, {
|
|
122
|
+
label: '多行文本',
|
|
123
|
+
value: 'TextArea'
|
|
124
|
+
}, {
|
|
125
|
+
label: '下拉选择',
|
|
126
|
+
value: 'Select'
|
|
127
|
+
}, {
|
|
128
|
+
label: '单选组',
|
|
129
|
+
value: 'RadioGroup'
|
|
130
|
+
}, {
|
|
131
|
+
label: '复选组',
|
|
132
|
+
value: 'CheckboxGroup'
|
|
133
|
+
}, {
|
|
134
|
+
label: '数字输入',
|
|
135
|
+
value: 'NumberPicker'
|
|
136
|
+
}, {
|
|
137
|
+
label: '日期选择',
|
|
138
|
+
value: 'DatePicker'
|
|
139
|
+
}, {
|
|
140
|
+
label: '上传',
|
|
141
|
+
value: 'Upload'
|
|
142
|
+
}]
|
|
143
|
+
},
|
|
144
|
+
initialValue: 'Input'
|
|
145
|
+
}
|
|
146
|
+
}, {
|
|
147
|
+
title: '选项',
|
|
148
|
+
name: 'options',
|
|
149
|
+
setter: {
|
|
150
|
+
componentName: 'ArraySetter',
|
|
151
|
+
props: {
|
|
152
|
+
itemSetter: {
|
|
153
|
+
componentName: 'ObjectSetter',
|
|
154
|
+
props: {
|
|
155
|
+
config: {
|
|
156
|
+
items: [{
|
|
157
|
+
title: '名称',
|
|
158
|
+
name: 'label',
|
|
159
|
+
setter: {
|
|
160
|
+
componentName: 'StringSetter',
|
|
161
|
+
isRequired: true,
|
|
162
|
+
initialValue: ''
|
|
163
|
+
}
|
|
164
|
+
}, {
|
|
165
|
+
title: '值',
|
|
166
|
+
name: 'value',
|
|
167
|
+
setter: {
|
|
168
|
+
componentName: 'StringSetter',
|
|
169
|
+
isRequired: true,
|
|
170
|
+
initialValue: ''
|
|
171
|
+
}
|
|
172
|
+
}]
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
initialValue: []
|
|
178
|
+
}
|
|
179
|
+
}, {
|
|
180
|
+
title: '列跨度',
|
|
181
|
+
name: 'columnSpan',
|
|
182
|
+
setter: {
|
|
183
|
+
componentName: 'NumberSetter',
|
|
184
|
+
props: {
|
|
185
|
+
min: 1,
|
|
186
|
+
max: 4
|
|
187
|
+
},
|
|
188
|
+
initialValue: 1
|
|
189
|
+
}
|
|
190
|
+
}, {
|
|
191
|
+
title: '组件属性',
|
|
192
|
+
name: 'componentProps',
|
|
193
|
+
setter: {
|
|
194
|
+
componentName: 'JsonSetter',
|
|
195
|
+
isRequired: false
|
|
196
|
+
}
|
|
197
|
+
}, {
|
|
198
|
+
title: '表单项属性',
|
|
199
|
+
name: 'formItemProps',
|
|
200
|
+
setter: {
|
|
201
|
+
componentName: 'JsonSetter',
|
|
202
|
+
isRequired: false
|
|
203
|
+
}
|
|
204
|
+
}],
|
|
205
|
+
extraSetter: {
|
|
206
|
+
componentName: 'MixedSetter',
|
|
207
|
+
isRequired: false,
|
|
208
|
+
props: {}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
initialValue: []
|
|
215
|
+
}
|
|
216
|
+
}, {
|
|
217
|
+
title: '显示提交按钮',
|
|
218
|
+
name: 'showSubmit',
|
|
219
|
+
setter: {
|
|
220
|
+
componentName: 'BoolSetter',
|
|
221
|
+
initialValue: true
|
|
222
|
+
}
|
|
223
|
+
}, {
|
|
224
|
+
title: '提交按钮文字',
|
|
225
|
+
name: 'submitText',
|
|
226
|
+
setter: {
|
|
227
|
+
componentName: 'StringSetter',
|
|
228
|
+
initialValue: '提交'
|
|
229
|
+
}
|
|
230
|
+
}, {
|
|
231
|
+
title: '提交时校验',
|
|
232
|
+
name: 'submitValidate',
|
|
233
|
+
setter: {
|
|
234
|
+
componentName: 'BoolSetter',
|
|
235
|
+
initialValue: true
|
|
236
|
+
}
|
|
237
|
+
}, {
|
|
238
|
+
title: '提交数据源',
|
|
239
|
+
name: 'submitDataSource',
|
|
240
|
+
setter: {
|
|
241
|
+
componentName: 'SetterFormVariable',
|
|
242
|
+
props: {
|
|
243
|
+
showAttributesPanel: false
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}, {
|
|
247
|
+
title: '显示重置按钮',
|
|
248
|
+
name: 'showReset',
|
|
249
|
+
setter: {
|
|
250
|
+
componentName: 'BoolSetter',
|
|
251
|
+
initialValue: false
|
|
252
|
+
}
|
|
253
|
+
}, {
|
|
254
|
+
title: '重置按钮文字',
|
|
255
|
+
name: 'resetText',
|
|
256
|
+
setter: {
|
|
257
|
+
componentName: 'StringSetter',
|
|
258
|
+
initialValue: '重置'
|
|
259
|
+
}
|
|
260
|
+
}],
|
|
261
|
+
supports: {
|
|
262
|
+
style: true,
|
|
263
|
+
events: [{
|
|
264
|
+
name: 'onSubmit',
|
|
265
|
+
template: "onSubmit(values, errors, field,${extParams}){\n// 提交成功(无校验错误)\nconsole.log('onSubmit', values, errors, field);\n}"
|
|
266
|
+
}, {
|
|
267
|
+
name: 'onSubmitFailed',
|
|
268
|
+
template: "onSubmitFailed(values, errors, field,${extParams}){\n// 提交失败(校验错误)\nconsole.log('onSubmitFailed', values, errors, field);\n}"
|
|
269
|
+
}]
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
var snippets = [{
|
|
274
|
+
title: '自定义表单',
|
|
275
|
+
screenshot: '',
|
|
276
|
+
schema: {
|
|
277
|
+
componentName: 'CustomForm',
|
|
278
|
+
props: {
|
|
279
|
+
columns: 1,
|
|
280
|
+
formItems: [{
|
|
281
|
+
field: 'name',
|
|
282
|
+
label: '姓名',
|
|
283
|
+
required: true,
|
|
284
|
+
componentType: 'Input',
|
|
285
|
+
componentProps: {
|
|
286
|
+
placeholder: '请输入姓名'
|
|
287
|
+
}
|
|
288
|
+
}, {
|
|
289
|
+
field: 'gender',
|
|
290
|
+
label: '性别',
|
|
291
|
+
componentType: 'RadioGroup',
|
|
292
|
+
options: [{
|
|
293
|
+
label: '男',
|
|
294
|
+
value: 'male'
|
|
295
|
+
}, {
|
|
296
|
+
label: '女',
|
|
297
|
+
value: 'female'
|
|
298
|
+
}]
|
|
299
|
+
}],
|
|
300
|
+
showSubmit: true,
|
|
301
|
+
submitText: '提交'
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}];
|
|
305
|
+
var _default = exports["default"] = (0, _extends2["default"])({}, CustomFormMeta, {
|
|
306
|
+
snippets: snippets
|
|
307
|
+
});
|