rich-core 0.0.1

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.
@@ -0,0 +1,950 @@
1
+ .richform {
2
+ /*******整体布局*********/
3
+ font-size: var(--form-font-size);
4
+ position: relative;
5
+
6
+ .active-design {
7
+ border: 3px solid var(--form-active-design-border-color) !important;
8
+ }
9
+
10
+ .scrollbar {
11
+ min-height: 20px;
12
+ box-sizing: border-box;
13
+ }
14
+
15
+ .richform-border {
16
+ padding: 10px;
17
+ box-sizing: border-box;
18
+ border: 1px solid var(--form-border-color);
19
+ }
20
+
21
+ &.clear-richform {
22
+ min-height: 0px !important;
23
+
24
+ &:deep(.actions) {
25
+ margin: 0 !important;
26
+ padding: 0;
27
+ }
28
+
29
+ .field-wrapper>.field {
30
+ min-height: 0px !important;
31
+ }
32
+
33
+ .inline-no-grid {
34
+ margin: 0;
35
+ }
36
+
37
+ &:deep(.field) {
38
+ margin: 0;
39
+ padding: 0;
40
+ }
41
+ }
42
+
43
+ .ps {
44
+ width: 100%;
45
+ }
46
+
47
+ .no-ready {
48
+ width: 100%;
49
+ height: 100%;
50
+ color: var(--form-primary-color);
51
+ font-size: 15px;
52
+ display: flex;
53
+ justify-content: center;
54
+ align-items: center;
55
+ }
56
+
57
+ &.active-form-design {
58
+ border: 1px solid var(--form-active-design-border-color);
59
+ }
60
+
61
+ // 操作
62
+ .design-draggable,
63
+ .design-delete,
64
+ .design-copy {
65
+ display: inline-block;
66
+ position: absolute;
67
+ width: 22px;
68
+ height: 26px;
69
+ line-height: 26px;
70
+ color: #fff;
71
+ background: #409eff;
72
+ text-align: center;
73
+ cursor: pointer;
74
+ z-index: 99999;
75
+ }
76
+
77
+ .design-draggable {
78
+ left: 0;
79
+ top: 0;
80
+ z-index: 99;
81
+ cursor: move;
82
+ }
83
+
84
+ .design-copy {
85
+ right: 27px;
86
+ bottom: 0;
87
+ z-index: 99;
88
+ }
89
+
90
+ .design-delete {
91
+ right: 0px;
92
+ bottom: 0;
93
+ z-index: 99;
94
+ }
95
+
96
+ .design-field-name {
97
+ right: 1px;
98
+ top: 1px;
99
+ z-index: 99;
100
+ font-size: 10px;
101
+ display: inline-block;
102
+ position: absolute;
103
+ box-sizing: border-box;
104
+ padding: 1px;
105
+ color: #aaa;
106
+ }
107
+
108
+ // 拖拽过程配置
109
+ .design-draggable-ghost {
110
+ border-top: 5px solid #f56c6c;
111
+ }
112
+
113
+ // https://github.com/SortableJS/Vue.Draggable/issues/1008#issuecomment-782545024
114
+ .base-component-item {
115
+ width: 100%;
116
+ display: inline-block;
117
+ text-indent: -9999px;
118
+ }
119
+
120
+ .design-sortable-drag {
121
+ background: #f4dec9;
122
+ }
123
+
124
+ /*******布局*********/
125
+ .layout {
126
+ .active-design {
127
+ border: 3px solid var(--form-active-design-border-color);
128
+ }
129
+
130
+ padding-right: 0;
131
+
132
+ .field-border-top:first-child {
133
+ border-top: 1px solid var(--form-border-color);
134
+ }
135
+ }
136
+
137
+ /*******字段*********/
138
+ .field-wrapper {
139
+ position: relative;
140
+ color: var(--form-font-color);
141
+ box-sizing: border-box;
142
+
143
+ .field-clear-empty {
144
+ padding: 0 !important;
145
+ }
146
+
147
+ .required-field::before {
148
+ content: "*";
149
+ color: #f56c6c;
150
+ margin-right: 0.2em;
151
+ font-family: Verdana, Arial, Tahoma;
152
+ font-weight: 400;
153
+ }
154
+
155
+ // 控制标签和字段是否在一行显示
156
+ >.label-inline {
157
+ display: flex;
158
+ }
159
+
160
+ >.label-no-inline {
161
+ display: flex;
162
+ flex-direction: column;
163
+ justify-content: center;
164
+ }
165
+
166
+ >.inline-no-grid {
167
+ // margin-bottom: 4px;
168
+ }
169
+
170
+ >.field-border {
171
+ border: 1px solid var(--form-border-color);
172
+ border-top: 0;
173
+ }
174
+
175
+ >.field {
176
+ align-items: center;
177
+ position: relative;
178
+ min-height: 48px;
179
+ box-sizing: border-box;
180
+
181
+ >.title-wrapper {
182
+ display: flex;
183
+ align-items: center;
184
+ word-break: break-all;
185
+
186
+ >.label-title {
187
+ margin-left: 5px;
188
+ display: flex;
189
+ align-items: center;
190
+ overflow: hidden;
191
+ color: var(--form-field-title-color);
192
+ }
193
+
194
+ >.field-question {
195
+ color: var(--form-field-question-bgcolor);
196
+ cursor: pointer;
197
+ margin: 0 2px;
198
+ }
199
+ }
200
+
201
+ >.field-value {
202
+ color: var(--form-field-value-color);
203
+ }
204
+
205
+ // 标签右对齐
206
+ .label-right {
207
+ justify-content: flex-end;
208
+ padding-right: 4px;
209
+ box-sizing: border-box;
210
+ }
211
+
212
+ .label-center {
213
+ justify-content: center;
214
+ padding-right: 4px;
215
+ box-sizing: border-box;
216
+ }
217
+
218
+ // 控制标签和字段垂直显示
219
+ >.label-vert {
220
+ justify-content: flex-start;
221
+ padding: 3px 0;
222
+ }
223
+
224
+ >.label-hori {
225
+ // min-height: 40px;
226
+ }
227
+
228
+ // 设计模式,开启遮罩
229
+ >.field-mask {
230
+ width: 100%;
231
+ position: relative;
232
+ }
233
+
234
+ // 设计模式是否开启遮罩,暂时去掉
235
+ >.field-mask::before {
236
+ content: "";
237
+ width: 100%;
238
+ height: 100%;
239
+ position: absolute;
240
+ z-index: 99;
241
+ left: 0;
242
+ top: 0;
243
+ }
244
+
245
+ >.label-right-border {
246
+ width: 1px;
247
+ background: var(--form-border-color);
248
+ }
249
+
250
+ >.field-value {
251
+ display: flex;
252
+ align-items: center;
253
+ box-sizing: border-box;
254
+ padding: 0 3px; // 边框,不能改成margin否则会溢出
255
+ width: 100%;
256
+ position: relative;
257
+
258
+ >.error-message-top {
259
+ position: absolute;
260
+ top: -36px;
261
+ height: 34px;
262
+ line-height: 34px;
263
+ text-align: center;
264
+ z-index: 9999;
265
+ padding: 0 4px;
266
+ background-color: #f56c6c;
267
+ color: #fff;
268
+ border-radius: 5px;
269
+ }
270
+
271
+ >.error-message {
272
+ font-size: 12px;
273
+ height: 13px;
274
+ line-height: 13px;
275
+ color: var(--form-field-error-font-color);
276
+ position: absolute;
277
+ left: 0;
278
+ bottom: -13px;
279
+ z-index: 98;
280
+ }
281
+ }
282
+
283
+ // 当是上下布局时,取消padding-top
284
+ >.field-value-vert {
285
+ padding-top: 1px;
286
+ padding-left: 4px;
287
+ display: flex;
288
+ align-items: flex-start;
289
+ margin-bottom: 4px;
290
+
291
+ >.error-message {
292
+ bottom: -13px;
293
+ }
294
+ }
295
+
296
+ // 去除element自带的margin-bottom
297
+ .el-form-item {
298
+ margin: 0;
299
+ }
300
+ }
301
+ }
302
+
303
+ /*******grid布局*********/
304
+ .grid-layout {
305
+ // margin-top: 2px;
306
+ position: relative;
307
+
308
+ &.grid-layout-border {
309
+ box-sizing: border-box;
310
+ border: 1px solid var(--form-border-color);
311
+ border-top: 0;
312
+ border-right: 0;
313
+ }
314
+
315
+ .grid-title {
316
+ color: var(--form-font-color);
317
+ }
318
+
319
+ .grid-title-border {
320
+ // border-top: 1px solid var(--form-border-color);
321
+ border-right: 1px solid var(--form-border-color);
322
+ }
323
+
324
+ .drag-wrapper {
325
+ top: 0;
326
+ left: 0;
327
+ position: absolute;
328
+ width: 100%;
329
+ height: 100%;
330
+ cursor: pointer;
331
+ box-sizing: border-box;
332
+ }
333
+
334
+ .grid-title {
335
+ padding: 3px;
336
+ }
337
+
338
+ .gird-content {
339
+ display: flex;
340
+ position: relative;
341
+ box-sizing: border-box;
342
+
343
+ .grid-flex {
344
+ display: flex;
345
+ width: 100%;
346
+ height: 100%;
347
+ }
348
+
349
+ .grid-column {
350
+ width: 100%;
351
+ min-height: 62px;
352
+ padding: 6px 0 6px 6px;
353
+ box-sizing: border-box;
354
+ display: flex;
355
+ flex-direction: column;
356
+ }
357
+
358
+ .grid-column-nowrap {
359
+ overflow: hidden;
360
+ }
361
+
362
+ .grid-column-padding {
363
+ padding: 6px;
364
+
365
+ }
366
+
367
+ .grid-column-top {
368
+ border-top: 1px solid var(--form-border-color);
369
+ }
370
+
371
+ .grid-column-border:not(:last-child) {
372
+ border-right: 1px solid var(--form-border-color);
373
+ }
374
+
375
+ .grid-column-border:last-child {
376
+ border-right: 1px solid var(--form-border-color);
377
+ }
378
+ }
379
+ }
380
+
381
+ /*******tab布局*********/
382
+ .tab-wrapper {
383
+ position: relative;
384
+ box-sizing: border-box;
385
+ border: 1px solid var(--form-border-color);
386
+ border-top: 0;
387
+
388
+ >.design-no-tabs {
389
+ width: 100%;
390
+ height: 40px;
391
+ position: absolute;
392
+ z-index: 2;
393
+ }
394
+
395
+ .tab-container {
396
+ min-height: 15px;
397
+ padding: 0 3px 2px 3px;
398
+ }
399
+ }
400
+
401
+ .tab-wrapper-no-border {
402
+ border: 0 !important;
403
+ }
404
+
405
+ /*******collapse布局*********/
406
+ .collapse-wrapper {
407
+ overflow: hidden;
408
+ box-sizing: border-box;
409
+ position: relative;
410
+
411
+ .collapse-title {
412
+ color: var(--form-primary-color);
413
+ font-size: 15px;
414
+ margin-left: 3px;
415
+ }
416
+
417
+ .collapse-container {
418
+ box-sizing: border-box;
419
+ padding: 0 5px;
420
+ }
421
+
422
+ >.design-no-collapse {
423
+ width: 100%;
424
+ height: 50px;
425
+ position: absolute;
426
+ left: 100px;
427
+ }
428
+ }
429
+
430
+ .collapse-wrapper-border {
431
+ border: 1px solid var(--form-border-color);
432
+ border-top: 0;
433
+ border-bottom: 0;
434
+ cursor: pointer;
435
+
436
+ .el-collapse {
437
+ border-top: 0 !important;
438
+ }
439
+ }
440
+
441
+ /*******actions*********/
442
+ .actions {
443
+ margin: 2px 0;
444
+
445
+ .right {
446
+ display: flex;
447
+ justify-content: flex-end;
448
+ }
449
+ }
450
+ }
451
+
452
+ /*******button widget子组件*********/
453
+ .button-widget {
454
+ width: 100%;
455
+ height: 100%;
456
+ }
457
+
458
+ /*******cascader widget子组件*********/
459
+ .el-cascader__tags .el-tag {
460
+ min-width: 55px !important;
461
+ }
462
+
463
+ .cascader-widget {
464
+ width: 100%;
465
+ }
466
+
467
+ /*******date-picker-widget widget子组件*********/
468
+ .date-picker-widget {
469
+ width: 100%;
470
+
471
+ .el-input {
472
+ width: 100% !important;
473
+ }
474
+ }
475
+
476
+ /*******checkbox widget子组件*********/
477
+ .checkbox-widget {
478
+ display: flex;
479
+ width: 100%;
480
+
481
+ .widget-checkAll {
482
+ margin-right: 20px;
483
+ }
484
+ }
485
+
486
+ /*******datetimepicker widget子组件*********/
487
+ .date-picker-widget {
488
+ width: 100%;
489
+
490
+ .el-input {
491
+ width: 100% !important;
492
+ }
493
+ }
494
+
495
+ /*******draggablelist widget子组件*********/
496
+ .draggable-list-widget {
497
+ display: flex;
498
+ flex-direction: column;
499
+ justify-content: flex-start;
500
+ margin: 0;
501
+ padding: 0;
502
+
503
+ .draggable-list-icon,
504
+ .delete-list-icon {
505
+ width: 30px;
506
+ height: 30px;
507
+ line-height: 30px;
508
+ font-size: 25px;
509
+ cursor: pointer;
510
+ }
511
+
512
+ .delete-list-icon {
513
+ color: #fbc5c5;
514
+ }
515
+
516
+ .delete-list-icon:hover {
517
+ color: #f56c6c;
518
+ }
519
+
520
+ .draggable-list-icon {
521
+ color: #c8cbcc;
522
+ cursor: move;
523
+ }
524
+
525
+ .draggable-list-item {
526
+ display: flex;
527
+ align-items: center;
528
+ margin: 5px 0;
529
+
530
+ .list-handel-move {
531
+ color: #556567;
532
+ }
533
+
534
+ .input-draggable {
535
+ min-width: 60px;
536
+ }
537
+
538
+ .column-wrapper {
539
+ margin-right: 3px;
540
+ }
541
+ }
542
+
543
+ .toolbar {
544
+ display: flex;
545
+ align-items: center;
546
+
547
+ .draggable-list-add {
548
+ font-size: 14px;
549
+ color: #1890ff;
550
+ cursor: pointer;
551
+ margin-right: 15px
552
+ }
553
+
554
+ .arrow-icon {
555
+ display: flex;
556
+ align-items: center;
557
+ font-size: 15px;
558
+ cursor: pointer;
559
+ color: #1890ff;
560
+
561
+ &:hover {
562
+ color: #f56c6c;
563
+ }
564
+ }
565
+
566
+ .arrow-icon:first-of-type {
567
+ margin-right: 15px
568
+ }
569
+ }
570
+ }
571
+
572
+ /*******expression widget子组件*********/
573
+ .option-container {
574
+ width: 100%;
575
+ height: 100%;
576
+ display: flex;
577
+ margin-top: 3px;
578
+
579
+ >.option-item {
580
+ min-width: 200px;
581
+ height: 280px;
582
+ margin-right: 3px;
583
+ border: 1px solid #ddd;
584
+
585
+ >.title {
586
+ height: 25px;
587
+ line-height: 25px;
588
+ border-bottom: 1px solid #ddd;
589
+ padding: 0 3px;
590
+ box-sizing: border-box;
591
+ }
592
+
593
+ >.option-list {
594
+ height: 255px;
595
+ overflow-y: auto;
596
+
597
+ >.option {
598
+ height: 20px;
599
+ line-height: 20px;
600
+ padding: 0 3px;
601
+ box-sizing: border-box;
602
+ }
603
+
604
+ >.option:hover {
605
+ background: #bbb;
606
+ color: #fff;
607
+ }
608
+
609
+ >.disabled-option {
610
+ position: relative;
611
+ }
612
+
613
+ >.disabled-option::after {
614
+ content: "";
615
+ background: "#f00";
616
+ z-index: 1000;
617
+ position: absolute;
618
+ left: 0;
619
+ top: 0;
620
+ width: 100%;
621
+ height: 100%;
622
+ cursor: not-allowed;
623
+ }
624
+ }
625
+ }
626
+ }
627
+
628
+ .sure-exp {
629
+ float: right;
630
+ margin-top: 3px;
631
+ }
632
+
633
+ /*******icon widget子组件*********/
634
+ .icon-container {
635
+ display: flex;
636
+ flex-wrap: wrap;
637
+ max-height: 400px;
638
+ overflow: auto;
639
+ border-left: 1px solid #eee;
640
+ border-top: 1px solid #eee;
641
+
642
+ .icon-cell {
643
+ width: 50px;
644
+ height: 50px;
645
+ line-height: 50px;
646
+ text-align: center;
647
+ font-size: 21px;
648
+ border: 1px solid #eee;
649
+ border-left: 0;
650
+ border-top: 0;
651
+ }
652
+
653
+ .active-icon {
654
+ color: #4f9ffe;
655
+ }
656
+
657
+ .icon-cell:last-child {
658
+ border-right: 1px solid #eee;
659
+ }
660
+
661
+ .icon-cell:hover {
662
+ color: #4f9ffe;
663
+ }
664
+ }
665
+
666
+ .sure-icon {
667
+ float: right;
668
+ margin-top: 4px;
669
+ }
670
+
671
+ /*******inputnumber widget子组件*********/
672
+ .inputnumber-widget {
673
+ width: 100%;
674
+ }
675
+
676
+ /*******ipinput widget子组件*********/
677
+ .ipinput-widget {
678
+ width: 100%;
679
+ display: flex;
680
+ height: 36px;
681
+ align-items: center;
682
+ justify-content: center;
683
+ border-radius: 4px;
684
+ line-height: normal;
685
+ border: 1px solid var(--form-border-color);
686
+ box-sizing: border-box;
687
+
688
+ .ip-segment {
689
+ display: inline-block;
690
+ width: 50px;
691
+ height: 26px;
692
+ line-height: normal;
693
+
694
+ input {
695
+ width: 36px;
696
+ height: 26px;
697
+ line-height: normal;
698
+ border: none;
699
+ outline: none;
700
+ text-align: center;
701
+ text-indent: 0px;
702
+ margin: 0px;
703
+ padding: 0px;
704
+ background-color: transparent;
705
+ color: var(--form-font-color);
706
+ }
707
+
708
+ i {
709
+ display: inline-block;
710
+ font-size: 18px;
711
+ }
712
+ }
713
+
714
+ }
715
+
716
+ .layout {
717
+ .field.error {
718
+ input {
719
+ border: 1px solid red;
720
+ background: transparentize(red, 0.8);
721
+ }
722
+ }
723
+ }
724
+
725
+ /*******select widget子组件*********/
726
+ .select-widget-wrapper {
727
+ width: 100%;
728
+ height: 100%;
729
+
730
+ >.select-widget {
731
+ height: 100%;
732
+ width: 100%;
733
+ }
734
+ }
735
+
736
+
737
+ /*******slider widget子组件*********/
738
+ .widget-slider {
739
+ width: 100%;
740
+ padding: 0 8px;
741
+
742
+ >.select-widget {
743
+ width: 100%;
744
+ }
745
+ }
746
+
747
+ /*******slot widget子组件*********/
748
+ .slot-widget {
749
+ width: 100%;
750
+ height: 100%;
751
+ }
752
+
753
+ /*******table widget子组件*********/
754
+ .popover-body {
755
+ height: 500px;
756
+ }
757
+
758
+ .table-widget {
759
+ box-sizing: border-box;
760
+ padding: 1px 0;
761
+ width: 100%;
762
+
763
+ .attr {
764
+ margin-right: 3px;
765
+ }
766
+
767
+ .fixed-popover {
768
+ z-index: 99;
769
+ }
770
+
771
+ .sure-table-popover {
772
+ float: right;
773
+ margin-bottom: 3px;
774
+ }
775
+ }
776
+
777
+ /*******text widget子组件*********/
778
+ .text-widget {
779
+ width: 100%;
780
+
781
+ .text-text {
782
+ width: 100%;
783
+ display: flex;
784
+ color: var(--form-field-value-color);
785
+ }
786
+
787
+ }
788
+
789
+ /*******timepicker widget子组件*********/
790
+ .timepicker-widget {
791
+ width: 100%;
792
+
793
+ .el-date-editor--timerange {
794
+ width: calc(100% - 20px) !important;
795
+ }
796
+
797
+ >.el-time {
798
+ width: 100%;
799
+ }
800
+ }
801
+
802
+ /*******tree widget子组件*********/
803
+ // adjust element css
804
+ .perfect-tree-tool-tip {
805
+ border-radius: 0;
806
+ padding: 2px 4px;
807
+ }
808
+
809
+ .field-row {
810
+ display: flex;
811
+ margin-bottom: 3px;
812
+ align-items: center;
813
+ margin-top: 5px;
814
+
815
+ .field-label {
816
+ width: 60px;
817
+ text-align: right;
818
+ margin-right: 4px;
819
+ }
820
+ }
821
+
822
+ // perfect-tree css
823
+ .perfect-tree-wrapper {
824
+ width: 100%;
825
+ margin: 0 2px;
826
+ // background: #fff;
827
+
828
+ .show-add-template {
829
+ display: flex;
830
+ flex-wrap: wrap;
831
+ width: 100%;
832
+
833
+ .add-template {
834
+ margin-bottom: 2px;
835
+ width: 97px;
836
+ margin-right: 2px;
837
+ }
838
+
839
+ .add-template:last-child {
840
+ margin-right: 0;
841
+ }
842
+ }
843
+
844
+ .perfect-tree-title {
845
+ height: 35px;
846
+ line-height: 35px;
847
+ border-bottom: 1px solid #d6d6d6;
848
+ font-size: 15px;
849
+ }
850
+
851
+ .perfect-tree-node {
852
+ width: 100%;
853
+ display: flex;
854
+ justify-content: space-between;
855
+ align-items: center;
856
+ font-size: 15px;
857
+
858
+ .tools {
859
+ display: flex;
860
+ position: absolute; // 避免抖动
861
+ right: 0;
862
+ z-index: 3;
863
+ background-color: #F5F7FA;
864
+
865
+ .tool-item {
866
+ margin-left: 7px;
867
+ display: none;
868
+ }
869
+ }
870
+
871
+ .node-icon {
872
+ margin-right: 1px;
873
+ }
874
+
875
+ .title {
876
+ padding: 3px 0;
877
+ }
878
+
879
+ .active-node {
880
+ color: #4f9ffe;
881
+ }
882
+ }
883
+
884
+ .perfect-tree-node:hover .tool-item {
885
+ display: block;
886
+ }
887
+ }
888
+
889
+
890
+ /*******treeselect widget子组件*********/
891
+ .tree-select-icon {
892
+ .svg {
893
+ height: 1.2em;
894
+ line-height: 1.2em;
895
+ margin-bottom: -2px;
896
+ }
897
+ }
898
+
899
+ .tree-select-widget {
900
+ width: 100%;
901
+
902
+ .el-select {
903
+ width: 100%;
904
+ }
905
+ }
906
+
907
+ /*******upload widget子组件*********/
908
+ .upload-widget {
909
+ width: 100%;
910
+ overflow: hidden;
911
+
912
+ .upload-type {
913
+ display: flex;
914
+ align-items: center;
915
+ height: 25px;
916
+ margin-bottom: 3px;
917
+ margin-top: 5px;
918
+
919
+ .type-label {
920
+ font-size: 12px;
921
+ }
922
+ }
923
+ }
924
+
925
+ /*******jscodding widget子组件*********/
926
+ .jscodding-widget {
927
+ width: 100%;
928
+ height: 100%;
929
+
930
+ .code-container {
931
+ width: 100%;
932
+ height: 100%;
933
+ max-height: 150px;
934
+ resize: vertical;
935
+ overflow: auto;
936
+
937
+ .cm-editor {
938
+ height: 100%; // 自适应容器高度
939
+ }
940
+
941
+ .cm-gutter,
942
+ .cm-contnet {
943
+ min-height: 45px;
944
+ }
945
+ }
946
+
947
+ .sure-btn {
948
+ margin-top: 1px;
949
+ }
950
+ }