tianheng-ui 0.0.43 → 0.0.46

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.
@@ -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
- required: false,
10
- dataType: "string",
11
- pattern: "",
12
- placeholder: "",
13
- disabled: false,
14
- maxlength: -1,
15
- showWordLimit: false
16
- }
17
- },
18
- {
19
- name: "多行文本",
20
- type: "textarea",
21
- icon: "icon-diy-com-textarea",
22
- options: {
23
- width: "100%",
24
- defaultValue: "",
25
- required: false,
26
- disabled: false,
27
- pattern: "",
28
- placeholder: "",
29
- maxlength: -1,
30
- showWordLimit: false
31
- }
32
- },
33
- {
34
- name: "计数器",
35
- type: "number",
36
- icon: "icon-number",
37
- options: {
38
- width: "",
39
- required: false,
40
- defaultValue: 0,
41
- min: "",
42
- max: "",
43
- step: 1,
44
- disabled: false,
45
- controlsPosition: ""
46
- }
47
- },
48
- {
49
- name: "单选框组",
50
- type: "radio",
51
- icon: "icon-radio-active",
52
- options: {
53
- inline: false,
54
- defaultValue: "",
55
- showLabel: false,
56
- options: [
57
- {
58
- value: "Option 1",
59
- label: "Option 1"
60
- },
61
- {
62
- value: "Option 2",
63
- label: "Option 2"
64
- },
65
- {
66
- value: "Option 3",
67
- label: "Option 3"
68
- }
69
- ],
70
- required: false,
71
- width: "",
72
- remote: false,
73
- remoteOptions: [],
74
- props: {
75
- value: "value",
76
- label: "label"
77
- },
78
- remoteFunc: "",
79
- disabled: false
80
- }
81
- },
82
- {
83
- name: "多选框组",
84
- type: "checkbox",
85
- icon: "icon-check-box",
86
- options: {
87
- inline: false,
88
- defaultValue: [],
89
- showLabel: false,
90
- options: [
91
- {
92
- value: "Option 1"
93
- },
94
- {
95
- value: "Option 2"
96
- },
97
- {
98
- value: "Option 3"
99
- }
100
- ],
101
- required: false,
102
- width: "",
103
- remote: false,
104
- remoteOptions: [],
105
- props: {
106
- value: "value",
107
- label: "label"
108
- },
109
- remoteFunc: "",
110
- disabled: false
111
- }
112
- },
113
- {
114
- name: "时间选择器",
115
- type: "time",
116
- icon: "icon-time",
117
- options: {
118
- defaultValue: "21:19:56",
119
- readonly: false,
120
- disabled: false,
121
- editable: true,
122
- clearable: true,
123
- placeholder: "",
124
- startPlaceholder: "",
125
- endPlaceholder: "",
126
- isRange: false,
127
- arrowControl: true,
128
- format: "HH:mm:ss",
129
- required: false,
130
- width: ""
131
- }
132
- },
133
- {
134
- name: "日期选择器",
135
- type: "date",
136
- icon: "icon-date",
137
- options: {
138
- defaultValue: "",
139
- readonly: false,
140
- disabled: false,
141
- editable: true,
142
- clearable: true,
143
- placeholder: "",
144
- startPlaceholder: "",
145
- endPlaceholder: "",
146
- type: "date",
147
- format: "yyyy-MM-dd",
148
- timestamp: false,
149
- required: false,
150
- width: ""
151
- }
152
- },
153
- {
154
- name: "评分",
155
- type: "rate",
156
- icon: "icon-pingfen1",
157
- options: {
158
- defaultValue: null,
159
- max: 5,
160
- disabled: false,
161
- allowHalf: false,
162
- required: false
163
- }
164
- },
165
- {
166
- name: "颜色选择器",
167
- type: "color",
168
- icon: "icon-color",
169
- options: {
170
- defaultValue: "",
171
- disabled: false,
172
- showAlpha: false,
173
- required: false
174
- }
175
- },
176
- {
177
- name: "下拉选择框",
178
- type: "select",
179
- icon: "icon-select",
180
- options: {
181
- defaultValue: "",
182
- multiple: false,
183
- disabled: false,
184
- clearable: false,
185
- placeholder: "",
186
- required: false,
187
- showLabel: false,
188
- width: "",
189
- options: [
190
- {
191
- value: "Option 1"
192
- },
193
- {
194
- value: "Option 2"
195
- },
196
- {
197
- value: "Option 3"
198
- }
199
- ],
200
- remote: false,
201
- filterable: false,
202
- remoteOptions: [],
203
- props: {
204
- value: "value",
205
- label: "label"
206
- },
207
- remoteFunc: ""
208
- }
209
- },
210
- {
211
- name: "开关",
212
- type: "switch",
213
- icon: "icon-switch",
214
- options: {
215
- defaultValue: false,
216
- required: false,
217
- disabled: false
218
- }
219
- },
220
- {
221
- name: "滑块",
222
- type: "slider",
223
- icon: "icon-slider",
224
- options: {
225
- defaultValue: 0,
226
- disabled: false,
227
- required: false,
228
- min: 0,
229
- max: 100,
230
- step: 1,
231
- showInput: false,
232
- range: false,
233
- width: ""
234
- }
235
- },
236
- {
237
- name: "文字",
238
- type: "text",
239
- icon: "icon-wenzishezhi-",
240
- options: {
241
- defaultValue: "This is a text",
242
- customClass: ""
243
- }
244
- }
245
- ];
246
-
247
- export const advanceComponents = [
248
- {
249
- name: "自定义区域",
250
- type: "blank",
251
- icon: "icon-zidingyishuju",
252
- options: {
253
- defaultType: "String"
254
- }
255
- },
256
- {
257
- name: "图片",
258
- type: "imgupload",
259
- icon: "icon-tupian",
260
- options: {
261
- defaultValue: [],
262
- size: {
263
- width: 100,
264
- height: 100
265
- },
266
- width: "",
267
- tokenFunc: "funcGetToken",
268
- token: "",
269
- domain: "https://tcdn.form.making.link/",
270
- disabled: false,
271
- length: 8,
272
- multiple: false,
273
- isQiniu: false,
274
- isDelete: false,
275
- min: 0,
276
- isEdit: false,
277
- action: "https://tools-server.making.link/api/transfer"
278
- }
279
- },
280
- {
281
- name: "编辑器",
282
- type: "editor",
283
- icon: "icon-fuwenbenkuang",
284
- options: {
285
- defaultValue: "",
286
- width: ""
287
- }
288
- },
289
- {
290
- name: "级联选择器",
291
- type: "cascader",
292
- icon: "icon-jilianxuanze",
293
- options: {
294
- defaultValue: [],
295
- width: "",
296
- placeholder: "",
297
- disabled: false,
298
- clearable: false,
299
- remote: true,
300
- remoteOptions: [],
301
- props: {
302
- value: "value",
303
- label: "label",
304
- children: "children"
305
- },
306
- remoteFunc: ""
307
- }
308
- }
309
- ];
310
-
311
- export const layoutComponents = [
312
- {
313
- name: "栅格布局",
314
- type: "grid",
315
- icon: "icon-grid-",
316
- columns: [
317
- {
318
- span: 12,
319
- list: []
320
- },
321
- {
322
- span: 12,
323
- list: []
324
- }
325
- ],
326
- options: {
327
- gutter: 0,
328
- justify: "start",
329
- align: "top"
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
+ ];