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