vben
2021-11-10 3fcfac1f37c2aeabbb2af4897ada6ba8c225c667
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
@prefix-cls: ~'@{namespace}-multiple-tabs';
 
html[data-theme='dark'] {
  .@{prefix-cls} {
    .ant-tabs-tab {
      border-bottom: 1px solid @border-color-base;
    }
  }
}
 
html[data-theme='light'] {
  .@{prefix-cls} {
    .ant-tabs-tab:not(.ant-tabs-tab-active) {
      border: 1px solid #d9d9d9 !important;
    }
  }
}
 
.@{prefix-cls} {
  z-index: 10;
  height: @multiple-height + 2;
  line-height: @multiple-height + 2;
  background-color: @component-background;
  border-bottom: 1px solid @border-color-base;
 
  .ant-tabs-small {
    height: @multiple-height;
  }
 
  .ant-tabs.ant-tabs-card {
    .ant-tabs-nav {
      padding-top: 2px;
      height: @multiple-height;
      margin: 0;
      background-color: @component-background;
      border: 0;
      box-shadow: none;
 
      .ant-tabs-nav-container {
        height: @multiple-height;
        padding-top: 2px;
      }
 
      .ant-tabs-tab {
        height: calc(@multiple-height - 2px);
        padding-right: 12px;
        line-height: calc(@multiple-height - 2px);
        color: @text-color-base;
        background-color: @component-background;
        transition: none;
 
        &:hover {
          .ant-tabs-tab-remove {
            opacity: 1;
          }
        }
 
        .ant-tabs-tab-remove {
          width: 8px;
          height: 28px;
          font-size: 12px;
          color: inherit;
          opacity: 0;
          transition: none;
          margin-left: 2px;
          margin-right: -4px;
 
          &:hover {
            svg {
              width: 0.8em;
            }
          }
        }
 
        // > div {
        //   display: flex;
        //   justify-content: center;
        //   align-items: center;
        // }
 
        svg {
          fill: @text-color-base;
        }
      }
 
      .ant-tabs-tab:not(.ant-tabs-tab-active) {
        &:hover {
          color: @primary-color;
        }
      }
 
      .ant-tabs-tab-active {
        position: relative;
        padding-left: 18px;
        background: @primary-color;
        border: 0;
        transition: none;
 
        span {
          color: @white !important;
        }
 
        .ant-tabs-tab-remove {
          opacity: 1;
        }
 
        svg {
          width: 0.7em;
          fill: @white;
        }
      }
    }
 
    .ant-tabs-nav > div:nth-child(1) {
      padding: 0 6px;
 
      .ant-tabs-tab {
        margin-right: 3px !important;
      }
    }
  }
 
  .ant-tabs-tab:not(.ant-tabs-tab-active) {
    .anticon-close {
      font-size: 12px;
 
      svg {
        width: 0.6em;
      }
    }
  }
 
  .ant-dropdown-trigger {
    display: inline-flex;
  }
 
  &--hide-close {
    .ant-tabs-tab-remove {
      opacity: 0 !important;
    }
  }
 
  &-content {
    &__extra-quick,
    &__extra-redo,
    &__extra-fold {
      display: inline-block;
      width: 36px;
      height: @multiple-height;
      line-height: @multiple-height;
      color: @text-color-secondary;
      text-align: center;
      cursor: pointer;
      border-left: 1px solid @border-color-base;
 
      &:hover {
        color: @text-color-base;
      }
 
      span[role='img'] {
        transform: rotate(90deg);
      }
    }
 
    &__extra-redo {
      span[role='img'] {
        transform: rotate(0deg);
      }
    }
 
    &__info {
      display: inline-block;
      width: 100%;
      height: @multiple-height - 2;
      padding-left: 0;
      margin-left: -10px;
      font-size: 12px;
      cursor: pointer;
      user-select: none;
    }
  }
}