n20-common-lib 1.3.36 → 1.3.37

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "1.3.36",
3
+ "version": "1.3.37",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -38,7 +38,6 @@
38
38
  /* 临时引入 */
39
39
  @import '../../components/ChildRange/style.scss';
40
40
  @import '../../components/PageHeader/style.scss';
41
- @import '../../components/Search/style.scss';
42
41
  .table-header-popover.el-popover {
43
42
  padding: 16px;
44
43
  }
@@ -30,7 +30,6 @@ $--input-max: 304px;
30
30
 
31
31
  @media only screen and (max-width: $--l) {
32
32
  @for $i from 0 through 24 {
33
-
34
33
  .el-form-item[span-l='#{$i}'],
35
34
  .el-form-item[span-lg='#{$i}'] {
36
35
  width: (1 / 24 * $i * 100) * 1%;
@@ -114,11 +113,11 @@ $--input-max: 304px;
114
113
  }
115
114
 
116
115
  .w-224 {
117
- width: $--input-width !important;
116
+ width: $--input-width !important;
118
117
  }
119
118
 
120
119
  .input-w {
121
- width: $--input-width !important;
120
+ width: $--input-width !important;
122
121
  }
123
122
 
124
123
  .el-form.label-width-6em {
@@ -560,7 +559,6 @@ $--input-max: 304px;
560
559
  }
561
560
  }
562
561
 
563
-
564
562
  .el-range__close-icon {
565
563
  position: absolute;
566
564
  height: 100%;
@@ -588,7 +586,6 @@ $--input-max: 304px;
588
586
  &::placeholder {
589
587
  text-align: center;
590
588
  }
591
-
592
589
  }
593
590
 
594
591
  .el-range-editor:not(.has-value) .el-range-separator {
@@ -631,7 +628,6 @@ $--input-max: 304px;
631
628
  }
632
629
 
633
630
  .el-input-number {
634
-
635
631
  .el-input__inner {
636
632
  text-align: left;
637
633
 
@@ -649,8 +645,6 @@ $--input-max: 304px;
649
645
  }
650
646
  }
651
647
 
652
-
653
-
654
648
  .el-textarea__inner {
655
649
  &::placeholder {
656
650
  font-size: 14px;
@@ -703,9 +697,29 @@ $--input-max: 304px;
703
697
  }
704
698
 
705
699
  .el-input__inner:not([disabled]):hover {
706
- border-color: $--color-primary !important;
700
+ border-color: $--color-primary !important;
707
701
  }
708
702
 
709
703
  .el-icon-zoom-in:hover {
710
704
  color: $--color-primary;
711
- }
705
+ }
706
+
707
+ /* 脱离form-item校验 */
708
+ .rule-key__is-error {
709
+ position: relative;
710
+ .el-input__inner,
711
+ .el-input__inner:focus,
712
+ .el-textarea__inner,
713
+ .el-textarea__inner:focus {
714
+ border-color: $--color-danger;
715
+ }
716
+ }
717
+ .rule-key__error_msg {
718
+ color: $--color-danger;
719
+ font-size: 12px;
720
+ line-height: 1;
721
+ padding-top: 4px;
722
+ position: absolute;
723
+ top: 100%;
724
+ left: 0;
725
+ }
@@ -11,17 +11,21 @@ $--input-width: 224px !default;
11
11
  html {
12
12
  height: 100%;
13
13
  }
14
+
14
15
  body {
15
16
  height: 100%;
16
17
  font-size: $--font-size-base;
17
18
  }
19
+
18
20
  li {
19
21
  list-style: none;
20
22
  }
23
+
21
24
  a {
22
25
  color: inherit;
23
26
  text-decoration: none;
24
27
  }
28
+
25
29
  iframe {
26
30
  border: 0;
27
31
  outline: none;
@@ -125,13 +129,16 @@ iframe {
125
129
  .m-l-auto {
126
130
  margin-left: auto !important;
127
131
  }
132
+
128
133
  .m-r-auto {
129
134
  margin-right: auto !important;
130
135
  }
136
+
131
137
  .m-lr-auto {
132
138
  margin-left: auto !important;
133
139
  margin-right: auto !important;
134
140
  }
141
+
135
142
  @include set-pm('', 12px !important);
136
143
  @include set-pm('-xl', 32px !important);
137
144
  @include set-pm('-lg', 24px !important);
@@ -147,45 +154,58 @@ iframe {
147
154
  .pa-#{$n} {
148
155
  padding: #{$n}px;
149
156
  }
157
+
150
158
  .pt-#{$n} {
151
159
  padding-top: #{$n}px;
152
160
  }
161
+
153
162
  .pl-#{$n} {
154
163
  padding-left: #{$n}px;
155
164
  }
165
+
156
166
  .pr-#{$n} {
157
167
  padding-right: #{$n}px;
158
168
  }
