tianheng-ui 0.1.63 → 0.1.65

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. package/lib/theme-chalk/index.scss +1 -1
  2. package/lib/theme-chalk/styles/feature.scss +1 -0
  3. package/lib/tianheng-ui.js +13 -13
  4. package/package.json +1 -1
  5. package/packages/CodeEditor/index.vue +41 -19
  6. package/packages/FormMaking/GenerateForm.vue +67 -71
  7. package/packages/FormMaking/WidgetConfig.vue +1 -1
  8. package/packages/FormMaking/WidgetForm.vue +11 -5
  9. package/packages/FormMaking/WidgetFormItem.vue +11 -4
  10. package/packages/FormMaking/WidgetGuide.vue +0 -0
  11. package/packages/FormMaking/WidgetTools.vue +2 -2
  12. package/packages/FormMaking/custom/config.js +320 -76
  13. package/packages/FormMaking/custom/configs/blank.vue +1 -1
  14. package/packages/FormMaking/custom/configs/button.vue +2 -2
  15. package/packages/FormMaking/custom/configs/cascader.vue +71 -34
  16. package/packages/FormMaking/custom/configs/cell.vue +1 -1
  17. package/packages/FormMaking/custom/configs/checkbox.vue +95 -64
  18. package/packages/FormMaking/custom/configs/color.vue +1 -1
  19. package/packages/FormMaking/custom/configs/date.vue +1 -1
  20. package/packages/FormMaking/custom/configs/descriptions.vue +314 -0
  21. package/packages/FormMaking/custom/configs/divider.vue +1 -1
  22. package/packages/FormMaking/custom/configs/editor.vue +1 -1
  23. package/packages/FormMaking/custom/configs/filler.vue +1 -1
  24. package/packages/FormMaking/custom/configs/grid.vue +33 -22
  25. package/packages/FormMaking/custom/configs/image.vue +1 -1
  26. package/packages/FormMaking/custom/configs/input.vue +1 -1
  27. package/packages/FormMaking/custom/configs/number.vue +1 -1
  28. package/packages/FormMaking/custom/configs/radio.vue +84 -53
  29. package/packages/FormMaking/custom/configs/rate.vue +1 -1
  30. package/packages/FormMaking/custom/configs/select.vue +157 -158
  31. package/packages/FormMaking/custom/configs/slider.vue +1 -1
  32. package/packages/FormMaking/custom/configs/switch.vue +1 -1
  33. package/packages/FormMaking/custom/configs/table.vue +1 -1
  34. package/packages/FormMaking/custom/configs/tableH5.vue +1 -1
  35. package/packages/FormMaking/custom/configs/tabs.vue +1 -1
  36. package/packages/FormMaking/custom/configs/text.vue +1 -1
  37. package/packages/FormMaking/custom/configs/textarea.vue +1 -1
  38. package/packages/FormMaking/custom/configs/time.vue +1 -1
  39. package/packages/FormMaking/custom/configs/upload.vue +1 -1
  40. package/packages/FormMaking/custom/configs/workflow.vue +494 -0
  41. package/packages/FormMaking/custom/index.js +4 -2
  42. package/packages/FormMaking/custom/items/cascader.vue +2 -2
  43. package/packages/FormMaking/custom/items/checkbox.vue +6 -10
  44. package/packages/FormMaking/custom/items/descriptions.vue +75 -0
  45. package/packages/FormMaking/custom/items/grid_dev.vue +2 -2
  46. package/packages/FormMaking/custom/items/list_dev.vue +10 -22
  47. package/packages/FormMaking/custom/items/radio.vue +5 -9
  48. package/packages/FormMaking/custom/items/select.vue +2 -4
  49. package/packages/FormMaking/custom/items/tableH5_dev.vue +9 -18
  50. package/packages/FormMaking/custom/items/table_dev.vue +13 -3
  51. package/packages/FormMaking/custom/items/tabs_dev.vue +3 -2
  52. package/packages/FormMaking/custom/items/workflow.vue +131 -0
  53. package/packages/FormMaking/custom/register.js +15 -1
  54. package/packages/FormMaking/index.vue +61 -27
  55. package/packages/FormMaking/styles/index.scss +156 -478
  56. package/packages/TableMaking/index.vue +4 -1
  57. package/packages/TableMaking/widgetGuide.vue +96 -0
  58. package/packages/TableMaking/widgetTable.vue +0 -7
  59. package/packages/Workflow/index.vue +0 -31
  60. package/packages/FormMaking/GenerateFormItemH5.vue +0 -825
