vue-stack-tabs 1.4.1 → 2.2.0

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 (50) hide show
  1. package/README.en.md +1 -0
  2. package/README.md +1 -0
  3. package/README.ru.md +1 -0
  4. package/dist/StackTabs.vue.d.ts +3 -0
  5. package/dist/components/ContextMenu/ContextMenuItem.vue.d.ts +1 -1
  6. package/dist/hooks/tabPanel/pageComponentFactory.d.ts +5 -2
  7. package/dist/hooks/tabPanel/refresh.d.ts +8 -3
  8. package/dist/hooks/tabPanel/tabStore.d.ts +80 -0
  9. package/dist/hooks/useTabActions.d.ts +1 -0
  10. package/dist/hooks/useTabPanel.d.ts +27 -5
  11. package/dist/model/TabModel.d.ts +5 -0
  12. package/dist/style.css +1 -1
  13. package/dist/utils/tabInfoEncoder.d.ts +10 -0
  14. package/dist/utils/urlParser.d.ts +14 -3
  15. package/dist/vue-stack-tabs.es.js +1 -1
  16. package/package.json +4 -7
  17. package/src/lib/StackTabs.vue +24 -2
  18. package/src/lib/assets/image/close_all.svg +1 -9
  19. package/src/lib/assets/image/close_lefts.svg +1 -1
  20. package/src/lib/assets/image/close_other.svg +1 -1
  21. package/src/lib/assets/image/close_rights.svg +1 -1
  22. package/src/lib/assets/image/reload.svg +1 -3
  23. package/src/lib/assets/image/reload_all.svg +1 -6
  24. package/src/lib/assets/style/common/mixins.scss +58 -19
  25. package/src/lib/assets/style/common/var.scss +100 -60
  26. package/src/lib/assets/style/icon.scss +31 -98
  27. package/src/lib/assets/style/index.scss +2 -2
  28. package/src/lib/assets/style/loading.scss +45 -0
  29. package/src/lib/assets/style/{stackTab.scss → stack-tab.scss} +105 -177
  30. package/src/lib/assets/style/transition.scss +12 -17
  31. package/src/lib/components/ContextMenu/ContextMenuItem.vue +5 -5
  32. package/src/lib/components/ContextMenu/index.vue +22 -19
  33. package/src/lib/components/PageLoading.vue +5 -5
  34. package/src/lib/components/StackKeepAlive/StackKeepAlive.vue +5 -3
  35. package/src/lib/components/TabHeader/TabHeaderItem.vue +13 -7
  36. package/src/lib/components/TabHeader/TabHeaderScroll.vue +8 -6
  37. package/src/lib/components/TabHeader/index.vue +16 -2
  38. package/src/lib/hooks/tabPanel/pageComponentFactory.tsx +96 -26
  39. package/src/lib/hooks/tabPanel/refresh.ts +40 -18
  40. package/src/lib/hooks/tabPanel/tabStore.ts +665 -0
  41. package/src/lib/hooks/useContextMenu.ts +1 -1
  42. package/src/lib/hooks/useIframeManager.ts +10 -3
  43. package/src/lib/hooks/useTabActions.ts +10 -6
  44. package/src/lib/hooks/useTabPanel.tsx +325 -195
  45. package/src/lib/hooks/useTabRouter.ts +50 -48
  46. package/src/lib/model/TabModel.ts +5 -0
  47. package/src/lib/utils/tabInfoEncoder.ts +101 -17
  48. package/src/lib/utils/urlParser.ts +35 -11
  49. package/dist/vue-stack-tabs.css +0 -2
  50. package/src/lib/assets/style/overlayer.scss +0 -46
@@ -1,63 +1,51 @@
1
1
  @use 'sass:math';
2
2
  @use 'common/var' as *;
3
- @use 'common/mixins';
3
+ @use 'common/mixins' as *;
4
4
 
