tianheng-ui 0.0.44 → 0.0.45
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/lib/03250ed25fc1b305e9980cf7cf0dfb09.js +1 -0
- package/lib/c755e7fc08446566ee8dd3a8aa8fe43f.js +1715 -0
- package/lib/index.js +1 -1
- package/lib/tianheng-ui.js +26 -16
- package/package.json +65 -59
- package/packages/formMaking/Container.vue +15 -2
- package/packages/formMaking/FormConfig.vue +12 -3
- package/packages/formMaking/GenerateFormItem.vue +516 -266
- package/packages/formMaking/WidgetConfig.vue +1361 -760
- package/packages/formMaking/WidgetForm.vue +2 -2
- package/packages/formMaking/WidgetFormItem.vue +466 -284
- package/packages/formMaking/componentsConfig.js +402 -332
@@ -1,332 +1,402 @@
|
|
1
|
-
export const basicComponents = [
|
2
|
-
{
|
3
|
-
name: "单行文本",
|
4
|
-
type: "input",
|
5
|
-
icon: "icon-input",
|
6
|
-
options: {
|
7
|
-
width: "100%",
|
8
|
-
defaultValue: "",
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
defaultValue:
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
required: false,
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
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
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
1
|
+
export const basicComponents = [
|
2
|
+
{
|
3
|
+
name: "单行文本",
|
4
|
+
type: "input",
|
5
|
+
icon: "icon-input",
|
6
|
+
options: {
|
7
|
+
width: "100%",
|
8
|
+
defaultValue: "",
|
9
|
+
dataType: "string",
|
10
|
+
pattern: "",
|
11
|
+
placeholder: "",
|
12
|
+
maxlength: -1, //字符长度
|
13
|
+
required: false, //必填
|
14
|
+
disabled: false, //禁用
|
15
|
+
readonly: false, //只读
|
16
|
+
clearable: false, //清除
|
17
|
+
showWordLimit: false, //字数统计
|
18
|
+
showPassword: false, //切换密码
|
19
|
+
prefixIcon: "", //头部图标
|
20
|
+
suffixIcon: "", //尾部图标
|
21
|
+
prepend: "", //前置插槽
|
22
|
+
append: "" //后置插槽
|
23
|
+
}
|
24
|
+
},
|
25
|
+
{
|
26
|
+
name: "多行文本",
|
27
|
+
type: "textarea",
|
28
|
+
icon: "icon-diy-com-textarea",
|
29
|
+
options: {
|
30
|
+
width: "100%",
|
31
|
+
defaultValue: "",
|
32
|
+
pattern: "",
|
33
|
+
placeholder: "",
|
34
|
+
maxlength: -1,
|
35
|
+
rows: 2,
|
36
|
+
required: false, //必填
|
37
|
+
disabled: false, //禁用
|
38
|
+
readonly: false, //只读
|
39
|
+
clearable: false, //清除
|
40
|
+
showWordLimit: false,
|
41
|
+
prefixIcon: "",
|
42
|
+
suffixIcon: "",
|
43
|
+
minRows: 2, //最小行数
|
44
|
+
maxRows: 5 //最大行数
|
45
|
+
}
|
46
|
+
},
|
47
|
+
{
|
48
|
+
name: "计数器",
|
49
|
+
type: "number",
|
50
|
+
icon: "icon-number",
|
51
|
+
options: {
|
52
|
+
width: "40%",
|
53
|
+
required: false,
|
54
|
+
defaultValue: 0,
|
55
|
+
min: 1,
|
56
|
+
max: 2,
|
57
|
+
step: 1,
|
58
|
+
disabled: false,
|
59
|
+
controlsPosition: false,
|
60
|
+
step: 1, //递增递减步数
|
61
|
+
precision: 1 //精度
|
62
|
+
}
|
63
|
+
},
|
64
|
+
{
|
65
|
+
name: "单选框组",
|
66
|
+
type: "radio",
|
67
|
+
icon: "icon-radio-active",
|
68
|
+
options: {
|
69
|
+
inline: false,
|
70
|
+
defaultValue: "",
|
71
|
+
showLabel: false,
|
72
|
+
options: [
|
73
|
+
{
|
74
|
+
value: "Option 1",
|
75
|
+
label: "Option 1"
|
76
|
+
},
|
77
|
+
{
|
78
|
+
value: "Option 2",
|
79
|
+
label: "Option 2"
|
80
|
+
},
|
81
|
+
{
|
82
|
+
value: "Option 3",
|
83
|
+
label: "Option 3"
|
84
|
+
}
|
85
|
+
],
|
86
|
+
required: false,
|
87
|
+
width: "",
|
88
|
+
remote: false,
|
89
|
+
remoteOptions: [],
|
90
|
+
props: {
|
91
|
+
value: "value",
|
92
|
+
label: "label"
|
93
|
+
},
|
94
|
+
remoteFunc: "",
|
95
|
+
disabled: false,
|
96
|
+
border: false, //边框
|
97
|
+
buttonType: false //替换成按钮
|
98
|
+
}
|
99
|
+
},
|
100
|
+
{
|
101
|
+
name: "多选框组",
|
102
|
+
type: "checkbox",
|
103
|
+
icon: "icon-check-box",
|
104
|
+
options: {
|
105
|
+
inline: false,
|
106
|
+
defaultValue: [],
|
107
|
+
showLabel: false,
|
108
|
+
options: [
|
109
|
+
{
|
110
|
+
value: "Option 1"
|
111
|
+
},
|
112
|
+
{
|
113
|
+
value: "Option 2"
|
114
|
+
},
|
115
|
+
{
|
116
|
+
value: "Option 3"
|
117
|
+
}
|
118
|
+
],
|
119
|
+
required: false,
|
120
|
+
width: "",
|
121
|
+
remote: false,
|
122
|
+
remoteOptions: [],
|
123
|
+
props: {
|
124
|
+
value: "value",
|
125
|
+
label: "label"
|
126
|
+
},
|
127
|
+
remoteFunc: "",
|
128
|
+
disabled: false,
|
129
|
+
border: false, //边框
|
130
|
+
buttonType: false, //替换成按钮
|
131
|
+
min: 0,
|
132
|
+
max: 0
|
133
|
+
}
|
134
|
+
},
|
135
|
+
{
|
136
|
+
name: "时间选择器",
|
137
|
+
type: "time",
|
138
|
+
icon: "icon-time",
|
139
|
+
options: {
|
140
|
+
defaultValue: "21:19:56",
|
141
|
+
readonly: false,
|
142
|
+
disabled: false,
|
143
|
+
editable: true,
|
144
|
+
clearable: true,
|
145
|
+
placeholder: "",
|
146
|
+
startPlaceholder: "",
|
147
|
+
endPlaceholder: "",
|
148
|
+
isRange: false,
|
149
|
+
arrowControl: true,
|
150
|
+
format: "HH:mm:ss",
|
151
|
+
required: false,
|
152
|
+
width: "",
|
153
|
+
timeType: true, //任意时间范围,时间点
|
154
|
+
selectRange: false, //时间点情况下的时间范围
|
155
|
+
selectStartTime: "", //时间点情况下的开始的时间
|
156
|
+
selectEndTime: "", //时间点情况下的结束的时间
|
157
|
+
stretTimePickerOptions: {
|
158
|
+
start: "08:30",
|
159
|
+
step: "00:15",
|
160
|
+
end: "18:30"
|
161
|
+
},
|
162
|
+
endTimePickerOptions: {
|
163
|
+
start: "08:30",
|
164
|
+
step: "00:15",
|
165
|
+
end: "18:30",
|
166
|
+
minTime: "08:30"
|
167
|
+
}
|
168
|
+
}
|
169
|
+
},
|
170
|
+
{
|
171
|
+
name: "日期选择器",
|
172
|
+
type: "date",
|
173
|
+
icon: "icon-date",
|
174
|
+
options: {
|
175
|
+
defaultValue: "",
|
176
|
+
readonly: false,
|
177
|
+
disabled: false,
|
178
|
+
editable: true,
|
179
|
+
clearable: true,
|
180
|
+
placeholder: "",
|
181
|
+
startPlaceholder: "",
|
182
|
+
endPlaceholder: "",
|
183
|
+
type: "date",
|
184
|
+
format: "yyyy-MM-dd",
|
185
|
+
timestamp: false,
|
186
|
+
required: false,
|
187
|
+
width: ""
|
188
|
+
}
|
189
|
+
},
|
190
|
+
{
|
191
|
+
name: "评分",
|
192
|
+
type: "rate",
|
193
|
+
icon: "icon-pingfen1",
|
194
|
+
options: {
|
195
|
+
defaultValue: null,
|
196
|
+
max: 5,
|
197
|
+
disabled: false,
|
198
|
+
allowHalf: false,
|
199
|
+
required: false,
|
200
|
+
showText: false,
|
201
|
+
auxiliaryValue: ["极差", "失望", "一般", "满意", "惊喜"] //辅助文字
|
202
|
+
}
|
203
|
+
},
|
204
|
+
{
|
205
|
+
name: "颜色选择器",
|
206
|
+
type: "color",
|
207
|
+
icon: "icon-color",
|
208
|
+
options: {
|
209
|
+
defaultValue: "",
|
210
|
+
disabled: false,
|
211
|
+
showAlpha: false,
|
212
|
+
required: false
|
213
|
+
}
|
214
|
+
},
|
215
|
+
{
|
216
|
+
name: "下拉选择框",
|
217
|
+
type: "select",
|
218
|
+
icon: "icon-select",
|
219
|
+
options: {
|
220
|
+
defaultValue: "",
|
221
|
+
multiple: false,
|
222
|
+
disabled: false,
|
223
|
+
clearable: false,
|
224
|
+
placeholder: "",
|
225
|
+
required: false,
|
226
|
+
showLabel: false,
|
227
|
+
collapseTags: false,
|
228
|
+
allowCreate: false,
|
229
|
+
width: "",
|
230
|
+
options: [
|
231
|
+
{
|
232
|
+
value: "Option 1"
|
233
|
+
},
|
234
|
+
{
|
235
|
+
value: "Option 2"
|
236
|
+
},
|
237
|
+
{
|
238
|
+
value: "Option 3"
|
239
|
+
}
|
240
|
+
],
|
241
|
+
remote: false,
|
242
|
+
filterable: false,
|
243
|
+
remoteOptions: [],
|
244
|
+
props: {
|
245
|
+
value: "value",
|
246
|
+
label: "label"
|
247
|
+
},
|
248
|
+
remoteFunc: ""
|
249
|
+
}
|
250
|
+
},
|
251
|
+
{
|
252
|
+
name: "开关",
|
253
|
+
type: "switch",
|
254
|
+
icon: "icon-switch",
|
255
|
+
options: {
|
256
|
+
defaultValue: false,
|
257
|
+
required: false,
|
258
|
+
disabled: false,
|
259
|
+
switchInactiveText: "",
|
260
|
+
switchActiveText: "",
|
261
|
+
switchInactiveColor: "",
|
262
|
+
switchActiveColor: ""
|
263
|
+
}
|
264
|
+
},
|
265
|
+
{
|
266
|
+
name: "滑块",
|
267
|
+
type: "slider",
|
268
|
+
icon: "icon-slider",
|
269
|
+
options: {
|
270
|
+
defaultValue: 0,
|
271
|
+
disabled: false,
|
272
|
+
required: false,
|
273
|
+
min: 0,
|
274
|
+
max: 100,
|
275
|
+
step: 1,
|
276
|
+
showInput: false,
|
277
|
+
range: false,
|
278
|
+
vertical: false,
|
279
|
+
width: "",
|
280
|
+
height: "",
|
281
|
+
showTooltip: true,
|
282
|
+
formatTooltip: 1, //格式化
|
283
|
+
showStops: false //间断点
|
284
|
+
}
|
285
|
+
},
|
286
|
+
{
|
287
|
+
name: "文字",
|
288
|
+
type: "text",
|
289
|
+
icon: "icon-wenzishezhi-",
|
290
|
+
options: {
|
291
|
+
defaultValue: "This is a text",
|
292
|
+
customClass: ""
|
293
|
+
}
|
294
|
+
}
|
295
|
+
];
|
296
|
+
|
297
|
+
export const advanceComponents = [
|
298
|
+
{
|
299
|
+
name: "自定义区域",
|
300
|
+
type: "blank",
|
301
|
+
icon: "icon-zidingyishuju",
|
302
|
+
options: {
|
303
|
+
defaultType: "String"
|
304
|
+
}
|
305
|
+
},
|
306
|
+
{
|
307
|
+
name: "图片",
|
308
|
+
type: "imgupload",
|
309
|
+
icon: "icon-tupian",
|
310
|
+
options: {
|
311
|
+
defaultValue: [],
|
312
|
+
size: {
|
313
|
+
width: 100,
|
314
|
+
height: 100
|
315
|
+
},
|
316
|
+
width: "",
|
317
|
+
tokenFunc: "funcGetToken",
|
318
|
+
token: "",
|
319
|
+
domain: "https://tcdn.form.making.link/",
|
320
|
+
disabled: false,
|
321
|
+
length: 8,
|
322
|
+
multiple: false,
|
323
|
+
autoUpload: false,
|
324
|
+
isQiniu: false,
|
325
|
+
//isDelete: false,
|
326
|
+
min: 0,
|
327
|
+
//isEdit: false,
|
328
|
+
remoteFunc: "https://jsonplaceholder.typicode.com/posts/",
|
329
|
+
remoteApi: {},
|
330
|
+
disabled: false,
|
331
|
+
required: false,
|
332
|
+
multiple: false,
|
333
|
+
elUploadTip: "",
|
334
|
+
listType: "default", //展示方式
|
335
|
+
drag: false //拖拽上传
|
336
|
+
}
|
337
|
+
},
|
338
|
+
{
|
339
|
+
name: "编辑器",
|
340
|
+
type: "editor",
|
341
|
+
icon: "icon-fuwenbenkuang",
|
342
|
+
options: {
|
343
|
+
defaultValue: "",
|
344
|
+
width: "",
|
345
|
+
height: "",
|
346
|
+
disabled: false,
|
347
|
+
required: false
|
348
|
+
}
|
349
|
+
},
|
350
|
+
{
|
351
|
+
name: "级联选择器",
|
352
|
+
type: "cascader",
|
353
|
+
icon: "icon-jilianxuanze",
|
354
|
+
options: {
|
355
|
+
defaultValue: [],
|
356
|
+
width: "",
|
357
|
+
placeholder: "",
|
358
|
+
disabled: false,
|
359
|
+
clearable: false,
|
360
|
+
required: false,
|
361
|
+
remote: true,
|
362
|
+
showAllLevels: false, //只显示最后一级
|
363
|
+
collapseTags: false,
|
364
|
+
filterable: false, //搜索
|
365
|
+
prepend: "",
|
366
|
+
append: "",
|
367
|
+
remoteOptions: [],
|
368
|
+
props: {
|
369
|
+
value: "value",
|
370
|
+
label: "label",
|
371
|
+
children: "children",
|
372
|
+
multiple: false,
|
373
|
+
expandTrigger: "hover",
|
374
|
+
checkStrictly: false //选择任意一级选项
|
375
|
+
},
|
376
|
+
remoteFunc: ""
|
377
|
+
}
|
378
|
+
}
|
379
|
+
];
|
380
|
+
|
381
|
+
export const layoutComponents = [
|
382
|
+
{
|
383
|
+
name: "栅格布局",
|
384
|
+
type: "grid",
|
385
|
+
icon: "icon-grid-",
|
386
|
+
columns: [
|
387
|
+
{
|
388
|
+
span: 12,
|
389
|
+
list: []
|
390
|
+
},
|
391
|
+
{
|
392
|
+
span: 12,
|
393
|
+
list: []
|
394
|
+
}
|
395
|
+
],
|
396
|
+
options: {
|
397
|
+
gutter: 0,
|
398
|
+
justify: "start",
|
399
|
+
align: "top"
|
400
|
+
}
|
401
|
+
}
|
402
|
+
];
|