@@ -1,538 +1,216 @@
1
- $primary-color: #409eff;
2
- $primary-background-color: #ecf5ff;
1
+ @import "../../../lib/theme-chalk/styles/variable.scss";
3
2
 
4
3
  .th-formMaking {
5
- height: 100%;
4
+ // 组件拖拽区的操作样式
5
+ .widget-actions {
6
+ .actions {
7
+ position: absolute;
8
+ right: -2px;
9
+ bottom: -2px;
10
+ display: flex;
11
+ z-index: 9;
12
+
13
+ > div {
14
+ display: inline-block;
15
+ width: 20px;
16
+ height: 20px;
17
+ line-height: 20px;
18
+ text-align: center;
19
+ background: $color-parimary-active;
20
+ }
21
+ i {
22
+ font-size: 12px;
23
+ color: #fff;
24
+ cursor: pointer;
25
+ }
26
+ }
6
27
 
7
- *,
8
- :after,
9
- :before {
10
- -webkit-box-sizing: border-box;
11
- -moz-box-sizing: border-box;
12
- box-sizing: border-box;
13
- }
28
+ .drag {
29
+ position: absolute;
30
+ left: -2px;
31
+ bottom: -2px;
32
+ width: 20px;
33
+ height: 20px;
34
+ line-height: 20px;
35
+ text-align: center;
36
+ background: $color-parimary-active;
37
+ z-index: 9;
38
+
39
+ i {
40
+ font-size: 14px;
41
+ color: #fff;
42
+ cursor: move;
43
+ }
44
+ }
14
45
 
15
- h1,
16
- h2,
17
- h3,
18
- h4,
19
- h5,
20
- h6 {
21
- margin: 0;
22
- padding: 0;
46
+ &.widget-actions-col {
47
+ .clone {
48
+ background: $color-warning-active !important;
49
+ }
50
+ .trash {
51
+ background: $color-warning-active !important;
52
+ }
53
+ .drag {
54
+ background: $color-warning-active !important;
55
+ }
56
+ }
23
57
  }
24
58
 
25
- .isHideFormLabel {
26
- .el-form-item__label {
59
+ // draggable 拖拽时的占位样式
60
+ .draggable-ghost {
61
+ padding: 0px;
62
+ height: 52px;
63
+ font-size: 0;
64
+ background-color: $color-danger-hover;
65
+ box-sizing: border-box;
66
+ overflow: hidden;
67
+ content: "";
68
+ // 隐藏内容
69
+ a {
27
70
  display: none;
28
71
  }
29
- .el-form-item__content {
30
- margin-left: 0 !important;
31
- }
32
72
  }
33
73
 
34
- .widget-form-container {
35
- .draggable {
36
- height: 100%;
37
- }
38
- .draggable-list {
39
- min-height: 100%;
40
- background: #fff;
41
- border: 1px dashed #999;
42
-
43
- .widget-form-list-item {
44
- position: relative;
45
- }
74
+ // draggable 拖拽列表样式
75
+ .draggable-list {
76
+ min-height: 52px;
77
+ background-color: #fff;
78
+ // border: 1px dashed rgba(170, 170, 170, 0.7);
79
+ }
46
80
 
47
- .widget-col-list {
48
- min-height: 50px;
49
- border: 1px dashed #ccc;
50
- background: #fff;
81
+ .widgetForm {
82
+ .isHideFormLabel {
83
+ .el-form-item__label {
84
+ display: none;
51
85
  }
52
- .widget-table-list {
53
- display: -webkit-box;
54
- min-height: 50px;
55
- border: 1px dashed #ccc;
56
- background: #fff;
57
- white-space: nowrap;
58
- overflow-x: scroll;
59
-
60
- // 修改table组件中form label样式
61
- .el-form-item__label {
62
- float: none;
63
- }
64
- .el-form-item__content {
65
- margin-left: 0 !important;
66
- }
86
+ .el-form-item__content {
87
+ margin-left: 0 !important;
67
88
  }
68
- // .widget-table-list:hover::-webkit-scrollbar-thumb {
69
- // background-color: rgba(69, 90, 100, 0.2);
70
- // }
71
-
72
- // .tableH5 {
73
- // min-height: 50px;
74
- // border: 1px dashed #ccc;
75
- // background: #fff;
76
- // white-space: nowrap;
77
- // overflow-x: scroll;
78
-
79
- // .tableH5-item:nth-child(1) {
80
- // display: flex;
81
-
82
- // .actions {
83
- // align-items: center;
84
- // justify-content: right;
85
- // }
86
- // }
87
- // .tableH5-item-widget {
88
- // width: calc(100% - 5px);
89
- // }
90
- // }
91
-
92
- .widgetFormItem {
93
- min-width: 100px;
94
- padding-bottom: 18px;
95
- position: relative;
96
- border: 1px dashed rgba(170, 170, 170, 0.7);
97
- background-color: rgba(236, 245, 255, 0.3);
98
- margin: 2px;
99
-
100
- .el-form-item__content {
101
- position: unset;
102
- }
103
-
104
- &.isRequired {
105
- .el-form-item__label::before {
106
- content: "*";
107
- color: #f56c6c;
108
- margin-right: 4px;
109
- }
110
- }
111
-
112
- &:hover {
113
- background: $primary-background-color;
114
- outline: 1px solid $primary-color;
115
- outline-offset: 0px;
89
+ }
116
90
 
117
- &.active {
118
- outline: 2px solid $primary-color;
119
- border: 1px solid $primary-color;
120
- outline-offset: 0;
121
- }
122
- }
91
+ .widgetFormItem {
92
+ margin: 2px;
93
+ padding-bottom: 18px;
94
+ min-width: 120px;
95
+ position: relative;
96
+ background-color: rgba($color-parimary-lighter, 0.3);
97
+ border: 1px dashed rgba(170, 170, 170, 0.7);
123
98
 
124
- &.active {
125
- outline: 2px solid $primary-color;
126
- border: 1px solid $primary-color;
127
- }
99
+ // 解决复制、删除、移动按钮的位置问题
100
+ .el-form-item__content {
101
+ position: unset;
102
+ }
128
103
 
129
- &.ghost {
130
- background: #f56c6c;
131
- border: 2px solid #f56c6c;
132
- outline-width: 0;
133
- height: 3px;
134
- box-sizing: border-box;
135
- font-size: 0;
136
- content: "";
137
- overflow: hidden;
138
- padding: 0;
139
- }
104
+ &.isActive {
105
+ outline: 2px solid $color-parimary-active;
106
+ border: 1px solid $color-parimary-active;
140
107
  }
141
108
 
142
- .isLayout {
109
+ &.isLayout {
143
110
  padding-bottom: 0;
144
111
  padding: 5px;
145
112
  margin-left: 2px !important;
146
113
  margin-right: 2px !important;
147
- background-color: rgba(253, 246, 236, 0.3);
114
+ background-color: rgba($color-warning-lighter, 0.3);
148
115
 
149
- &.active {
150
- outline: 2px solid #e6a23c !important;
151
- border: 1px solid #e6a23c !important;
116
+ &.isActive {
117
+ outline: 2px solid $color-warning-active !important;
118
+ border: 1px solid $color-warning-active !important;
152
119
  }
153
120
 
154
121
  &:hover {
155
- background: #fdf6ec;
156
- outline: 1px solid #e6a23c;
122
+ background-color: $color-warning-lighter;
123
+ outline: 1px solid $color-warning-active;
157
124
  outline-offset: 0px;
158
-
159
- &.active {
160
- outline: 2px solid #e6a23c;
161
- border: 1px solid #e6a23c;
162
- outline-offset: 0;
163
- }
164
- }
165
-
166
- &.ghost {
167
- background: #f56c6c;
168
- border: 2px solid #f56c6c;
169
- outline-width: 0;
170
- height: 3px;
171
- box-sizing: border-box;
172
- font-size: 0;
173
- content: "";
174
- overflow: hidden;
175
- padding: 0;
176
- }
177
-
178
- &::after {
179
- display: none;
180
125
  }
181
126
  }
182
127
 
183
- // .widget-table {
184
- // padding-bottom: 0;
185
- // padding: 5px;
186
- // background-color: rgba(253, 246, 236, 0.3);
187
-
188
- // .widget-table-wrapper {
189
- // min-height: 50px;
190
- // background: #fff;
191
- // display: flex;
192
- // justify-content: flex-start;
193
-
194
- // .widget-table-row {
195
- // td {
196
- // border-bottom: 0;
197
- // }
198
- // }
199
-
200
- // .widget-table-left {
201
- // width: 51px;
202
- // border-left: 1px solid #ebeef5;
203
- // border-right: 1px solid #ebeef5;
204
- // border-top: 1px solid #ebeef5;
205
- // flex: none;
206
- // }
207
-
208
- // .widget-table-view {
209
- // border: 1px solid #ebeef5;
210
- // width: 200px;
211
- // float: left;
212
- // height: 100%;
213
- // position: relative;
214
- // display: block;
215
-
216
- // .el-table {
217
- // height: 100%;
218
- // }
219
-
220
- // &.is_req {
221
- // .el-form-item__label::before {
222
- // content: "*";
223
- // color: #f56c6c;
224
- // margin-right: 4px;
225
- // }
226
- // }
227
-
228
- // &::after {
229
- // position: absolute;
230
- // left: 0;
231
- // right: 0;
232
- // top: 0;
233
- // bottom: 0;
234
- // display: block;
235
- // content: "";
236
- // }
237
-
238
- // &::before {
239
- // display: none;
240
- // }
241
-
242
- // &:hover {
243
- // background: $primary-background-color;
244
- // outline: 1px solid $primary-color;
245
- // outline-offset: -1px;
246
-
247
- // &.active {
248
- // // outline: 1px solid $primary-color;
249
- // border: 1px solid $primary-color;
250
- // outline: 1px solid $primary-color;
251
- // outline-offset: -1px;
252
- // }
253
-
254
- // .widget-view-drag {
255
- // display: block;
256
- // }
257
- // }
258
-
259
- // &.active {
260
- // outline: 1px solid $primary-color;
261
- // border: 1px solid $primary-color;
262
- // outline-offset: -1px;
263
- // }
128
+ &:hover {
129
+ background-color: $color-parimary-lighter;
130
+ outline: 1px solid $color-parimary-active;
131
+ outline-offset: 0px;
264
132
 
265
- // &.ghost {
266
- // background: #f56c6c;
267
- // outline-width: 0;
268
- // width: 5px !important;
269
- // box-sizing: border-box;
270
- // font-size: 0;
271
- // content: "";
272
- // overflow: hidden;
273
- // padding: 0;
274
- // position: relative;
275
- // outline: none !important;
276
- // border: 0 !important;
277
-
278
- // &::after {
279
- // background: #f56c6c;
280
- // position: absolute;
281
- // top: 0;
282
- // left: 0;
283
- // bottom: 0;
284
- // right: 0;
285
- // z-index: 9999;
286
- // content: "";
287
- // outline: none;
288
- // }
289
- // }
290
- // }
291
-
292
- // .widget-table-content {
293
- // width: 100%;
294
- // // border: 1px dashed #ccc;
295
- // outline: 1px dashed #ccc;
296
- // background: #fff;
297
- // flex: 1;
298
- // margin: 0 1px;
299
- // overflow: auto;
300
-
301
- // & > div {
302
- // height: 100%;
303
- // }
304
-
305
- // .widget-table-col {
306
- // height: 100%;
307
-
308
- // .ghost {
309
- // background: #f56c6c;
310
- // // border: 2px solid #F56C6C;
311
- // position: relative;
312
- // content: "";
313
- // float: left;
314
- // height: 100%;
315
- // width: 5px !important;
316
- // list-style: none;
317
- // font-size: 0;
318
- // overflow: hidden;
319
- // outline: none;
320
-
321
- // &::after {
322
- // background: #f56c6c;
323
- // position: absolute;
324
- // top: 0;
325
- // left: 0;
326
- // bottom: 0;
327
- // right: 0;
328
- // z-index: 9999;
329
- // content: "";
330
- // outline: none;
331
- // }
332
- // }
333
- // }
334
- // }
335
- // }
336
-
337
- // &.active {
338
- // outline: 2px solid #e6a23c;
339
- // border: 1px solid #e6a23c;
340
- // }
341
-
342
- // &:hover {
343
- // background: #fdf6ec;
344
- // outline: 1px solid #e6a23c;
345
- // outline-offset: 0px;
346
-
347
- // &.active {
348
- // outline: 2px solid #e6a23c;
349
- // border: 1px solid #e6a23c;
350
- // outline-offset: 0;
351
- // }
352
- // }
353
-
354
- // .widget-view-action.widget-col-action {
355
- // background: #e6a23c;
356
- // }
357
-
358
- // .widget-view-drag.widget-col-drag {
359
- // background: #e6a23c;
360
- // }
361
-
362
- // &::after {
363
- // display: none;
364
- // }
365
-
366
- // &.ghost {
367
- // background: #f56c6c;
368
- // outline-width: 0;
369
- // height: 5px;
370
- // box-sizing: border-box;
371
- // font-size: 0;
372
- // content: "";
373
- // overflow: hidden;
374
- // padding: 0;
375
- // position: relative;
376
- // outline: none;
377
- // border: 0;
378
-
379
- // &::after {
380
- // background: #f56c6c;
381
- // position: absolute;
382
- // top: 0;
383
- // left: 0;
384
- // right: 0;
385
- // bottom: 0;
386
- // content: "";
387
- // display: block;
388
- // z-index: 999;
389
- // }
390
- // }
391
- // }
392
-
393
- .ghost {
394
- background: #f56c6c;
395
- border: 2px solid #f56c6c;
396
- outline-width: 0;
397
- height: 3px;
398
- box-sizing: border-box;
399
- font-size: 0;
400
- content: "";
401
- overflow: hidden;
402
- padding: 0;
403
- }
404
-
405
- .widget-form-list-image {
406
- padding-bottom: 0px !important;
133
+ &.isActive {
134
+ outline: 2px solid $color-parimary-active;
135
+ border: 1px solid $color-parimary-active;
136
+ outline-offset: 0;
137
+ }
407
138
  }
408
139
  }
140
+ }
409
141
 
410
- // draggable 样式
411
- .ghost {
412
- background: #f56c6c;
413
- border: 2px solid #f56c6c;
414
- position: relative;
142
+ // 组件config配置视图样式
143
+ .component-config {
144
+ .config-header {
145
+ display: flex;
146
+ align-items: center;
147
+ justify-content: space-between;
415
148
 
416
- &::after {
417
- background: #f56c6c;
149
+ .title {
418
150
  }
419
- }
420
151
 
421
- li.ghost {
422
- height: 5px;
423
- list-style: none;
424
- font-size: 0;
425
- overflow: hidden;
152
+ .value {
153
+ color: var(--th-blue);
154
+ cursor: pointer;
155
+ }
426
156
  }
427
- }
428
-
429
- .widget-divider {
430
- display: flex;
431
- align-items: center;
432
- }
433
- }
434
157
 
435
- .configComponents {
436
- .config-header {
437
- display: flex;
438
- align-items: center;
439
- justify-content: space-between;
158
+ .eventsCollapse {
159
+ border: 1px solid #ebeef5;
160
+ border-bottom-color: #e1e1e1;
440
161
 
441
- .title {
442
- }
162
+ &-item {
163
+ display: flex;
164
+ align-items: center;
443
165
 
444
- .value {
445
- color: var(--th-blue);
446
- cursor: pointer;
447
- }
448
- }
449
-
450
- .eventsCollapse {
451
- border: 1px solid #ebeef5;
452
- border-bottom-color: #e1e1e1;
166
+ .el-select {
167
+ flex: 1;
168
+ margin-right: 5px;
169
+ }
453
170
 
454
- &-item {
455
- display: flex;
456
- align-items: center;
171
+ > i {
172
+ padding: 5px;
173
+ cursor: pointer;
174
+ }
175
+ }
457
176
 
458
- .el-select {
459
- flex: 1;
460
- margin-right: 5px;
177
+ .el-collapse-item__header {
178
+ padding: 5px;
179
+ height: 30px;
180
+ line-height: 30px;
181
+ font-size: 12px;
182
+ background: #f5f7fa;
461
183
  }
462
184
 
463
- > i {
185
+ .el-collapse-item__content {
464
186
  padding: 5px;
465
- cursor: pointer;
466
187
  }
467
188
  }
468
189
 
469
- .el-collapse-item__header {
470
- padding: 5px;
471
- height: 30px;
472
- line-height: 30px;
473
- font-size: 12px;
474
- background: #f5f7fa;
190
+ .el-form-item__label {
191
+ width: 100%;
475
192
  }
476
193
 
477
- .el-collapse-item__content {
478
- padding: 5px;
194
+ .flexView {
195
+ display: flex;
196
+ margin-bottom: 5px;
479
197
  }
480
198
  }
481
-
482
- .el-form-item__label {
483
- width: 100%;
484
- }
485
-
486
- .flexView {
487
- display: flex;
488
- margin-bottom: 5px;
489
- }
490
199
  }
491
200
 
492
- .widget-actions {
493
- .actions {
494
- position: absolute;
495
- right: 0;
496
- bottom: 0;
497
- height: 28px;
498
- line-height: 28px;
499
- background: $primary-color;
500
- z-index: 9;
501
-
502
- i {
503
- font-size: 14px;
504
- color: #fff;
505
- margin: 0 5px;
506
- cursor: pointer;
507
- }
201
+ // 组件内联样式
202
+ .component-table {
203
+ .el-form-item__label {
204
+ float: none !important;
508
205
  }
509
-
510
- .drag {
511
- position: absolute;
512
- left: -2px;
513
- bottom: -2px;
514
- // bottom: -18px;
515
- height: 28px;
516
- line-height: 28px;
517
- background: $primary-color;
518
- z-index: 9;
519
- // display: none;
520
-
521
- i {
522
- font-size: 14px;
523
- color: #fff;
524
- margin: 0 5px;
525
- cursor: move;
526
- }
206
+ .el-form-item__content {
207
+ margin-left: 0 !important;
527
208
  }
528
209
  }
529
210
 
530
- .widget-actions-col {
531
- .actions {
532
- background: #e6a23c;
533
- }
534
-
535
- .drag {
536
- background: #e6a23c;
537
- }
211
+ // 组件头部标题统一样式
212
+ .component-header_title {
213
+ margin-bottom: 5px;
214
+ font-size: 16px;
215
+ font-weight: bold;
538
216
  }