5
5
  .stack-tab {
6
6
  display: flex;
7
7
  min-height: 300px;
8
8
  background-color: $stack-tab-background-color-base;
9
9
  flex-direction: column;
10
- grid-gap: 5px;
10
+ gap: 5px;
11
11
 
12
12
  &__container {
13
13
  flex: 1 1 0;
14
14
  position: relative;
15
15
  overflow: hidden;
16
16
  }
17
+
17
18
  &__keep-alive-panel {
18
- position: absolute;
19
- top: 0;
20
- left: 0;
21
- width: 100%;
22
- height: 100%;
19
+ @include absolute-fill;
23
20
  }
24
21
 
25
- /*缓存页面wrapper*/
26
- .cache-page-wrapper {
22
+ // 缓存页面 wrapper
23
+ &__cache-page-wrapper {
27
24
  width: 100%;
28
25
  height: 100%;
29
26
  }
30
- &__maximum {
27
+
28
+ &--maximum {
29
+ position: fixed;
30
+ inset: 0;
31
31
  width: 100vw !important;
32
32
  height: 100vh !important;
33
- top: 0;
34
- left: 0;
35
- position: fixed;
36
33
  }
37
34
 
38
- //蒙版按钮
35
+ // 蒙版按钮
39
36
  &__mask-button {
40
37
  height: 100%;
41
38
  width: $stack-tab-button-size;
42
- background-color: $stack-tab-text-color;
43
39
  margin: 0 5px;
44
- transition: $stack-tab__trans;
40
+ @include icon-button-color;
45
41
 
46
42
  .stack-tab__header-button[disabled] & {
47
43
  cursor: not-allowed;
48
44
  background-color: $stack-tab-color-disabled;
49
45
  transition: none;
50
- //pointer-events: none;
51
- }
52
- &:hover {
53
- background-color: $stack-tab-color-primary;
54
- }
55
-
56
- &:active {
57
- // cursor: pointer;
58
- background-color: $stack-tab-color-primary-activate;
59
46
  }
60
47
  }
48
+
61
49
  &__button {
62
50
  height: $stack-tab-button-size;
63
51
  width: $stack-tab-button-size;
@@ -71,9 +59,8 @@
71
59
  height: $stack-tab-head-height;
72
60
  border-bottom: 1px solid $stack-tab-border-color;
73
61
  box-sizing: border-box;
74
- //user-select: none;
75
62
 
76
- //tab header上面的按钮
63
+ // tab header 上面的按钮
77
64
  &-button {
78
65
  z-index: 2;
79
66
  height: $stack-tab-head-height;
@@ -83,14 +70,11 @@
83
70
  cursor: pointer;
84
71
  display: flex;
85
72
  align-items: center;
86
- border: 0;
87
73
  padding: 0;
88
74
  color: inherit;
89
- font: inherit;
90
- text-align: inherit;
91
- appearance: none;
75
+ @include button-reset;
92
76
 
93
- //按钮禁用样式
77
+ // 按钮禁用样式
94
78
  &[disabled] {
95
79
  background-color: $stack-tab-background-color-inactive;
96
80
  box-shadow: none;
@@ -98,7 +82,8 @@
98
82
  }
99
83
  }
100
84
  }
101
- //tab header上的滚动条
85
+
86
+ // tab header 上的滚动条
102
87
  &__scroll {
103
88
  position: relative;
104
89
  flex: 1 1 0;
@@ -111,55 +96,54 @@
111
96
  overflow: hidden;
112
97
 
113
98
  // 移动设备原生滚动
114
- &.is-mobile {
99
+ &--mobile {
115
100
  overflow-x: auto;
116
101
  overflow-y: hidden;
117
102
  }
118
103
  }
119
104
  }
105
+
120
106
  &__scrollbar {
121
107
  position: absolute;
122
108
  right: 0;
123
109
  bottom: 0;
124
110
  left: 0;
125
- /*z-index: 2;*/
126
111
  height: $stack-tab-scroll-height;
127
- background-color: rgb(0 0 0 / 10%);
112
+ background-color: $stack-tab-color-scrollbar;
128
113
  border-radius: $stack-tab-scroll-border-radius;
129
114
  opacity: 0;
130
- transition: $stack-tab__trans;
115
+ transition: $stack-tab-transition-fast;
131
116
 
132
117
  .stack-tab__scroll:hover &,
133
- &.is-dragging {
118
+ &--dragging {
134
119
  opacity: 1;
135
120
  }
136
121
  }
122
+
137
123
  &__scrollbar-thumb {
138
124
  position: absolute;
139
125
  top: 0;
140
126
  left: 0;
141
127
  height: 100%;
142
- background-color: rgba(0, 0, 0, 0.1);
143
-
128
+ background-color: $stack-tab-color-scrollbar;
144
129
  border-radius: $stack-tab-scroll-border-radius;
145
- transition: background-color 0.3s ease-in-out;
130
+ transition: background-color $stack-tab-transition-duration ease-in-out;
146
131
 
147
132
  &:hover {
148
133
  cursor: grab;
134
+
149
135
  &:active {
150
136
  cursor: grabbing;
151
137
  }
152
138
  }
153
139
 
154
- .stack-tab__scrollbar.is-dragging &,
140
+ .stack-tab__scrollbar--dragging &,
155
141
  &:hover {
156
142
  background-color: $stack-tab-color-primary !important;
157
143
  }
158
144
  }
159
145
 
160
- /*
161
- 页签导航
162
- */
146
+ // 页签导航
163
147
  &__nav {
164
148
  position: relative;
165
149
  display: inline-flex;
@@ -171,9 +155,7 @@
171
155
  content-visibility: auto;
172
156
  }
173
157
 
174
- /*
175
- 页签项
176
- */
158
+ // 页签项
177
159
  &__item {
178
160
  position: relative;
179
161
  display: flex;
@@ -184,8 +166,8 @@
184
166
  background-color: $stack-tab-background-color-inactive;
185
167
  border: $stack-tab-border;
186
168
  border-left: none;
187
- border-radius: 8px 8px 0 0;
188
- transition: $stack-tab__trans;
169
+ border-radius: $stack-tab-tab-radius;
170
+ transition: $stack-tab-transition-fast;
189
171
  user-select: none;
190
172
  flex: none;
191
173
  align-items: center;
@@ -197,12 +179,12 @@
197
179
  border-left: $stack-tab-border;
198
180
  }
199
181
 
200
- &.is-dragging {
182
+ &--dragging {
201
183
  opacity: 0.55;
202
184
  }
203
185
 
204
- &.is-drop-before::before,
205
- &.is-drop-after::after {
186
+ &--drop-before::before,
187
+ &--drop-after::after {
206
188
  position: absolute;
207
189
  z-index: 2;
208
190
  top: 2px;
@@ -214,37 +196,37 @@
214
196
  box-shadow: 0 0 6px rgba($stack-tab-color-primary, 0.8);
215
197
  }
216
198
 
217
- &.is-drop-before::before {
199
+ &--drop-before::before {
218
200
  left: -3px;
219
201
  }
220
202
 
221
- &.is-drop-after::after {
203
+ &--drop-after::after {
222
204
  right: -3px;
223
205
  }
224
206
 
225
- /*
226
- 激活右键菜单的页签
227
- */
228
- &.is-contextmenu {
229
- color: #000;
207
+ // 激活右键菜单的页签
208
+ &--context-menu {
209
+ color: $stack-tab-color-black;
230
210
  }
231
211
 
232
- /*
233
- 激活的页签
234
- */
235
- &.is-active {
212
+ // 激活的页签
213
+ &--active {
236
214
  z-index: 1;
237
215
  background-color: $stack-tab-background-color-base;
238
- border-bottom-color: #fff;
216
+ border-bottom-color: $stack-tab-background-color-base;
239
217
  box-shadow: $stack-tab-shadow-left, $stack-tab-shadow-right;
240
218
  margin-top: unset;
241
219
  }
242
220
 
243
221
  &:hover,
244
- &.is-active {
222
+ &--active {
245
223
  color: $stack-tab-color-primary;
224
+ }
246
225
 
247
- &.is-icon {
226
+ // 可关闭标签在悬停/激活时给关闭按钮腾出空间
227
+ &--closable {
228
+ &:hover,
229
+ &.stack-tab__item--active {
248
230
  padding: 0
249
231
  ($stack-tab-padding - math.div($stack-tab-button-size + $stack-tab-icon-margin, 2));
250
232
 
@@ -260,20 +242,15 @@
260
242
  flex: 1 1 auto;
261
243
  min-width: 0;
262
244
  height: 100%;
263
- padding: 0;
264
- color: inherit;
265
245
  cursor: inherit;
266
246
  background: transparent;
267
- border: 0;
268
- font: inherit;
269
- text-align: inherit;
270
- appearance: none;
247
+ padding: 0;
248
+ color: inherit;
249
+ @include button-reset;
271
250
  align-items: center;
272
251
  }
273
252
 
274
- /*
275
- 页签标题
276
- */
253
+ // 页签标题
277
254
  &-title {
278
255
  flex: 1 1 0;
279
256
  display: flex;
@@ -287,41 +264,23 @@
287
264
  }
288
265
  }
289
266
 
290
- /*
291
- 页签图标
292
- */
267
+ // 页签图标
293
268
  &-icon {
294
269
  margin-right: 5px;
295
270
  font-size: 16px;
296
271
  }
297
- /*
298
- 页答按钮
299
- */
272
+
273
+ // 页签按钮
300
274
  &-button {
301
275
  height: 100%;
302
276
  width: 0;
303
- background-color: $stack-tab-text-color;
304
- transition: $stack-tab__trans;
305
- border: 0;
306
- font: inherit;
307
- appearance: none;
308
277
  padding: 0;
309
-
310
- &:hover {
311
- background-color: $stack-tab-color-primary;
312
- }
313
-
314
- &:active {
315
- /*
316
- cursor: pointer;
317
- */
318
- background-color: $stack-tab-color-primary-activate;
319
- }
278
+ @include button-reset;
279
+ @include icon-button-color;
320
280
  }
321
281
  }
322
- /*
323
- 角徽样式
324
- */
282
+
283
+ // 角徽样式
325
284
  &__badge {
326
285
  position: relative;
327
286
  display: inline-block;
@@ -335,87 +294,63 @@
335
294
  padding: 0.3rem;
336
295
  font-size: 0.5rem;
337
296
  line-height: 0.4rem;
338
- color: #fff;
297
+ color: $stack-tab-color-white;
339
298
  text-align: center;
340
299
  border: 1px solid $stack-tab-background-color-base;
341
300
  border-radius: 0.5rem;
342
301
  transform: translateX(100%) translateY(-50%);
343
302
  box-sizing: border-box;
344
303
 
345
- &.default {
304
+ &--default {
346
305
  background: $stack-tab-color-danger;
347
306
  }
348
307
 
349
- &.primary {
308
+ &--primary {
350
309
  background: $stack-tab-color-primary;
351
310
  }
352
311
  }
353
312
  }
354
313
 
355
314
  &__iframes {
356
- position: absolute;
357
- top: 0;
358
- left: 0;
359
- width: 100%;
360
- height: 100%;
315
+ @include absolute-fill;
361
316
  pointer-events: none;
362
317
  }
363
318
 
364
319
  &__iframe-wrapper {
365
- position: absolute;
366
- top: 0;
367
- left: 0;
368
- width: 100%;
369
- height: 100%;
370
- pointer-events: auto; /* 恢复鼠标事件,允许与 iframe 交互 */
320
+ @include absolute-fill;
321
+ pointer-events: auto; // 恢复鼠标事件,允许与 iframe 交互
371
322
  }
372
323
 
373
324
  &__iframe {
374
- position: absolute;
375
- top: 0;
376
- left: 0;
377
- width: 100%;
378
- height: 100%;
325
+ @include absolute-fill;
379
326
  border: 0;
380
327
  }
381
328
 
382
329
  &__iframe-loading {
383
- position: absolute;
384
- top: 0;
385
- left: 0;
330
+ @include absolute-fill;
331
+ @include flex-center;
386
332
  z-index: 1;
387
- display: flex;
388
- align-items: center;
389
- justify-content: center;
390
- width: 100%;
391
- height: 100%;
392
- background: var(--stack-tab-iframe-loading-bg, #f5f5f5);
333
+ background: var(--stack-tab-iframe-loading-bg, #{$stack-tab-iframe-loading-bg});
393
334
 
394
335
  &-text {
395
- color: var(--stack-tab-iframe-loading-color, #999);
396
- font-size: var(--stack-tab-font-size, 14px);
336
+ color: var(--stack-tab-iframe-loading-color, #{$stack-tab-iframe-loading-color});
337
+ font-size: var(--stack-tab-font-size, #{$stack-tab-font-size});
397
338
  }
398
339
  }
399
340
 
400
341
  &__iframe-error {
401
- position: absolute;
402
- top: 0;
403
- left: 0;
342
+ @include absolute-fill;
343
+ @include flex-center;
404
344
  z-index: 2;
405
- display: flex;
406
345
  gap: 8px;
407
- align-items: center;
408
- justify-content: center;
409
- width: 100%;
410
- height: 100%;
411
346
  padding: 16px;
412
347
  pointer-events: auto;
413
- background: var(--stack-tab-iframe-error-bg, rgb(255 255 255 / 92%));
348
+ background: var(--stack-tab-iframe-error-bg, #{$stack-tab-iframe-error-bg});
414
349
  box-sizing: border-box;
415
350
 
416
351
  &-text {
417
- color: var(--stack-tab-iframe-error-color, #666);
418
- font-size: var(--stack-tab-font-size, 14px);
352
+ color: var(--stack-tab-iframe-error-color, #{$stack-tab-iframe-error-color});
353
+ font-size: var(--stack-tab-font-size, #{$stack-tab-font-size});
419
354
  }
420
355
 
421
356
  &-retry,
@@ -429,18 +364,17 @@
429
364
  font: inherit;
430
365
  }
431
366
  }
432
- /*
433
- 右键菜单
434
- */
435
- &__contextmenu {
367
+
368
+ // 右键菜单
369
+ &__context-menu {
436
370
  position: fixed;
437
371
  z-index: 999;
438
372
  min-width: 120px;
439
373
  padding: 8px;
440
374
  font-size: $stack-tab-font-size;
441
- background: #fff;
375
+ background: $stack-tab-background-color-base;
442
376
  border: $stack-tab-border;
443
- border-radius: 10px 0;
377
+ border-radius: $stack-tab-contextmenu-radius;
444
378
  box-shadow: $stack-tab-shadow-context-menu;
445
379
  transform-origin: left top;
446
380
 
@@ -452,17 +386,14 @@
452
386
  width: 100%;
453
387
  min-height: 30px;
454
388
  margin: 0;
389
+ @include button-reset;
455
390
  padding: 0 10px;
456
391
  line-height: 30px;
457
- font: inherit;
458
- text-align: inherit;
459
- appearance: none;
460
392
  box-sizing: border-box;
461
393
  color: $stack-tab-text-color;
462
394
  cursor: pointer;
463
395
  background: transparent;
464
- border: 0;
465
- border-radius: 10px 0;
396
+ border-radius: $stack-tab-contextmenu-radius;
466
397
  // 仅过渡悬停态实际会改变的颜色,避免触发菜单布局与合成层的无关动画。
467
398
  transition:
468
399
  color 0.2s ease-in-out,
@@ -475,7 +406,7 @@
475
406
  color: $stack-tab-color-white;
476
407
  background-color: $stack-tab-color-primary;
477
408
 
478
- .svg-mask {
409
+ .stack-tab__icon--mask {
479
410
  background-color: $stack-tab-color-white;
480
411
  }
481
412
  }
@@ -490,7 +421,7 @@
490
421
  cursor: default;
491
422
  background: none;
492
423
 
493
- .svg-mask {
424
+ .stack-tab__icon--mask {
494
425
  background-color: $stack-tab-color-disabled;
495
426
  }
496
427
  }
@@ -501,7 +432,7 @@
501
432
  height: $stack-tab-font-size;
502
433
  transition: background-color 0.2s ease-in-out;
503
434
 
504
- &.svg-mask {
435
+ &.stack-tab__icon--mask {
505
436
  width: $stack-tab-font-size;
506
437
  height: $stack-tab-font-size;
507
438
  background-color: $stack-tab-text-color;
@@ -518,32 +449,29 @@
518
449
  box-shadow: $stack-tab-shadow-right;
519
450
  }
520
451
 
521
- /**
522
- 内阴影
523
- */
452
+ // 内阴影
524
453
  .stack-tab__shadow-inset {
525
- &-left::after {
526
- @include mixins.insetShadow();
527
- box-shadow: $stack-tab-shadow-left-inset;
454
+ &-left {
455
+ @include inset-shadow($stack-tab-shadow-left-inset);
528
456
  }
529
- &-right::after {
530
- @include mixins.insetShadow();
531
- box-shadow: $stack-tab-shadow-right-inset;
457
+
458
+ &-right {
459
+ @include inset-shadow($stack-tab-shadow-right-inset);
532
460
  }
533
- &-all::after {
534
- @include mixins.insetShadow();
535
- box-shadow: $stack-tab-shadow-left-inset, $stack-tab-shadow-right-inset;
461
+
462
+ &-all {
463
+ @include inset-shadow($stack-tab-shadow-left-inset, $stack-tab-shadow-right-inset);
536
464
  }
537
- &-top::after {
538
- @include mixins.insetShadow();
539
- box-shadow: $stack-tab-shadow-top-inset;
465
+
466
+ &-top {
467
+ @include inset-shadow($stack-tab-shadow-top-inset);
540
468
  }
541
- &-bottom::after {
542
- @include mixins.insetShadow();
543
- box-shadow: $stack-tab-shadow-bottom-inset;
469
+
470
+ &-bottom {
471
+ @include inset-shadow($stack-tab-shadow-bottom-inset);
544
472
  }
545
- &-vertical::after {
546
- @include mixins.insetShadow();
547
- box-shadow: $stack-tab-shadow-top-inset, $stack-tab-shadow-bottom-inset;
473
+
474
+ &-vertical {
475
+ @include inset-shadow($stack-tab-shadow-top-inset, $stack-tab-shadow-bottom-inset);
548
476
  }
549
477
  }
@@ -1,10 +1,10 @@
1
- /*
2
- transition 过渡样式
3
- */
1
+ @use 'common/var' as *;
2
+
3
+ // 缩放淡入
4
4
  .stack-tab-zoom {
5
5
  &-enter-active,
6
6
  &-leave-active {
7
- transition: all 0.3s ease-in-out;
7
+ transition: $stack-tab-transition-slide;
8
8
  }
9
9
 
10
10
  &-enter-from,
@@ -14,16 +14,12 @@ transition 过渡样式
14
14
  }
15
15
  }
16
16
 
17
- /*
18
- 页面交换
19
- */
17
+ // 前进:从右向左滑入
20
18
  .stack-tab-swap {
21
- $trans: 30px;
22
-
23
19
  &-move,
24
20
  &-enter-active,
25
21
  &-leave-active {
26
- transition: all 0.3s ease-in-out;
22
+ transition: $stack-tab-transition-slide;
27
23
  }
28
24
 
29
25
  &-enter-from,
@@ -32,20 +28,19 @@ transition 过渡样式
32
28
  }
33
29
 
34
30
  &-enter-from {
35
- transform: translateX($trans);
31
+ transform: translateX($stack-tab-transition-slide-distance);
36
32
  }
37
33
 
38
34
  &-leave-to {
39
- transform: translateX(-$trans);
35
+ transform: translateX(-$stack-tab-transition-slide-distance);
40
36
  }
41
37
  }
42
38
 
39
+ // 后退:从左向右滑入
43
40
  .stack-tab-swap-back {
44
- $trans: 30px;
45
-
46
41
  &-enter-active,
47
42
  &-leave-active {
48
- transition: all 0.3s ease-in-out;
43
+ transition: $stack-tab-transition-slide;
49
44
  }
50
45
 
51
46
  &-enter-from,
@@ -54,10 +49,10 @@ transition 过渡样式
54
49
  }
55
50
 
56
51
  &-enter-from {
57
- transform: translateX(-$trans);
52
+ transform: translateX(-$stack-tab-transition-slide-distance);
58
53
  }
59
54
 
60
55
  &-leave-to {
61
- transform: translateX($trans);
56
+ transform: translateX($stack-tab-transition-slide-distance);
62
57
  }
63
58
  }
@@ -4,16 +4,16 @@
4
4
  职责:展示图标和标题,支持 disabled 状态
5
5
  -->
6
6
  <template>
7
- <button type="button" role="menuitem" class="stack-tab__contextmenu-item" :disabled="disabled">
8
- <span class="stack-tab__contextmenu-icon" :class="icon" aria-hidden="true" />
9
- <span class="stack-tab__contextmenu-title" @contextmenu.prevent>{{ title }}</span>
7
+ <button type="button" role="menuitem" class="stack-tab__context-menu-item" :disabled="disabled">
8
+ <span class="stack-tab__context-menu-icon" :class="icon" aria-hidden="true" />
9
+ <span class="stack-tab__context-menu-title" @contextmenu.prevent>{{ title }}</span>
10
10
  </button>
11
11
  </template>
12
12
 
13
13
  <script setup lang="ts">
14
14
  withDefaults(
15
15
  defineProps<{
16
- /** 图标 class,如 stack-tab__icon-reload svg-mask */
16
+ /** 图标 class,如 stack-tab__icon stack-tab__icon--reload stack-tab__icon--mask */
17
17
  icon?: string
18
18
  /** 显示文本 */
19
19
  title: string
@@ -28,7 +28,7 @@ withDefaults(
28
28
  </script>
29
29
 
30
30
  <style lang="scss" scoped>
31
- .stack-tab__contextmenu-title {
31
+ .stack-tab__context-menu-title {
32
32
  margin-left: 8px;
33
33
  }
34
34
  </style>