Vben
2021-03-18 67962f1deea31d695d20ae0ea7fc39b39c1eea47
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
@header-trigger-prefix-cls: ~'@{namespace}-layout-header-trigger';
@header-prefix-cls: ~'@{namespace}-layout-header';
@breadcrumb-prefix-cls: ~'@{namespace}-layout-breadcrumb';
@logo-prefix-cls: ~'@{namespace}-app-logo';
 
.@{header-prefix-cls} {
  display: flex;
  height: @header-height;
  padding: 0;
  margin-left: -1px;
  line-height: @header-height;
  color: @white;
  background: @white;
  align-items: center;
  justify-content: space-between;
 
  &--mobile {
    .@{breadcrumb-prefix-cls},
    .error-action,
    .notify-item,
    .fullscreen-item {
      display: none;
    }
 
    .@{logo-prefix-cls} {
      min-width: unset;
      padding-right: 0;
 
      &__title {
        display: none;
      }
    }
    .@{header-trigger-prefix-cls} {
      padding: 0 4px 0 8px !important;
    }
    .@{header-prefix-cls}-action {
      padding-right: 4px;
    }
  }
 
  &--fixed {
    position: fixed;
    top: 0;
    left: 0;
    z-index: @layout-header-fixed-z-index;
    width: 100%;
  }
 
  &-logo {
    height: @header-height;
    min-width: 192px;
    padding: 0 10px;
    font-size: 14px;
 
    img {
      width: @logo-width;
      height: @logo-width;
      margin-right: 2px;
    }
  }
 
  &-left {
    display: flex;
    height: 100%;
    align-items: center;
 
    .@{header-trigger-prefix-cls} {
      display: flex;
      height: 100%;
      padding: 1px 10px 0 10px;
      cursor: pointer;
      align-items: center;
 
      .anticon {
        font-size: 16px;
      }
 
      &.light {
        &:hover {
          background: @header-light-bg-hover-color;
        }
 
        svg {
          fill: #000;
        }
      }
 
      &.dark {
        &:hover {
          background: @header-dark-bg-hover-color;
        }
      }
    }
  }
 
  &-menu {
    height: 100%;
    min-width: 0;
    flex: 1;
    align-items: center;
  }
 
  &-action {
    display: flex;
    min-width: 180px;
    // padding-right: 12px;
    align-items: center;
 
    &__item {
      display: flex !important;
      height: @header-height;
      padding: 0 2px;
      font-size: 1.2em;
      cursor: pointer;
      align-items: center;
 
      .ant-badge {
        height: @header-height;
        line-height: @header-height;
      }
 
      .ant-badge-dot {
        top: 10px;
        right: 2px;
      }
    }
 
    span[role='img'] {
      padding: 0 8px;
    }
  }
 
  &--light {
    background: @white;
    border-bottom: 1px solid @header-light-bottom-border-color;
    border-left: 1px solid @header-light-bottom-border-color;
 
    .@{header-prefix-cls}-logo {
      color: @text-color-base;
 
      &:hover {
        background: @header-light-bg-hover-color;
      }
    }
 
    .@{header-prefix-cls}-action {
      &__item {
        color: @text-color-base;
 
        .app-iconify {
          padding: 0 10px;
          font-size: 16px !important;
        }
 
        &:hover {
          background: @header-light-bg-hover-color;
        }
      }
 
      &-icon,
      span[role='img'] {
        color: @text-color-base;
      }
    }
  }
 
  &--dark {
    background: @header-dark-bg-color;
 
    .@{header-prefix-cls}-logo {
      &:hover {
        background: @header-dark-bg-hover-color;
      }
    }
 
    .@{header-prefix-cls}-action {
      &__item {
        .app-iconify {
          padding: 0 10px;
          font-size: 16px !important;
        }
 
        &:hover {
          background: @header-dark-bg-hover-color;
        }
      }
    }
  }
}