vue-stack-tabs 0.1.12 → 0.1.13

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.
Files changed (72) hide show
  1. package/{types → dist}/src/lib/hooks/useStackTab.d.ts +2 -2
  2. package/{types → dist}/src/lib/hooks/useTabpanel.d.ts +6 -2
  3. package/{types → dist}/src/lib/index.d.ts +5 -0
  4. package/{types → dist}/src/lib/model/TabModel.d.ts +2 -1
  5. package/dist/style.css +1 -1
  6. package/dist/vue-stack-tabs.es.js +2340 -2322
  7. package/dist/vue-stack-tabs.umd.js +10 -10
  8. package/package.json +3 -4
  9. package/src/lib/StackTabs.vue +136 -126
  10. package/src/lib/assets/style/common/mixins.scss +45 -45
  11. package/src/lib/assets/style/common/var.scss +65 -65
  12. package/src/lib/assets/style/icon.scss +93 -93
  13. package/src/lib/assets/style/index.scss +4 -4
  14. package/src/lib/assets/style/overlayer.scss +40 -40
  15. package/src/lib/assets/style/stackTab.scss +395 -395
  16. package/src/lib/assets/style/transition.scss +40 -40
  17. package/src/lib/banner.ts +51 -51
  18. package/src/lib/components/ContextMenu/ContextMenuItem.vue +15 -15
  19. package/src/lib/components/ContextMenu/index.vue +129 -129
  20. package/src/lib/components/OverlayLoading/Component.vue +182 -191
  21. package/src/lib/components/OverlayLoading/api.ts +31 -31
  22. package/src/lib/components/OverlayLoading/helpers.ts +31 -31
  23. package/src/lib/components/OverlayLoading/index.ts +12 -12
  24. package/src/lib/components/OverlayLoading/loaders/bars.vue +79 -79
  25. package/src/lib/components/OverlayLoading/loaders/dots.vue +92 -92
  26. package/src/lib/components/OverlayLoading/loaders/index.ts +9 -9
  27. package/src/lib/components/OverlayLoading/loaders/spinner.vue +41 -41
  28. package/src/lib/components/TabHeader/TabHeaderButton.vue +35 -35
  29. package/src/lib/components/TabHeader/TabHeaderItem.vue +63 -63
  30. package/src/lib/components/TabHeader/TabHeaderScroll.vue +240 -240
  31. package/src/lib/components/TabHeader/index.vue +135 -135
  32. package/src/lib/hooks/useContextMenu.ts +50 -50
  33. package/src/lib/hooks/useStackTab.ts +74 -65
  34. package/src/lib/hooks/useTabLoading.ts +34 -34
  35. package/src/lib/hooks/useTabRouter.ts +94 -94
  36. package/src/lib/hooks/useTabpanel.tsx +516 -491
  37. package/src/lib/i18n/index.ts +72 -72
  38. package/src/lib/i18n/lang/en.ts +15 -15
  39. package/src/lib/i18n/lang/zh-CN.ts +15 -15
  40. package/src/lib/iframe.vue +7 -7
  41. package/src/lib/index.ts +32 -24
  42. package/src/lib/model/TabModel.ts +178 -169
  43. package/src/lib/utils/TabIdHelper.ts +70 -70
  44. package/src/lib/utils/TabScrollHelper.ts +104 -104
  45. package/src/lib/utils/UriHelper.ts +22 -22
  46. /package/{types → dist}/index.d.ts +0 -0
  47. /package/{types → dist}/src/lib/StackTabs.vue.d.ts +0 -0
  48. /package/{types → dist}/src/lib/banner.d.ts +0 -0
  49. /package/{types → dist}/src/lib/components/ContextMenu/ContextMenuItem.vue.d.ts +0 -0
  50. /package/{types → dist}/src/lib/components/ContextMenu/index.vue.d.ts +0 -0
  51. /package/{types → dist}/src/lib/components/OverlayLoading/Component.vue.d.ts +0 -0
  52. /package/{types → dist}/src/lib/components/OverlayLoading/api.d.ts +0 -0
  53. /package/{types → dist}/src/lib/components/OverlayLoading/helpers.d.ts +0 -0
  54. /package/{types → dist}/src/lib/components/OverlayLoading/index.d.ts +0 -0
  55. /package/{types → dist}/src/lib/components/OverlayLoading/loaders/bars.vue.d.ts +0 -0
  56. /package/{types → dist}/src/lib/components/OverlayLoading/loaders/dots.vue.d.ts +0 -0
  57. /package/{types → dist}/src/lib/components/OverlayLoading/loaders/index.d.ts +0 -0
  58. /package/{types → dist}/src/lib/components/OverlayLoading/loaders/spinner.vue.d.ts +0 -0
  59. /package/{types → dist}/src/lib/components/TabHeader/TabHeaderButton.vue.d.ts +0 -0
  60. /package/{types → dist}/src/lib/components/TabHeader/TabHeaderItem.vue.d.ts +0 -0
  61. /package/{types → dist}/src/lib/components/TabHeader/TabHeaderScroll.vue.d.ts +0 -0
  62. /package/{types → dist}/src/lib/components/TabHeader/index.vue.d.ts +0 -0
  63. /package/{types → dist}/src/lib/hooks/useContextMenu.d.ts +0 -0
  64. /package/{types → dist}/src/lib/hooks/useTabLoading.d.ts +0 -0
  65. /package/{types → dist}/src/lib/hooks/useTabRouter.d.ts +0 -0
  66. /package/{types → dist}/src/lib/i18n/index.d.ts +0 -0
  67. /package/{types → dist}/src/lib/i18n/lang/en.d.ts +0 -0
  68. /package/{types → dist}/src/lib/i18n/lang/zh-CN.d.ts +0 -0
  69. /package/{types → dist}/src/lib/iframe.vue.d.ts +0 -0
  70. /package/{types → dist}/src/lib/utils/TabIdHelper.d.ts +0 -0
  71. /package/{types → dist}/src/lib/utils/TabScrollHelper.d.ts +0 -0
  72. /package/{types → dist}/src/lib/utils/UriHelper.d.ts +0 -0
