啊鑫
7 天以前 fca192d3c38c5dcfbb6ace8bc71d6078f6a079b2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@import '../style/var';
 
.van-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: content-box;
 
  // hack for avoid max-width when use left & fixed
  width: @toast-default-width;
  max-width: @toast-max-width;
  min-height: @toast-default-min-height;
  padding: @toast-default-padding;
  color: @toast-text-color;
  font-size: @toast-font-size;
  line-height: @toast-line-height;
 
  // allow newline character
  white-space: pre-wrap;
  text-align: center;
  // https://github.com/vant-ui/vant/issues/8959
  word-break: break-all;
  background-color: @toast-background-color;
  border-radius: @toast-border-radius;
  transform: translate3d(-50%, -50%, 0);
 
  &--unclickable {
    // lock scroll
    overflow: hidden;
 
    // should not add pointer-events: none directly to body tag
    // that will cause unexpected tap-highlight-color in mobile safari
    * {
      pointer-events: none;
    }
  }
 
  &--text,
  &--html {
    width: fit-content;
    min-width: @toast-text-min-width;
    min-height: 0;
    padding: @toast-text-padding;
 
    .van-toast__text {
      margin-top: 0;
    }
  }
 
  &--top {
    top: @toast-position-top-distance;
  }
 
  &--bottom {
    top: auto;
    bottom: @toast-position-bottom-distance;
  }
 
  &__icon {
    font-size: @toast-icon-size;
  }
 
  &__loading {
    padding: @padding-base;
    color: @toast-loading-icon-color;
  }
 
  &__text {
    margin-top: @padding-xs;
  }
}