啊鑫
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
76
77
78
79
@import '../style/var';
 
.van-grid-item {
  position: relative;
  box-sizing: border-box;
 
  &--square {
    height: 0;
  }
 
  &__icon {
    font-size: @grid-item-icon-size;
  }
 
  &__icon-wrapper {
    position: relative;
  }
 
  &__text {
    color: @grid-item-text-color;
    font-size: @grid-item-text-font-size;
    line-height: 1.5;
    // https://github.com/vant-ui/vant/issues/3894
    word-break: break-all;
  }
 
  &__icon + &__text {
    margin-top: @padding-xs;
  }
 
  &__content {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100%;
    padding: @grid-item-content-padding;
    background-color: @grid-item-content-background-color;
 
    &::after {
      z-index: 1;
      border-width: 0 @border-width-base @border-width-base 0;
    }
 
    &--square {
      position: absolute;
      top: 0;
      right: 0;
      left: 0;
    }
 
    &--center {
      align-items: center;
      justify-content: center;
    }
 
    &--horizontal {
      flex-direction: row;
 
      .van-grid-item__icon + .van-grid-item__text {
        margin-top: 0;
        margin-left: @padding-xs;
      }
    }
 
    &--surround {
      &::after {
        border-width: @border-width-base;
      }
    }
 
    &--clickable {
      cursor: pointer;
 
      &:active {
        background-color: @grid-item-content-active-color;
      }
    }
  }
}