@@ -1,395 +1,395 @@
1
- @use 'sass:math';
2
- @import './common/var';
3
- @import './common/mixins';
4
-
5
- .stack-tab {
6
- display: flex;
7
- min-height: 300px;
8
- background-color: $--stack-tab-background-color-base;
9
- flex-direction: column;
10
- grid-gap: 5px;
11
-
12
- &__container {
13
- flex: 1 1 0;
14
- position: relative;
15
- overflow: hidden;
16
- }
17
- /*缓存页面wrapper*/
18
- .cache-page-wrapper {
19
- width: 100%;
20
- height: 100%;
21
- }
22
- &__maximum {
23
- width: 100vw !important;
24
- height: 100vh !important;
25
- top: 0;
26
- left: 0;
27
- position: fixed;
28
- }
29
-
30
- //蒙版按钮
31
- &__mask-button {
32
- height: 100%;
33
- width: $--stack-tab-button-size;
34
- background-color: $--stack-tab-text-color;
35
- margin: 0 5px;
36
- transition: $--stack-tab__trans;
37
-
38
- .stack-tab__header-button[disabled] & {
39
- cursor: not-allowed;
40
- background-color: $--stack-tab-color-disabled;
41
- transition: none;
42
- //pointer-events: none;
43
- }
44
- &:hover {
45
- background-color: $--stack-tab-color-primary;
46
- }
47
-
48
- &:active {
49
- // cursor: pointer;
50
- background-color: $--stack-tab-color-primary-activate;
51
- }
52
- }
53
- &__button {
54
- height: $--stack-tab-button-size;
55
- width: $--stack-tab-button-size;
56
- margin: 0 5px;
57
- }
58
-
59
- &__header {
60
- position: relative;
61
- display: flex;
62
- width: 100%;
63
- height: $--stack-tab-head-height;
64
- border-bottom: 1px solid $--stack-tab-border-color;
65
- box-sizing: border-box;
66
- //user-select: none;
67
-
68
- //tab header上面的按钮
69
- &-button {
70
- z-index: 2;
71
- height: $--stack-tab-head-height;
72
- width: fit-content;
73
- overflow: hidden;
74
- background-color: $--stack-tab-background-color-base;
75
- cursor: pointer;
76
- display: flex;
77
- align-items: center;
78
-
79
- //按钮禁用样式
80
- &[disabled] {
81
- background-color: $--stack-tab-background-color-inactive;
82
- box-shadow: none;
83
- cursor: not-allowed;
84
- }
85
- }
86
- }
87
- //tab header上的滚动条
88
- &__scroll {
89
- position: relative;
90
- flex: 1 1 0;
91
- height: $--stack-tab-head-height;
92
- overflow: hidden;
93
-
94
- &-container {
95
- width: 100%;
96
- height: 100%;
97
- overflow: hidden;
98
-
99
- // 移动设备原生滚动
100
- &.is-mobile {
101
- overflow-x: auto;
102
- overflow-y: hidden;
103
- }
104
- }
105
- }
106
- &__scrollbar {
107
- position: absolute;
108
- right: 0;
109
- bottom: 0;
110
- left: 0;
111
- /*z-index: 2;*/
112
- height: $--stack-tab-scroll-height;
113
- background-color: rgb(0 0 0 / 10%);
114
- border-radius: $--stack-tab-scroll-border-radius;
115
- opacity: 0;
116
- transition: $--stack-tab__trans;
117
-
118
- .stack-tab__scroll:hover &,
119
- &.is-dragging {
120
- opacity: 1;
121
- }
122
- }
123
- &__scrollbar-thumb {
124
- position: absolute;
125
- top: 0;
126
- left: 0;
127
- height: 100%;
128
- background-color: rgba(0, 0, 0, 0.1);
129
-
130
- border-radius: $--stack-tab-scroll-border-radius;
131
- transition: background-color 0.3s ease-in-out;
132
-
133
- &:hover {
134
- cursor: grab;
135
- &:active {
136
- cursor: grabbing;
137
- }
138
- }
139
-
140
- .stack-tab__scrollbar.is-dragging &,
141
- &:hover {
142
- background-color: $--stack-tab-color-primary !important;
143
- }
144
- }
145
-
146
- /*
147
- 页签导航
148
- */
149
- &__nav {
150
- position: relative;
151
- display: inline-flex;
152
- height: 100%;
153
- padding: 0;
154
- margin: 0;
155
- list-style: none;
156
- flex-wrap: nowrap;
157
- content-visibility: auto;
158
- }
159
-
160
- /*
161
- 页签项
162
- */
163
- &__item {
164
- position: relative;
165
- display: flex;
166
- padding: 0 $--stack-tab-padding;
167
- font-size: $--stack-tab-font-size;
168
- color: $--stack-tab-text-color;
169
- cursor: pointer;
170
- background-color: $--stack-tab-background-color-inactive;
171
- border: $--stack-tab-border;
172
- border-left: none;
173
- border-radius: 8px 8px 0 0;
174
- transition: $--stack-tab__trans;
175
- user-select: none;
176
- flex: none;
177
- align-items: center;
178
- transform-origin: left bottom;
179
- content-visibility: auto;
180
- margin-top: 5px;
181
-
182
- &:first-child {
183
- border-left: $--stack-tab-border;
184
- }
185
-
186
- /*
187
- 激活右键菜单的页签
188
- */
189
- &.is-contextmenu {
190
- color: #000;
191
- }
192
-
193
- /*
194
- 激活的页签
195
- */
196
- &.is-active {
197
- z-index: 1;
198
- background-color: $--stack-tab-background-color-base;
199
- border-bottom-color: #fff;
200
- box-shadow: $--stack-tab-shadow-left, $--stack-tab-shadow-right;
201
- margin-top: unset;
202
- }
203
-
204
- &:hover,
205
- &.is-active {
206
- color: $--stack-tab-color-primary;
207
-
208
- &.is-icon {
209
- padding: 0
210
- ($--stack-tab-padding - math.div($--stack-tab-button-size + $--stack-tab-icon-margin, 2));
211
-
212
- .stack-tab__item-button {
213
- width: $--stack-tab-button-size;
214
- margin-left: $--stack-tab-icon-margin;
215
- }
216
- }
217
- }
218
-
219
- /*
220
- 页签标题
221
- */
222
- &-title {
223
- flex: 1 1 0;
224
- display: flex;
225
-
226
- &-content {
227
- max-width: 100px;
228
- min-width: 30px;
229
- overflow: hidden;
230
- text-overflow: ellipsis;
231
- white-space: nowrap;
232
- }
233
- }
234
-
235
- /*
236
- 页签图标
237
- */
238
- &-icon {
239
- margin-right: 5px;
240
- font-size: 16px;
241
- }
242
- /*
243
- 页答按钮
244
- */
245
- &-button {
246
- height: 100%;
247
- width: 0;
248
- background-color: $--stack-tab-text-color;
249
- transition: $--stack-tab__trans;
250
-
251
- &:hover {
252
- background-color: $--stack-tab-color-primary;
253
- }
254
-
255
- &:active {
256
- /*
257
- cursor: pointer;
258
- */
259
- background-color: $--stack-tab-color-primary-activate;
260
- }
261
- }
262
- }
263
- /*
264
- 角徽样式
265
- */
266
- &__badge {
267
- position: relative;
268
- display: inline-block;
269
-
270
- &-content {
271
- position: absolute;
272
- top: 0.1rem;
273
- right: 0.1rem;
274
- min-width: 0.5rem;
275
- min-height: 0.5rem;
276
- padding: 0.3rem;
277
- font-size: 0.5rem;
278
- line-height: 0.4rem;
279
- color: #fff;
280
- text-align: center;
281
- border: 1px solid $--stack-tab-background-color-base;
282
- border-radius: 0.5rem;
283
- transform: translateX(100%) translateY(-50%);
284
- box-sizing: border-box;
285
-
286
- &.default {
287
- background: $--stack-tab-color-danger;
288
- }
289
-
290
- &.primary {
291
- background: $--stack-tab-color-primary;
292
- }
293
- }
294
- }
295
-
296
- &__iframe {
297
- position: absolute;
298
- top: 0;
299
- left: 0;
300
- width: 100%;
301
- height: 100%;
302
- /*
303
- 新浏览器使用这个来消除frame的边框
304
- */
305
- border: 0;
306
- }
307
- /*
308
- 右键菜单
309
- */
310
- &__contextmenu {
311
- position: fixed;
312
- z-index: 999;
313
- min-width: 120px;
314
- padding: 8px;
315
- font-size: $--stack-tab-font-size;
316
- background: #fff;
317
- border: $--stack-tab-border;
318
- border-radius: 10px 0;
319
- box-shadow: $--stack-tab-shadow-context-menu;
320
- transform-origin: left top;
321
- transition: all 0.25s ease-in;
322
-
323
- &-item {
324
- display: flex;
325
- position: relative;
326
- align-items: center;
327
- padding: 0 10px;
328
- line-height: 30px;
329
- color: $--stack-tab-text-color;
330
- cursor: pointer;
331
- border-radius: 10px 0;
332
- transition: all 0.2s ease-in-out;
333
- user-select: none;
334
-
335
- &:hover,
336
- &:active {
337
- color: $--stack-tab-color-white;
338
- background-color: $--stack-tab-color-primary;
339
-
340
- .svg-mask {
341
- background-color: $--stack-tab-color-white;
342
- }
343
- }
344
-
345
- &[disabled] {
346
- color: $--stack-tab-color-disabled;
347
- pointer-events: none;
348
- cursor: default;
349
- background: none;
350
-
351
- .svg-mask {
352
- background-color: $--stack-tab-color-disabled;
353
- }
354
- }
355
- }
356
-
357
- &-icon {
358
- width: $--stack-tab-font-size;
359
- height: $--stack-tab-font-size;
360
- transition: all 0.2s ease-in-out;
361
-
362
- &.svg-mask {
363
- width: $--stack-tab-font-size;
364
- height: $--stack-tab-font-size;
365
- background-color: $--stack-tab-text-color;
366
- }
367
- }
368
- }
369
- }
370
-
371
- .stack-tab__shadow-left {
372
- box-shadow: $--stack-tab-shadow-left;
373
- }
374
-
375
- .stack-tab__shadow-right {
376
- box-shadow: $--stack-tab-shadow-right;
377
- }
378
-
379
- /**
380
- 内阴影
381
- */
382
- .stack-tab__shadow-inset {
383
- &-left::after {
384
- @include insetShadow();
385
- box-shadow: $--stack-tab-shadow-left-inset;
386
- }
387
- &-right::after {
388
- @include insetShadow();
389
- box-shadow: $--stack-tab-shadow-right-inset;
390
- }
391
- &-all::after {
392
- @include insetShadow();
393
- box-shadow: $--stack-tab-shadow-left-inset, $--stack-tab-shadow-right-inset;
394
- }
395
- }
1
+ @use 'sass:math';
2
+ @import './common/var';
3
+ @import './common/mixins';
4
+
5
+ .stack-tab {
6
+ display: flex;
7
+ min-height: 300px;
8
+ background-color: $--stack-tab-background-color-base;
9
+ flex-direction: column;
10
+ grid-gap: 5px;
11
+
12
+ &__container {
13
+ flex: 1 1 0;
14
+ position: relative;
15
+ overflow: hidden;
16
+ }
17
+ /*缓存页面wrapper*/
18
+ .cache-page-wrapper {
19
+ width: 100%;
20
+ height: 100%;
21
+ }
22
+ &__maximum {
23
+ width: 100vw !important;
24
+ height: 100vh !important;
25
+ top: 0;
26
+ left: 0;
27
+ position: fixed;
28
+ }
29
+
30
+ //蒙版按钮
31
+ &__mask-button {
32
+ height: 100%;
33
+ width: $--stack-tab-button-size;
34
+ background-color: $--stack-tab-text-color;
35
+ margin: 0 5px;
36
+ transition: $--stack-tab__trans;
37
+
38
+ .stack-tab__header-button[disabled] & {
39
+ cursor: not-allowed;
40
+ background-color: $--stack-tab-color-disabled;
41
+ transition: none;
42
+ //pointer-events: none;
43
+ }
44
+ &:hover {
45
+ background-color: $--stack-tab-color-primary;
46
+ }
47
+
48
+ &:active {
49
+ // cursor: pointer;
50
+ background-color: $--stack-tab-color-primary-activate;
51
+ }
52
+ }
53
+ &__button {
54
+ height: $--stack-tab-button-size;
55
+ width: $--stack-tab-button-size;
56
+ margin: 0 5px;
57
+ }
58
+
59
+ &__header {
60
+ position: relative;
61
+ display: flex;
62
+ width: 100%;
63
+ height: $--stack-tab-head-height;
64
+ border-bottom: 1px solid $--stack-tab-border-color;
65
+ box-sizing: border-box;
66
+ //user-select: none;
67
+
68
+ //tab header上面的按钮
69
+ &-button {
70
+ z-index: 2;
71
+ height: $--stack-tab-head-height;
72
+ width: fit-content;
73
+ overflow: hidden;
74
+ background-color: $--stack-tab-background-color-base;
75
+ cursor: pointer;
76
+ display: flex;
77
+ align-items: center;
78
+
79
+ //按钮禁用样式
80
+ &[disabled] {
81
+ background-color: $--stack-tab-background-color-inactive;
82
+ box-shadow: none;
83
+ cursor: not-allowed;
84
+ }
85
+ }
86
+ }
87
+ //tab header上的滚动条
88
+ &__scroll {
89
+ position: relative;
90
+ flex: 1 1 0;
91
+ height: $--stack-tab-head-height;
92
+ overflow: hidden;
93
+
94
+ &-container {
95
+ width: 100%;
96
+ height: 100%;
97
+ overflow: hidden;
98
+
99
+ // 移动设备原生滚动
100
+ &.is-mobile {
101
+ overflow-x: auto;
102
+ overflow-y: hidden;
103
+ }
104
+ }
105
+ }
106
+ &__scrollbar {
107
+ position: absolute;
108
+ right: 0;
109
+ bottom: 0;
110
+ left: 0;
111
+ /*z-index: 2;*/
112
+ height: $--stack-tab-scroll-height;
113
+ background-color: rgb(0 0 0 / 10%);
114
+ border-radius: $--stack-tab-scroll-border-radius;
115
+ opacity: 0;
116
+ transition: $--stack-tab__trans;
117
+
118
+ .stack-tab__scroll:hover &,
119
+ &.is-dragging {
120
+ opacity: 1;
121
+ }
122
+ }
123
+ &__scrollbar-thumb {
124
+ position: absolute;
125
+ top: 0;
126
+ left: 0;
127
+ height: 100%;
128
+ background-color: rgba(0, 0, 0, 0.1);
129
+
130
+ border-radius: $--stack-tab-scroll-border-radius;
131
+ transition: background-color 0.3s ease-in-out;
132
+
133
+ &:hover {
134
+ cursor: grab;
135
+ &:active {
136
+ cursor: grabbing;
137
+ }
138
+ }
139
+
140
+ .stack-tab__scrollbar.is-dragging &,
141
+ &:hover {
142
+ background-color: $--stack-tab-color-primary !important;
143
+ }
144
+ }
145
+
146
+ /*
147
+ 页签导航
148
+ */
149
+ &__nav {
150
+ position: relative;
151
+ display: inline-flex;
152
+ height: 100%;
153
+ padding: 0;
154
+ margin: 0;
155
+ list-style: none;
156
+ flex-wrap: nowrap;
157
+ content-visibility: auto;
158
+ }
159
+
160
+ /*
161
+ 页签项
162
+ */
163
+ &__item {
164
+ position: relative;
165
+ display: flex;
166
+ padding: 0 $--stack-tab-padding;
167
+ font-size: $--stack-tab-font-size;
168
+ color: $--stack-tab-text-color;
169
+ cursor: pointer;
170
+ background-color: $--stack-tab-background-color-inactive;
171
+ border: $--stack-tab-border;
172
+ border-left: none;
173
+ border-radius: 8px 8px 0 0;
174
+ transition: $--stack-tab__trans;
175
+ user-select: none;
176
+ flex: none;
177
+ align-items: center;
178
+ transform-origin: left bottom;
179
+ content-visibility: auto;
180
+ margin-top: 5px;
181
+
182
+ &:first-child {
183
+ border-left: $--stack-tab-border;
184
+ }
185
+
186
+ /*
187
+ 激活右键菜单的页签
188
+ */
189
+ &.is-contextmenu {
190
+ color: #000;
191
+ }
192
+
193
+ /*
194
+ 激活的页签
195
+ */
196
+ &.is-active {
197
+ z-index: 1;
198
+ background-color: $--stack-tab-background-color-base;
199
+ border-bottom-color: #fff;
200
+ box-shadow: $--stack-tab-shadow-left, $--stack-tab-shadow-right;
201
+ margin-top: unset;
202
+ }
203
+
204
+ &:hover,
205
+ &.is-active {
206
+ color: $--stack-tab-color-primary;
207
+
208
+ &.is-icon {
209
+ padding: 0
210
+ ($--stack-tab-padding - math.div($--stack-tab-button-size + $--stack-tab-icon-margin, 2));
211
+
212
+ .stack-tab__item-button {
213
+ width: $--stack-tab-button-size;
214
+ margin-left: $--stack-tab-icon-margin;
215
+ }
216
+ }
217
+ }
218
+
219
+ /*
220
+ 页签标题
221
+ */
222
+ &-title {
223
+ flex: 1 1 0;
224
+ display: flex;
225
+
226
+ &-content {
227
+ max-width: 100px;
228
+ min-width: 30px;
229
+ overflow: hidden;
230
+ text-overflow: ellipsis;
231
+ white-space: nowrap;
232
+ }
233
+ }
234
+
235
+ /*
236
+ 页签图标
237
+ */
238
+ &-icon {
239
+ margin-right: 5px;
240
+ font-size: 16px;
241
+ }
242
+ /*
243
+ 页答按钮
244
+ */
245
+ &-button {
246
+ height: 100%;
247
+ width: 0;
248
+ background-color: $--stack-tab-text-color;
249
+ transition: $--stack-tab__trans;
250
+
251
+ &:hover {
252
+ background-color: $--stack-tab-color-primary;
253
+ }
254
+
255
+ &:active {
256
+ /*
257
+ cursor: pointer;
258
+ */
259
+ background-color: $--stack-tab-color-primary-activate;
260
+ }
261
+ }
262
+ }
263
+ /*
264
+ 角徽样式
265
+ */
266
+ &__badge {
267
+ position: relative;
268
+ display: inline-block;
269
+
270
+ &-content {
271
+ position: absolute;
272
+ top: 0.1rem;
273
+ right: 0.1rem;
274
+ min-width: 0.5rem;
275
+ min-height: 0.5rem;
276
+ padding: 0.3rem;
277
+ font-size: 0.5rem;
278
+ line-height: 0.4rem;
279
+ color: #fff;
280
+ text-align: center;
281
+ border: 1px solid $--stack-tab-background-color-base;
282
+ border-radius: 0.5rem;
283
+ transform: translateX(100%) translateY(-50%);
284
+ box-sizing: border-box;
285
+
286
+ &.default {
287
+ background: $--stack-tab-color-danger;
288
+ }
289
+
290
+ &.primary {
291
+ background: $--stack-tab-color-primary;
292
+ }
293
+ }
294
+ }
295
+
296
+ &__iframe {
297
+ position: absolute;
298
+ top: 0;
299
+ left: 0;
300
+ width: 100%;
301
+ height: 100%;
302
+ /*
303
+ 新浏览器使用这个来消除frame的边框
304
+ */
305
+ border: 0;
306
+ }
307
+ /*
308
+ 右键菜单
309
+ */
310
+ &__contextmenu {
311
+ position: fixed;
312
+ z-index: 999;
313
+ min-width: 120px;
314
+ padding: 8px;
315
+ font-size: $--stack-tab-font-size;
316
+ background: #fff;
317
+ border: $--stack-tab-border;
318
+ border-radius: 10px 0;
319
+ box-shadow: $--stack-tab-shadow-context-menu;
320
+ transform-origin: left top;
321
+ transition: all 0.25s ease-in;
322
+
323
+ &-item {
324
+ display: flex;
325
+ position: relative;
326
+ align-items: center;
327
+ padding: 0 10px;
328
+ line-height: 30px;
329
+ color: $--stack-tab-text-color;
330
+ cursor: pointer;
331
+ border-radius: 10px 0;
332
+ transition: all 0.2s ease-in-out;
333
+ user-select: none;
334
+
335
+ &:hover,
336
+ &:active {
337
+ color: $--stack-tab-color-white;
338
+ background-color: $--stack-tab-color-primary;
339
+
340
+ .svg-mask {
341
+ background-color: $--stack-tab-color-white;
342
+ }
343
+ }
344
+
345
+ &[disabled] {
346
+ color: $--stack-tab-color-disabled;
347
+ pointer-events: none;
348
+ cursor: default;
349
+ background: none;
350
+
351
+ .svg-mask {
352
+ background-color: $--stack-tab-color-disabled;
353
+ }
354
+ }
355
+ }
356
+
357
+ &-icon {
358
+ width: $--stack-tab-font-size;
359
+ height: $--stack-tab-font-size;
360
+ transition: all 0.2s ease-in-out;
361
+
362
+ &.svg-mask {
363
+ width: $--stack-tab-font-size;
364
+ height: $--stack-tab-font-size;
365
+ background-color: $--stack-tab-text-color;
366
+ }
367
+ }
368
+ }
369
+ }
370
+
371
+ .stack-tab__shadow-left {
372
+ box-shadow: $--stack-tab-shadow-left;
373
+ }
374
+
375
+ .stack-tab__shadow-right {
376
+ box-shadow: $--stack-tab-shadow-right;
377
+ }
378
+
379
+ /**
380
+ 内阴影
381
+ */
382
+ .stack-tab__shadow-inset {
383
+ &-left::after {
384
+ @include insetShadow();
385
+ box-shadow: $--stack-tab-shadow-left-inset;
386
+ }
387
+ &-right::after {
388
+ @include insetShadow();
389
+ box-shadow: $--stack-tab-shadow-right-inset;
390
+ }
391
+ &-all::after {
392
+ @include insetShadow();
393
+ box-shadow: $--stack-tab-shadow-left-inset, $--stack-tab-shadow-right-inset;
394
+ }
395
+ }