169
+
159
170
  .pb-#{$n} {
160
171
  padding-bottom: #{$n}px;
161
172
  }
173
+
162
174
  .px-#{$n} {
163
175
  padding-left: #{$n}px;
164
176
  padding-right: #{$n}px;
165
177
  }
178
+
166
179
  .py-#{$n} {
167
180
  padding-top: #{$n}px;
168
181
  padding-bottom: #{$n}px;
169
182
  }
183
+
170
184
  .ma-#{$n} {
171
185
  margin: #{$n}px;
172
186
  }
187
+
173
188
  .mt-#{$n} {
174
189
  margin-top: #{$n}px;
175
190
  }
191
+
176
192
  .ml-#{$n} {
177
193
  margin-left: #{$n}px;
178
194
  }
195
+
179
196
  .mr-#{$n} {
180
197
  margin-right: #{$n}px;
181
198
  }
199
+
182
200
  .mb-#{$n} {
183
201
  margin-bottom: #{$n}px;
184
202
  }
203
+
185
204
  .mx-#{$n} {
186
205
  margin-left: #{$n}px;
187
206
  margin-right: #{$n}px;
188
207
  }
208
+
189
209
  .py-#{$n} {
190
210
  margin-top: #{$n}px;
191
211
  margin-bottom: #{$n}px;
@@ -221,6 +241,7 @@ iframe {
221
241
  .overflow-y {
222
242
  overflow-y: auto;
223
243
  }
244
+
224
245
  .overflow-x {
225
246
  overflow-x: auto;
226
247
  }
@@ -233,10 +254,12 @@ iframe {
233
254
  clear: both;
234
255
  }
235
256
  }
257
+
236
258
  /* 清除左侧浮动,将元素放置在任何先前的左浮动元素的下方 */
237
259
  .clear-left {
238
260
  clear: left;
239
261
  }
262
+
240
263
  /* 清除右侧浮动,将元素放置在任何先前的右浮动元素的下方 */
