tianheng-ui 0.0.80 → 0.0.81

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.
@@ -61,109 +61,143 @@ const toolsConfig = {
61
61
  export const toolsItemConfig = (key, data) => {
62
62
  const config = toolsConfig[key] || {};
63
63
  config.name = data.name;
64
- return { ...config };
64
+ return JSON.parse(JSON.stringify(config));
65
65
  };
66
66
 
67
67
  const formConfig = {
68
68
  "1": {
69
69
  list: [
70
70
  {
71
- name: "栅格布局",
72
- type: "grid",
73
- icon: "icon-grid-",
74
- columns: [
71
+ name: "平台名称",
72
+ type: "input",
73
+ icon: "icon-input",
74
+ options: {
75
+ width: "100%",
76
+ labelWidth: 100,
77
+ isLabelWidth: false,
78
+ defaultValue: "",
79
+ dataType: "string",
80
+ pattern: "",
81
+ placeholder: "",
82
+ maxlength: -1,
83
+ required: true,
84
+ disabled: false,
85
+ readonly: false,
86
+ clearable: false,
87
+ showWordLimit: false,
88
+ showPassword: false,
89
+ prefixIcon: "",
90
+ suffixIcon: "",
91
+ prepend: "",
92
+ append: "",
93
+ hidden: false,
94
+ hideLabel: false
95
+ },
96
+ events: {
97
+ onChange: "",
98
+ onFocus: "",
99
+ onBlur: ""
100
+ },
101
+ rules: [
75
102
  {
76
- span: 12,
77
- list: [
78
- {
79
- name: "分类名称",
80
- type: "input",
81
- icon: "icon-input",
82
- options: {
83
- width: "100%",
84
- labelWidth: 100,
85
- isLabelWidth: false,
86
- defaultValue: "",
87
- dataType: "string",
88
- pattern: "",
89
- placeholder: "",
90
- maxlength: -1,
91
- required: true,
92
- disabled: false,
93
- readonly: false,
94
- clearable: false,
95
- showWordLimit: false,
96
- showPassword: false,
97
- prefixIcon: "",
98
- suffixIcon: "",
99
- prepend: "",
100
- append: "",
101
- hidden: false,
102
- hideLabel: false
103
- },
104
- events: {
105
- onChange: "",
106
- onFocus: "",
107
- onBlur: ""
108
- },
109
- rules: [
110
- {
111
- type: "string",
112
- message: "分类名称格式不正确"
113
- },
114
- {
115
- required: true,
116
- message: "分类名称必须填写"
117
- }
118
- ],
119
- key: "1669798313000_73831",
120
- model: "name"
121
- }
122
- ]
103
+ type: "string",
104
+ message: "平台名称格式不正确"
123
105
  },
124
106
  {
125
- span: 12,
126
- list: [
127
- {
128
- name: "排序",
129
- type: "number",
130
- icon: "icon-number",
131
- options: {
132
- width: "100%",
133
- labelWidth: 100,
134
- isLabelWidth: false,
135
- required: false,
136
- defaultValue: 0,
137
- min: 0,
138
- max: 999,
139
- step: 1,
140
- disabled: false,
141
- controlsPosition: true,
142
- precision: 0,
143
- hidden: false,
144
- hideLabel: false
145
- },
146
- events: {
147
- onChange: "",
148
- onFocus: "",
149
- onBlur: ""
150
- },
151
- key: "1669798320000_2131",
152
- model: "sort",
153
- rules: []
154
- }
155
- ]
107
+ required: true,
108
+ message: "平台名称必须填写"
156
109
  }
157
110
  ],
111
+ key: "1669859814000_5209",
112
+ model: "name"
113
+ },
114
+ {
115
+ name: "平台分类",
116
+ type: "select",
117
+ icon: "icon-select",
158
118
  options: {
159
- gutter: 0,
160
- justify: "start",
161
- align: "top",
162
- hideLabel: true
119
+ width: "100%",
120
+ labelWidth: 100,
121
+ isLabelWidth: false,
122
+ defaultValue: "",
123
+ multiple: false,
124
+ disabled: false,
125
+ clearable: false,
126
+ placeholder: "",
127
+ required: false,
128
+ showLabel: false,
129
+ collapseTags: false,
130
+ allowCreate: false,
131
+ options: [
132
+ {
133
+ value: "Option 1"
134
+ },
135
+ {
136
+ value: "Option 2"
137
+ },
138
+ {
139
+ value: "Option 3"
140
+ }
141
+ ],
142
+ remote: true,
143
+ filterable: false,
144
+ remoteOptions: [],
145
+ props: {
146
+ value: "id",
147
+ label: "name"
148
+ },
149
+ remoteFunc: "getUserList",
150
+ hidden: false,
151
+ hideLabel: false
152
+ },
153
+ events: {
154
+ onChange: "",
155
+ onFocus: "",
156
+ onBlur: ""
163
157
  },
164
- key: "1669798312000_50523",
165
- model: "grid_1669798312000_50523",
158
+ key: "1669859824000_68681",
159
+ model: "projectTypeId",
166
160
  rules: []
161
+ },
162
+ {
163
+ name: "访问地址",
164
+ type: "input",
165
+ icon: "icon-input",
166
+ options: {
167
+ width: "100%",
168
+ labelWidth: 100,
169
+ isLabelWidth: false,
170
+ defaultValue: "",
171
+ dataType: "url",
172
+ pattern: "",
173
+ placeholder: "",
174
+ maxlength: -1,
175
+ required: false,
176
+ disabled: false,
177
+ readonly: false,
178
+ clearable: false,
179
+ showWordLimit: false,
180
+ showPassword: false,
181
+ prefixIcon: "",
182
+ suffixIcon: "",
183
+ prepend: "",
184
+ append: "",
185
+ hidden: false,
186
+ hideLabel: false
187
+ },
188
+ events: {
189
+ onChange: "",
190
+ onFocus: "",
191
+ onBlur: ""
192
+ },
193
+ rules: [
194
+ {
195
+ type: "url",
196
+ message: "访问地址格式不正确"
197
+ }
198
+ ],
199
+ key: "1669859816000_814",
200
+ model: "targetUrl"
167
201
  }
168
202
  ],
169
203
  config: {
@@ -194,5 +228,221 @@ const formConfig = {
194
228
 
195
229
  export const formItemConfig = key => {
196
230
  const config = formConfig[key] || {};
197
- return config;
231
+ return JSON.parse(JSON.stringify(config));
232
+ };
233
+
234
+ const tableConfig = {
235
+ "1": {
236
+ search: {
237
+ show: true,
238
+ options: [
239
+ {
240
+ type: "input",
241
+ label: "姓名",
242
+ prop: "name",
243
+ defaultValue: "",
244
+ align: "left",
245
+ width: 0
246
+ }
247
+ // {
248
+ // type: "select",
249
+ // label: "性别",
250
+ // prop: "gender",
251
+ // align: "left",
252
+ // width: 0,
253
+ // staticData: [
254
+ // { label: "男", value: "1" },
255
+ // { label: "女", value: "0" }
256
+ // ]
257
+ // }
258
+ ]
259
+ },
260
+ table: {
261
+ options: [
262
+ {
263
+ label: "平台名称",
264
+ type: "input",
265
+ prop: "name",
266
+ align: "left"
267
+ },
268
+ {
269
+ label: "平台分类",
270
+ type: "select",
271
+ prop: "projectTypeName",
272
+ align: "left",
273
+ width: 0
274
+ },
275
+ {
276
+ label: "访问地址",
277
+ type: "input",
278
+ prop: "targetUrl",
279
+ align: "left",
280
+ width: 0
281
+ },
282
+ {
283
+ label: "编辑人",
284
+ type: "input",
285
+ prop: "user",
286
+ sortable: true,
287
+ align: "left",
288
+ width: 0
289
+ },
290
+ {
291
+ label: "编辑时间",
292
+ type: "input",
293
+ prop: "updateTime",
294
+ align: "left",
295
+ width: 0
296
+ }
297
+ ],
298
+ pageInfo: {
299
+ show: true,
300
+ options: {
301
+ pageCount: 0, // 总页数
302
+ pageSize: 20, // 每页展示的条数
303
+ currentPage: 1, // 当前页码
304
+ total: 0, // 总条数
305
+ sizes: [10, 20, 30, 50, 100]
306
+ }
307
+ },
308
+ sort: { type: "1", key: "createTime" },
309
+ loading: { show: false, text: "加载中", image: "" },
310
+ empty: { show: true, text: "暂无数据", image: "" },
311
+ sequence: true
312
+ },
313
+ tools: {
314
+ add: { show: true, name: "新增", position: 1, form: { id: "1" } },
315
+ edit: { show: true, name: "编辑", position: 2, form: { id: "1" } },
316
+ detail: { show: false, name: "查看", position: 2, form: { id: "1" } },
317
+ delete: { show: true, name: "删除", position: 2 },
318
+ batchDelete: { show: true, name: "批量删除", position: 1 },
319
+ export: { show: true, name: "导出", position: 1 },
320
+ import: { show: true, name: "导入", position: 1 }
321
+ },
322
+ network: {
323
+ mounted: {
324
+ name: "获取列表",
325
+ api: "tenant/project/list",
326
+ method: "post"
327
+ },
328
+ add: {
329
+ name: "新增",
330
+ api: "tenant/project/add",
331
+ method: "post"
332
+ },
333
+ edit: {
334
+ name: "编辑",
335
+ api: "tenant/project/edit",
336
+ method: "post"
337
+ },
338
+ delete: {
339
+ name: "删除",
340
+ api: "tenant/project/delete",
341
+ method: "post"
342
+ },
343
+ key_123456: {
344
+ name: "获取列表",
345
+ url: "https://"
346
+ }
347
+ }
348
+ },
349
+ "2": {
350
+ search: {
351
+ show: false,
352
+ options: []
353
+ },
354
+ table: {
355
+ options: [
356
+ {
357
+ label: "平台名称",
358
+ type: "input",
359
+ prop: "name",
360
+ align: "left"
361
+ },
362
+ {
363
+ label: "平台分类",
364
+ type: "select",
365
+ prop: "projectTypeName",
366
+ align: "left",
367
+ width: 0
368
+ },
369
+ {
370
+ label: "访问地址",
371
+ type: "input",
372
+ prop: "targetUrl",
373
+ align: "left",
374
+ width: 0
375
+ },
376
+ {
377
+ label: "编辑人",
378
+ type: "input",
379
+ prop: "user",
380
+ sortable: true,
381
+ align: "left",
382
+ width: 0
383
+ },
384
+ {
385
+ label: "编辑时间",
386
+ type: "input",
387
+ prop: "updateTime",
388
+ align: "left",
389
+ width: 0
390
+ }
391
+ ],
392
+ pageInfo: {
393
+ show: true,
394
+ options: {
395
+ pageCount: 0, // 总页数
396
+ pageSize: 20, // 每页展示的条数
397
+ currentPage: 1, // 当前页码
398
+ total: 0, // 总条数
399
+ sizes: [10, 20, 30, 50, 100]
400
+ }
401
+ },
402
+ sort: { type: "1", key: "createTime" },
403
+ loading: { show: false, text: "加载中", image: "" },
404
+ empty: { show: true, text: "暂无数据", image: "" },
405
+ sequence: true
406
+ },
407
+ tools: {
408
+ add: { show: true, name: "新增", position: 1, form: { id: "1" } },
409
+ edit: { show: true, name: "编辑", position: 2, form: { id: "1" } },
410
+ detail: { show: false, name: "查看", position: 2, form: { id: "1" } },
411
+ delete: { show: true, name: "删除", position: 2 },
412
+ batchDelete: { show: false, name: "批量删除", position: 1 },
413
+ export: { show: false, name: "导出", position: 1 },
414
+ import: { show: false, name: "导入", position: 1 }
415
+ },
416
+ network: {
417
+ mounted: {
418
+ name: "获取列表",
419
+ api: "tenant/project/list",
420
+ method: "post"
421
+ },
422
+ add: {
423
+ name: "新增",
424
+ api: "tenant/project/add",
425
+ method: "post"
426
+ },
427
+ edit: {
428
+ name: "编辑",
429
+ api: "tenant/project/edit",
430
+ method: "post"
431
+ },
432
+ delete: {
433
+ name: "删除",
434
+ api: "tenant/project/delete",
435
+ method: "post"
436
+ },
437
+ key_123456: {
438
+ name: "获取列表",
439
+ url: "https://"
440
+ }
441
+ }
442
+ }
443
+ };
444
+
445
+ export const tableItemConfig = key => {
446
+ const config = tableConfig[key] || {};
447
+ return JSON.parse(JSON.stringify(config));
198
448
  };