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