241
264
  .clear-right {
242
265
  clear: right;
@@ -246,7 +269,8 @@ iframe {
246
269
  --------------- */
247
270
  .b-center {
248
271
  text-align: center;
249
- & > * {
272
+
273
+ &>* {
250
274
  display: inline-block;
251
275
  vertical-align: bottom;
252
276
  }
@@ -254,11 +278,13 @@ iframe {
254
278
 
255
279
  .b-vertical {
256
280
  font-size: 0;
257
- & > * {
281
+
282
+ &>* {
258
283
  vertical-align: middle;
259
284
  display: inline-block;
260
285
  font-size: 14px;
261
286
  }
287
+
262
288
  &:before {
263
289
  content: '';
264
290
  vertical-align: middle;
@@ -274,16 +300,20 @@ iframe {
274
300
  &-c {
275
301
  text-align: center !important;
276
302
  }
303
+
277
304
  &-l {
278
305
  text-align: left !important;
279
306
  }
307
+
280
308
  &-r {
281
309
  text-align: right !important;
282
310
  }
311
+
283
312
  &-lr {
284
313
  text-align: justify;
285
314
  text-justify: inter-word;
286
315
  }
316
+
287
317
  &-ellipsis {
288
318
  white-space: nowrap;
289
319
  overflow: hidden;
@@ -296,13 +326,14 @@ iframe {
296
326
  .flex-box {
297
327
  display: flex;
298
328
  }
329
+
299
330
  .flex-column {
300
331
  display: flex;
301
332
  flex-direction: column;
302
333
  }
303
334
 
304
- .flex-box > *,
305
- .flex-column > * {
335
+ .flex-box>*,
336
+ .flex-column>* {
306
337
  flex: none;
307
338
  }
308
339
 
@@ -310,24 +341,31 @@ iframe {
310
341
  &-v {
311
342
  align-items: center;
312
343
  }
344
+
313
345
  &-s {
314
346
  align-items: flex-start;
315
347
  }
348
+
316
349
  &-e {
317
350
  align-items: flex-end;
318
351
  }
352
+
319
353
  &-l {
320
354
  justify-content: flex-start;
321
355
  }
356
+
322
357
  &-r {
323
358
  justify-content: flex-end;
324
359
  }
360
+
325
361
  &-c {
326
362
  justify-content: center;
327
363
  }
364
+
328
365
  &-lr {
329
366
  justify-content: space-between;
330
367
  }
368
+
331
369
  &-sa {
332
370
  justify-content: space-around;
333
371
  }
@@ -363,13 +401,16 @@ iframe {
363
401
  .box-shadow {
364
402
  box-shadow: 0px 4px 16px 0px rgba($--color-black, 0.1);
365
403
  }
404
+
366
405
  .box-shadow-mini {
367
406
  box-shadow: 0px 2px 8px 0px rgba($--color-black, 0.08);
368
407
  }
408
+
369
409
  .page-footer-shadow {
370
410
  position: relative;
371
411
  height: 38px;
372
412
  margin-bottom: -12px;
413
+
373
414
  &::before {
374
415
  content: '';
375
416
  pointer-events: none;
@@ -386,6 +427,31 @@ iframe {
386
427
  position: relative;
387
428
  height: 44px;
388
429
  margin-bottom: -12px;
430
+
431
+ &::before {
432
+ content: '';
433
+ pointer-events: none;
434
+ position: absolute;
435
+ top: 0px;
436
+ height: 100%;
437
+ left: -12px;
438
+ right: -12px;
439
+ box-shadow: 0px -2px 6px 0px rgba($--color-black, 0.08);
440
+ }
441
+ }
442
+
443
+
444
+ .fixed-button-shadow {
445
+ position: absolute;
446
+ bottom: 10px;
447
+ width: 100%;
448
+ left: 50%;
449
+ transform: translateX(-50%);
450
+ height: 44px;
451
+ padding: 0 12px;
452
+ z-index: 1;
453
+ background-color: $--color-white;
454
+
389
455
  &::before {
390
456
  content: '';
391
457
  pointer-events: none;
@@ -404,22 +470,28 @@ iframe {
404
470
  &-none {
405
471
  border: none !important;
406
472
  }
473
+
407
474
  &-a {
408
475
  border: 1px solid $--border-color-base;
409
476
  }
477
+
410
478
  &-t {
411
479
  border-top: 1px solid $--border-color-base;
412
480
  }
481
+
413
482
  &-l {
414
483
  border-left: 1px solid $--border-color-base;
415
484
  }
485
+
416
486
  &-r {
417
487
  border-right: 1px solid $--border-color-base;
418
488
  }
489
+
419
490
  &-b {
420
491
  border-bottom: 1px solid $--border-color-base;
421
492
  }
422
493
  }
494
+
423
495
  .bd-rs {
424
496
  border-radius: $--border-radius-base;
425
497
  }
@@ -432,11 +504,13 @@ iframe {
432
504
  padding: 0;
433
505
  }
434
506
  }
507
+
435
508
  &.p-t-0 {
436
509
  .el-dialog__body {
437
510
  padding-top: 0;
438
511
  }
439
512
  }
513
+
440
514
  &.p-b-0 {
441
515
  .el-dialog__body {
442
516
  padding-bottom: 0;
@@ -449,6 +523,7 @@ iframe {
449
523
  .font-size-base {
450
524
  font-size: var(--font-size-base);
451
525
  }
526
+
452
527
  .font-size-small {
453
528
  font-size: var(--font-size-small);
454
529
  }
@@ -458,15 +533,19 @@ iframe {
458
533
  .color-primary {
459
534
  color: var(--color-primary) !important;
460
535
  }
536
+
461
537
  .color-success {
462
538
  color: var(--color-success);
463
539
  }
540
+
464
541
  .color-warning {
465
542
  color: var(--color-warning);
466
543
  }
544
+
467
545
  .color-danger {
468
546
  color: var(--color-danger);
469
547
  }
548
+
470
549
  .color-placeholder {
471
550
  color: var(--color-text-placeholder);
472
551
  }
@@ -478,15 +557,19 @@ iframe {
478
557
  .color-white {
479
558
  color: white;
480
559
  }
560
+
481
561
  .color-ccc {
482
562
  color: #ccc;
483
563
  }
564
+
484
565
  .color-999 {
485
566
  color: #999;
486
567
  }
568
+
487
569
  .color-666 {
488
570
  color: #666;
489
571
  }
572
+
490
573
  .color-333 {
491
574
  color: #333;
492
575
  }
@@ -496,6 +579,7 @@ iframe {
496
579
  .cursor-d {
497
580
  cursor: default;
498
581
  }
582
+
499
583
  /* 鼠标小手
500
584
  --------------- */
501
585
  .pointer {
@@ -523,18 +607,22 @@ iframe {
523
607
  /* 12号字 */
524
608
  font-size: var(--font-size-small);
525
609
  }
610
+
526
611
  &-b {
527
612
  /* 14号字 */
528
613
  font-size: var(--font-size-base);
529
614
  }
615
+
530
616
  &-m {
531
617
  /* 16号字 */
532
618
  font-size: var(--font-size-medium);
533
619
  }
620
+
534
621
  &-l {
535
622
  /* 18号 */
536
623
  font-size: var(--font-size-large);
537
624
  }
625
+
538
626
  &-xl {
539
627
  font-size: var(--font-size-extra-large);
540
628
  }
@@ -544,10 +632,12 @@ iframe {
544
632
  ---------------- */
545
633
  $list: 45, 60, 80, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
546
634
  300, 400, 500, 600, 700, 800, 900, 1000;
635
+
547
636
  @each $n in $list {
548
637
  .w-#{$n} {
549
638
  width: #{$n}px !important;
550
639
  }
640
+
551
641
  .h-#{$n} {
552
642
  height: #{$n}px !important;
553
643
  }
@@ -571,24 +661,31 @@ $list: 45, 60, 80, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 2
571
661
  &-r {
572
662
  border-radius: 50%;
573
663
  }
664
+
574
665
  &-r-4 {
575
666
  border-radius: 4px;
576
667
  }
668
+
577
669
  &-r-5 {
578
670
  border-radius: 5px;
579
671
  }
672
+
580
673
  &-r-6 {
581
674
  border-radius: 6px;
582
675
  }
676
+
583
677
  &-r-7 {
584
678
  border-radius: 7px;
585
679
  }
680
+
586
681
  &-r-8 {
587
682
  border-radius: 8px;
588
683
  }
684
+
589
685
  &-r-9 {
590
686
  border-radius: 9px;
591
687
  }
688
+
592
689
  &-r-10 {
593
690
  border-radius: 10px;
594
691
  }
@@ -600,18 +697,23 @@ $list: 45, 60, 80, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 2
600
697
  &-baseline {
601
698
  vertical-align: baseline; // 将一个元素的基线与其父元素的基线对齐。
602
699
  }
700
+
603
701
  &-top {
604
702
  vertical-align: top; // 将一个元素的顶部和它的子代与整个行的顶部对齐。
605
703
  }
704
+
606
705
  &-middle {
607
706
  vertical-align: middle; // 将元素的中间与基线加父元素的一半高度对齐。
608
707
  }
708
+
609
709
  &-bottom {
610
710
  vertical-align: bottom; // 将一个元素的底部和它的子代与整个行的底部对齐。
611
711
  }
712
+
612
713
  &-text-top {
613
714
  vertical-align: text-top; // 使元素的顶部与父元素的字体顶部对齐。
614
715
  }
716
+
615
717
  &-text-bottom {
616
718
  vertical-align: text-bottom; // 使元素的底部与父元素的字体底部对齐。
617
719
  }
@@ -623,12 +725,15 @@ $list: 45, 60, 80, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 2
623
725
  &-none {
624
726
  user-select: none; // 防止选择元素及其子元素中的文本。
625
727
  }
728
+
626
729
  &-text {
627
730
  user-select: text; // 允许选择元素及其子元素中的文本。
628
731
  }
732
+
629
733
  &-all {
630
734
  user-select: all; // 在用户点击时自动选择元素中的所有文本。
631
735
  }
736
+
632
737
  &-auto {
633
738
  user-select: auto; // 使用默认的浏览器行为来选择文本
634
739
  }
@@ -646,10 +751,12 @@ $list: 45, 60, 80, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 2
646
751
  .uppercase {
647
752
  text-transform: uppercase;
648
753
  }
754
+
649
755
  /* 使用 lowercase 功能类对文本进行小写转换 */
650
756
  .lowercase {
651
757
  text-transform: lowercase;
652
758
  }
759
+
653
760
  /* 使用 capitalize 功能类对文本进行首字母大写转换 */
654
761
  .capitalize {
655
762
  text-transform: capitalize;
@@ -659,10 +766,12 @@ $list: 45, 60, 80, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 2
659
766
  .underline {
660
767
  text-decoration: underline;
661
768
  }
769
+
662
770
  /* 删除线 */
663
771
  .line-through {
664
772
  text-decoration: line-through;
665
773
  }
774
+
666
775
  /* 移除文本装饰 */
667
776
  .no-underline {
668
777
  text-decoration: none;
@@ -673,15 +782,19 @@ $list: 45, 60, 80, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 2
673
782
  &-none {
674
783
  animation: none;
675
784
  }
785
+
676
786
  &-spin {
677
787
  animation: spin 1s linear infinite;
678
788
  }
789
+
679
790
  &-ping {
680
791
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
681
792
  }
793
+
682
794
  &-pulse {
683
795
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
684
796
  }
797
+
685
798
  &-bounce {
686
799
  animation: bounce 1s infinite;
687
800
  }
@@ -691,11 +804,14 @@ $list: 45, 60, 80, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 2
691
804
  from {
692
805
  transform: rotate(0deg);
693
806
  }
807
+
694
808
  to {
695
809
  transform: rotate(360deg);
696
810
  }
697
811
  }
812
+
698
813
  @keyframes ping {
814
+
699
815
  75%,
700
816
  100% {
701
817
  transform: scale(2);
@@ -704,23 +820,27 @@ $list: 45, 60, 80, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 2
704
820
  }
705
821
 
706
822
  @keyframes pulse {
823
+
707
824
  0%,
708
825
  100% {
709
826
  opacity: 1;
710
827
  }
828
+
711
829
  50% {
712
830
  opacity: 0.5;
713
831
  }
714
832
  }
715
833
 
716
834
  @keyframes bounce {
835
+
717
836
  0%,
718
837
  100% {
719
838
  transform: translateY(-25%);
720
839
  animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
721
840
  }
841
+
722
842
  50% {
723
843
  transform: translateY(0);
724
844
  animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
725
845
  }
726
- }
846
+ }
@@ -7,6 +7,7 @@
7
7
  :value="value"
8
8
  :clearable="clearable"
9
9
  v-on="$listeners"
10
+ @change="changeFn"
10
11
  />
11
12
  </template>
12
13
 
@@ -22,6 +23,11 @@ export default {
22
23
  type: Boolean,
23
24
  default: true
24
25
  }
26
+ },
27
+ methods: {
28
+ changeFn(val) {
29
+ this.$emit('change', val)
30
+ }
25
31
  }
26
32
  }
27
33
  </script>
@@ -159,8 +159,10 @@ export default {
159
159
  if (this.type === 'daterange' || this.type === 'monthrange') {
160
160
  this.$emit('update:start-date', val ? val[0] : null)
161
161
  this.$emit('update:end-date', val ? val[1] : null)
162
+ this.$emit('change', val)
162
163
  } else {
163
164
  this.$emit('input', val)
165
+ this.$emit('change', val)
164
166
  }
165
167
  }
166
168
  }