@pubinfo/core 2.0.0-beta.31 → 2.0.0-beta.33

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 (124) hide show
  1. package/dist/{AppSetting-C1dyZ-8E.js → AppSetting-DhcdApoo.js} +17 -17
  2. package/dist/{HCheckList.vue_vue_type_script_setup_true_lang-B3wESRn7.js → HCheckList.vue_vue_type_script_setup_true_lang-Bi9jyf-Y.js} +2 -2
  3. package/dist/HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js +20 -0
  4. package/dist/HToggle-Di3WNnzE.js +34 -0
  5. package/dist/{PreferencesContent-DgycKl9e.js → PreferencesContent-BdSTTSM-.js} +6 -6
  6. package/dist/{SettingBreadcrumb-BlgX0ZNE.js → SettingBreadcrumb-ChQx96br.js} +8 -8
  7. package/dist/{SettingCopyright-FmqadL1w.js → SettingCopyright-CkMab5VK.js} +8 -8
  8. package/dist/{SettingEnableTransition-dzMgw8cN.js → SettingEnableTransition-BSXU87vT.js} +15 -15
  9. package/dist/{SettingHome-BwlXsTTt.js → SettingHome-DwioPezC.js} +13 -13
  10. package/dist/{SettingMenu-B5tHMS24.js → SettingMenu-yvKu7Yoq.js} +25 -25
  11. package/dist/{SettingMode-Bh0mvh66.js → SettingMode-C99ADNad.js} +6 -6
  12. package/dist/{SettingNavSearch-D4g24uwl.js → SettingNavSearch-mURLLetZ.js} +8 -8
  13. package/dist/{SettingOther-DwTtu6As.js → SettingOther-BGoSdp7a.js} +9 -9
  14. package/dist/{SettingPage-cDQXtwcG.js → SettingPage-Wwy5PtzC.js} +7 -7
  15. package/dist/{SettingTabbar-m8X7jEJH.js → SettingTabbar-C2ya4r4U.js} +9 -9
  16. package/dist/{SettingThemes-CX9ISeD_.js → SettingThemes-7oYUooGR.js} +27 -27
  17. package/dist/{SettingToolbar-ByLjBezg.js → SettingToolbar-A6OiGfAD.js} +5 -5
  18. package/dist/{SettingTopbar-o8wBZolp.js → SettingTopbar-GDEPltxm.js} +9 -9
  19. package/dist/{SettingWidthMode-Ux60mKiv.js → SettingWidthMode-qwkmTFIK.js} +15 -15
  20. package/dist/{TopThinMode-17GrCZdo.js → TopThinMode-BkmPN66X.js} +1 -1
  21. package/dist/{_...all_-6l5FWUkL.js → _...all_-CdjdWhUr.js} +5 -5
  22. package/dist/assets/styles/index.d.ts +3 -3
  23. package/dist/{colors-DiWJrScm.js → colors-7rGvqeKK.js} +1 -1
  24. package/dist/{index-CfasTv4x.js → index-BC-gcL8e.js} +4 -4
  25. package/dist/{index-Md7zV10q.js → index-C-6XxK2D.js} +5 -5
  26. package/dist/{index-bsi-FZDt.js → index-CgLD0zqO.js} +169 -169
  27. package/dist/{index-BmMbAV1Y.js → index-CtyzB2cq.js} +13 -13
  28. package/dist/{index-Ckgil96Y.js → index-Cw1uN5m-.js} +2 -2
  29. package/dist/{index-Be7jJtXg.js → index-DVUDANdM.js} +5 -5
  30. package/dist/{index-Dzwhw1L9.js → index-Dpq4uqWd.js} +22 -22
  31. package/dist/{index-DgpcBgWl.js → index-DuoLZ3r3.js} +4394 -4294
  32. package/dist/{index-De_ME_Ws.js → index-sYaQXYQC.js} +2 -2
  33. package/dist/index.js +4 -4
  34. package/dist/{index.vue_vue_type_style_index_0_scoped_fa1c6ee4_lang-B3Eieo0k.js → index.vue_vue_type_style_index_0_scoped_051f4e99_lang-CuU-JtjC.js} +870 -856
  35. package/dist/interface.d.ts +17 -2
  36. package/dist/layout/ui-kit/HDialog.vue.d.ts +1 -1
  37. package/dist/layout/ui-kit/HSlideover.vue.d.ts +1 -1
  38. package/dist/layout/ui-kit/HTooltip.vue.d.ts +1 -1
  39. package/dist/{menu-CC5544p-.js → menu-BL6hH6OM.js} +1862 -1856
  40. package/dist/{pick-CJo2YiT-.js → pick-CAmKymZJ.js} +1 -1
  41. package/dist/request.js +34 -32
  42. package/dist/stores/plugin/persist.d.ts +2 -2
  43. package/dist/style.css +3 -3
  44. package/package.json +25 -26
  45. package/src/assets/styles/globals.css +188 -0
  46. package/src/assets/styles/index.ts +3 -3
  47. package/src/assets/styles/nprogress.css +68 -0
  48. package/src/assets/styles/rbac.css +51 -0
  49. package/src/assets/styles/resources/utils.css +53 -0
  50. package/src/assets/styles/resources/variables.css +5 -0
  51. package/src/components/NotAllowed/index.vue +4 -6
  52. package/src/components/PassStrengthValidator/index.vue +33 -48
  53. package/src/components/PassStrengthValidator/rule.vue +13 -25
  54. package/src/components/PubinfoIcon/index.vue +4 -8
  55. package/src/composables/watchDiff.ts +1 -1
  56. package/src/create.ts +10 -3
  57. package/src/interface.ts +24 -2
  58. package/src/layout/Layout.vue +113 -161
  59. package/src/layout/components/Content/IframeView.vue +1 -2
  60. package/src/layout/components/Content/LinkView.vue +2 -2
  61. package/src/layout/components/Content/index.vue +1 -2
  62. package/src/layout/components/Copyright/index.vue +7 -8
  63. package/src/layout/components/Header/TopMode/More.vue +24 -32
  64. package/src/layout/components/Header/TopMode/NotCursor.vue +20 -29
  65. package/src/layout/components/Header/TopMode/index.vue +1 -1
  66. package/src/layout/components/Header/index.vue +118 -206
  67. package/src/layout/components/Logo/index.vue +4 -19
  68. package/src/layout/components/Menu/item.vue +16 -25
  69. package/src/layout/components/SettingBar/AppSetting.vue +11 -11
  70. package/src/layout/components/SettingBar/components/DayNightToggle.vue +26 -120
  71. package/src/layout/components/SettingBar/components/SettingEnableTransition.vue +111 -136
  72. package/src/layout/components/SettingBar/components/SettingMode.vue +78 -88
  73. package/src/layout/components/SettingBar/components/SettingThemes.vue +48 -85
  74. package/src/layout/components/SettingBar/components/SettingWidthMode.vue +63 -71
  75. package/src/layout/components/SettingBar/index.vue +29 -62
  76. package/src/layout/components/Sidebar/MainSidebar.vue +81 -126
  77. package/src/layout/components/Sidebar/SubSidebar.vue +50 -59
  78. package/src/layout/components/Tools/Breadcrumb/index.vue +6 -12
  79. package/src/layout/components/Tools/DayNightSwitch.vue +40 -63
  80. package/src/layout/components/Tools/Preferences/PreferencesContent.vue +210 -277
  81. package/src/layout/components/Tools/Search.vue +5 -5
  82. package/src/layout/components/Tools/index.vue +1 -1
  83. package/src/layout/components/Topbar/Tabbar/MoreAction.vue +98 -145
  84. package/src/layout/components/Topbar/Tabbar/index.vue +259 -395
  85. package/src/layout/components/Topbar/Toolbar/Favorites.vue +4 -4
  86. package/src/layout/components/Topbar/Toolbar/index.vue +39 -56
  87. package/src/layout/components/Topbar/index.vue +16 -19
  88. package/src/layout/composables/useContext.ts +1 -1
  89. package/src/layout/composables/useMenu.ts +1 -1
  90. package/src/layout/composables/useTabbar.ts +1 -1
  91. package/src/layout/composables/useTitle.ts +1 -1
  92. package/src/layout/provider.ts +1 -1
  93. package/src/layout/ui-kit/HDialog.vue +1 -1
  94. package/src/layout/ui-kit/HDivider.vue +6 -35
  95. package/src/layout/ui-kit/HSlideover.vue +1 -1
  96. package/src/layout/ui-kit/HToggle.vue +49 -93
  97. package/src/layout/ui-kit/HTooltip.vue +1 -1
  98. package/src/locales/index.ts +1 -1
  99. package/src/pages/personal/profile/index.vue +1 -1
  100. package/src/pages/system/[...all].vue +4 -6
  101. package/src/pages/system/change-organization/index.vue +23 -37
  102. package/src/pages/system/change-password/components/ChangePasswordForm/index.vue +1 -1
  103. package/src/pages/system/change-password/index.vue +16 -29
  104. package/src/pages/system/not-permission/index.vue +4 -6
  105. package/src/route/guard/basic.ts +1 -1
  106. package/src/route/routes.ts +1 -1
  107. package/src/stores/modules/favorites.ts +1 -1
  108. package/src/stores/modules/menu.ts +1 -1
  109. package/src/stores/modules/route.ts +2 -2
  110. package/src/stores/modules/settings.ts +7 -7
  111. package/src/stores/modules/user.ts +2 -2
  112. package/src/stores/plugin/persist.ts +3 -3
  113. package/src/stores/plugin/sideEffect/tabbarStorage.ts +1 -1
  114. package/src/utils/crypto.ts +1 -1
  115. package/types/auto-imports.d.ts +1 -1
  116. package/types/components.d.ts +1 -0
  117. package/types/vue-router.d.ts +8 -8
  118. package/dist/HDivider-DgXBhPr0.js +0 -21
  119. package/dist/HToggle-Cd71WKvG.js +0 -34
  120. package/src/assets/styles/globals.scss +0 -189
  121. package/src/assets/styles/nprogress.scss +0 -63
  122. package/src/assets/styles/rbac.scss +0 -61
  123. package/src/assets/styles/resources/utils.scss +0 -53
  124. package/src/assets/styles/resources/variables.scss +0 -6
@@ -1,7 +1,5 @@
1
1
  <script setup lang="ts">
2
2
  import type { Tabbar } from '#/tabbar';
3
- import { PubinfoIcon } from '@/components';
4
- import { storage } from '@/utils';
5
3
  import ContextMenu from '@imengyu/vue3-context-menu';
6
4
  import { useMagicKeys } from '@vueuse/core';
7
5
  import hotkeys from 'hotkeys-js';
@@ -10,6 +8,8 @@ import { useI18n } from 'vue-i18n';
10
8
  import Message from 'vue-m-message';
11
9
  import RiCloseFill from '~icons/ri/close-fill';
12
10
  import RiPushpin2Fill from '~icons/ri/pushpin-2-fill';
11
+ import { PubinfoIcon } from '@/components';
12
+ import { storage } from '@/utils';
13
13
  import useMainPage from '../../..//composables/useMainPage';
14
14
  import useTabbar from '../../..//composables/useTabbar';
15
15
  import { useContext } from '../../../composables/useContext';
@@ -329,453 +329,317 @@ onUnmounted(() => {
329
329
  </div>
330
330
  </template>
331
331
 
332
- <style lang="scss">
333
- .tabbar-contextmenu {
334
- .mx-context-menu {
335
- --at-apply: fixed ring-1 ring-stone-2 dark-ring-stone-7 shadow-2xl;
332
+ <style>
333
+ .tabbar-contextmenu .mx-context-menu {
334
+ --at-apply: fixed ring-1 ring-stone-2 dark-ring-stone-7 shadow-2xl bg-[--g-container-bg];
335
+ }
336
336
 
337
- background-color: var(--g-container-bg);
337
+ .tabbar-contextmenu .mx-context-menu .mx-context-menu-items .mx-context-menu-item {
338
+ --at-apply: transition-background-color;
338
339
 
339
- .mx-context-menu-items .mx-context-menu-item {
340
- --at-apply: transition-background-color;
340
+ }
341
341
 
342
- &:not(.disabled):hover {
343
- --at-apply: cursor-pointer bg-stone-1 dark-bg-stone-9;
344
- }
342
+ .tabbar-contextmenu .mx-context-menu .mx-context-menu-items .mx-context-menu-item:not(.disabled):hover {
343
+ --at-apply: cursor-pointer bg-stone-1 dark:bg-stone-9;
344
+ }
345
345
 
346
- span {
347
- color: initial;
348
- }
346
+ .tabbar-contextmenu .mx-context-menu .mx-context-menu-items .mx-context-menu-item span {
347
+ --at-apply: text-initial;
348
+ }
349
349
 
350
- .icon {
351
- color: initial;
352
- }
350
+ .tabbar-contextmenu .mx-context-menu .mx-context-menu-items .mx-context-menu-item .icon {
351
+ --at-apply: text-initial;
352
+ }
353
353
 
354
- &.disabled span,
355
- &.disabled .icon {
356
- opacity: 0.25;
357
- }
358
- }
354
+ .tabbar-contextmenu .mx-context-menu .mx-context-menu-items .mx-context-menu-item.disabled span,
355
+ .tabbar-contextmenu .mx-context-menu .mx-context-menu-items .mx-context-menu-item.disabled .icon {
356
+ --at-apply: op-25;
357
+ }
359
358
 
360
- .mx-context-menu-item-sperator {
361
- background-color: var(--g-container-bg);
359
+ .tabbar-contextmenu .mx-context-menu .mx-context-menu-item-sperator {
360
+ --at-apply: bg-[--g-container-bg];
361
+ }
362
362
 
363
- &::after {
364
- --at-apply: bg-stone-2 dark-bg-stone-7;
365
- }
366
- }
367
- }
363
+ .tabbar-contextmenu .mx-context-menu .mx-context-menu-item-sperator::after {
364
+ --at-apply: bg-stone-2 dark-bg-stone-7;;
368
365
  }
369
366
  </style>
370
367
 
371
- <style lang="scss" scoped>
368
+ <style scoped>
372
369
  .tabbar-container {
373
- position: relative;
374
- height: var(--g-tabbar-height);
375
- background-color: var(--g-bg);
370
+ --at-apply: relative h-[--g-tabbar-height] bg-[--g-bg];
376
371
  transition: background-color 0.3s;
372
+ }
377
373
 
378
- .tabs {
379
- position: absolute;
380
- right: 0;
381
- left: 0;
382
- padding-inline-end: 50px;
383
- overflow-y: hidden;
384
- white-space: nowrap;
374
+ .tabs {
375
+ --at-apply: absolute right-0 left-0 overflow-y-hidden whitespace-nowrap;
376
+ padding-inline-end: 50px;
377
+ scrollbar-width: none;
378
+ }
385
379
 
386
- // firefox隐藏滚动条
387
- scrollbar-width: none;
380
+ .tabs::-webkit-scrollbar {
381
+ --at-apply: hidden;
382
+ }
388
383
 
389
- // chrome隐藏滚动条
390
- &::-webkit-scrollbar {
391
- display: none;
392
- }
384
+ .tabs.tabs-ontop {
385
+ top: 0 !important;
386
+ bottom: inherit !important;
387
+ }
393
388
 
394
- &.tabs-ontop {
395
- top: 0 !important;
396
- bottom: inherit !important;
397
- }
389
+ .tab-container {
390
+ --at-apply: inline-block;
391
+ }
398
392
 
399
- .tab-container {
400
- display: inline-block;
401
-
402
- &::after {
403
- position: absolute;
404
- inset-inline-start: v-bind(activePseudoTabStart);
405
- bottom: 0;
406
- z-index: 10;
407
- width: v-bind(activePseudoTabWidth);
408
- content: "";
409
- transition: width 0.3s, inset-inline-start 0.3s;
410
- }
393
+ .tab-container::after {
394
+ --at-apply: absolute bottom-0 z-10 content-empty;
395
+ inset-inline-start: v-bind(activePseudoTabStart);
396
+ width: v-bind(activePseudoTabWidth);
397
+ transition: width 0.3s, inset-inline-start 0.3s;
398
+ }
411
399
 
412
- &:not(.dragging) {
413
- .tab {
414
- &:not(.actived):hover {
415
- z-index: 3;
416
-
417
- &::before,
418
- &::after {
419
- content: none;
420
- }
421
-
422
- & + .tab .tab-dividers::before {
423
- opacity: 0;
424
- }
425
-
426
- .tab-content {
427
- .title,
428
- .action-icon {
429
- color: var(--g-tabbar-tab-hover-color);
430
- }
431
- }
432
-
433
- .tab-background {
434
- background-color: var(--g-tabbar-tab-hover-bg);
435
- }
436
- }
437
- }
438
- }
400
+ .tab-container:not(.dragging) .tab:not(.actived):hover {
401
+ --at-apply: z-3;
402
+ }
439
403
 
440
- .tab {
441
- position: relative;
442
- display: inline-block;
443
- min-width: var(--g-tabbar-tab-min-width);
444
- max-width: var(--g-tabbar-tab-max-width);
445
- height: var(--g-tabbar-height);
446
- font-size: 14px;
447
- line-height: calc(var(--g-tabbar-height) - 2px);
448
- vertical-align: bottom;
449
- pointer-events: none;
450
- cursor: pointer;
451
-
452
- * {
453
- user-select: none;
454
- }
404
+ .tab-container:not(.dragging) .tab:not(.actived):hover::before,
405
+ .tab-container:not(.dragging) .tab:not(.actived):hover::after {
406
+ --at-apply: content-none;
407
+ }
455
408
 
456
- &.actived {
457
- z-index: 5;
409
+ .tab-container:not(.dragging) .tab:not(.actived):hover + .tab .tab-dividers::before {
410
+ --at-apply: op-0;
411
+ }
458
412
 
459
- &::before,
460
- &::after {
461
- content: none;
462
- }
413
+ .tab-container:not(.dragging) .tab:not(.actived):hover .tab-content .title,
414
+ .tab-container:not(.dragging) .tab:not(.actived):hover .tab-content .action-icon {
415
+ color: var(--g-tabbar-tab-hover-color);
416
+ }
463
417
 
464
- & + .tab .tab-dividers::before {
465
- opacity: 0;
466
- }
418
+ .tab-container:not(.dragging) .tab:not(.actived):hover .tab-background {
419
+ background-color: var(--g-tabbar-tab-hover-bg);
420
+ }
467
421
 
468
- .tab-content {
469
- .title,
470
- .action-icon {
471
- color: var(--g-tabbar-tab-active-color);
472
- }
473
- }
422
+ .tab {
423
+ --at-apply: relative inline-block text-14px cursor-pointer pointer-events-none
424
+ min-w-[--g-tabbar-tab-min-width] max-w-[--g-tabbar-tab-max-width] h-[--g-tabbar-height]
425
+ align-bottom;
426
+ line-height: calc(var(--g-tabbar-height) - 2px);
427
+ }
474
428
 
475
- .tab-background {
476
- background-color: var(--g-container-bg);
477
- }
478
- }
429
+ .tab * {
430
+ --at-apply: select-none;
431
+ }
479
432
 
480
- &.tab-ghost {
481
- opacity: 0 !important;
482
- }
433
+ .tab.actived {
434
+ --at-apply: z-5;
435
+ }
483
436
 
484
- .tab-dividers {
485
- position: absolute;
486
- inset-inline: -1px;
487
- top: 50%;
488
- z-index: 0;
489
- height: 14px;
490
- transform: translateY(-50%);
491
-
492
- &::before {
493
- position: absolute;
494
- inset-inline-start: 1px;
495
- top: 0;
496
- bottom: 0;
497
- display: block;
498
- width: 1px;
499
- content: "";
500
- background-color: var(--g-tabbar-dividers-bg);
501
- opacity: 1;
502
- transition: opacity 0.2s ease, background-color 0.3s;
503
- }
504
- }
437
+ .tab.actived::before,
438
+ .tab.actived::after {
439
+ --at-apply: content-none;
440
+ }
505
441
 
506
- &:first-child .tab-dividers::before {
507
- opacity: 0;
508
- }
442
+ .tab.actived + .tab .tab-dividers::before {
443
+ --at-apply: op-0;
444
+ }
509
445
 
510
- .tab-background {
511
- position: absolute;
512
- top: 0;
513
- left: 0;
514
- z-index: 0;
515
- width: 100%;
516
- height: 100%;
517
- pointer-events: none;
518
- transition: opacity 0.3s, background-color 0.3s;
519
- }
446
+ .tab.actived .tab-content .title,
447
+ .tab.actived .tab-content .action-icon {
448
+ color: var(--g-tabbar-tab-active-color);
449
+ }
520
450
 
521
- .tab-content {
522
- display: flex;
523
- width: 100%;
524
- height: 100%;
525
- pointer-events: all;
526
-
527
- .title {
528
- display: flex;
529
- flex: 1;
530
- gap: 5px;
531
- align-items: center;
532
- height: 100%;
533
- padding: 0 10px;
534
- margin-inline-end: 10px;
535
- overflow: hidden;
536
- color: var(--g-tabbar-tab-color);
537
- white-space: nowrap;
538
- mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
539
- transition: margin-inline-end 0.3s;
540
-
541
- [dir="rtl"] & {
542
- mask-image: linear-gradient(to left, #000 calc(100% - 20px), transparent);
543
- }
544
-
545
- &:has(+ .action-icon) {
546
- margin-inline-end: 28px;
547
- }
548
-
549
- .icon {
550
- flex-shrink: 0;
551
- }
552
- }
451
+ .tab.actived .tab-background {
452
+ background-color: var(--g-container-bg);
453
+ }
553
454
 
554
- .action-icon {
555
- position: absolute;
556
- inset-inline-end: 0.5em;
557
- top: 50%;
558
- z-index: 10;
559
- display: flex;
560
- align-items: center;
561
- justify-content: center;
562
- width: 1.5em;
563
- height: 1.5em;
564
- font-size: 12px;
565
- color: var(--g-tabbar-tab-color);
566
- border-radius: 50%;
567
- transform: translateY(-50%);
568
-
569
- &:hover {
570
- --at-apply: ring-1 ring-stone-3 dark-ring-stone-7;
571
-
572
- background-color: var(--g-bg);
573
- }
574
- }
455
+ .tab.tab-ghost {
456
+ opacity: 0 !important;
457
+ }
575
458
 
576
- .hotkey-number {
577
- --at-apply: ring-1 ring-stone-3 dark-ring-stone-7;
578
-
579
- position: absolute;
580
- top: 50%;
581
- right: 0.5em;
582
- z-index: 10;
583
- display: flex;
584
- align-items: center;
585
- justify-content: center;
586
- width: 1.5em;
587
- height: 1.5em;
588
- font-size: 12px;
589
- color: var(--g-tabbar-tab-color);
590
- background-color: var(--g-bg);
591
- border-radius: 50%;
592
- transform: translateY(-50%);
593
- }
459
+ .tab-dividers {
460
+ --at-apply: absolute z-0 h-3.5 -translate-y-2/4 top-2/4;
461
+ inset-inline: -1px;
462
+ }
594
463
 
595
- .drag-handle {
596
- position: absolute;
597
- inset: 0;
598
- z-index: 9;
599
- }
600
- }
601
- }
602
- }
464
+ .tab-dividers::before {
465
+ --at-apply: absolute block w-px content-empty opacity-100 inset-y-0
466
+ bg-[--g-tabbar-dividers-bg];
603
467
 
604
- &.tabs-fashion {
605
- bottom: 0;
606
-
607
- .tab-container {
608
- &:not(.dragging) {
609
- .tab:not(.actived):hover {
610
- .tab-background {
611
- &::before,
612
- &::after {
613
- box-shadow: 0 0 0 20px var(--g-tabbar-tab-hover-bg);
614
- }
615
- }
616
- }
617
- }
468
+ inset-inline-start: 1px;
469
+ transition: opacity 0.2s ease, background-color 0.3s;
470
+ }
618
471
 
619
- .tab {
620
- height: calc(var(--g-tabbar-height) - 10px);
621
- margin-inline: 10px -10px;
622
- line-height: calc(var(--g-tabbar-height) - 12px);
472
+ .tab:first-child .tab-dividers::before {
473
+ --at-apply: op-0;
474
+ }
623
475
 
624
- &:last-child {
625
- margin-inline-end: 0;
626
- }
476
+ .tab-background {
477
+ --at-apply: absolute z-0 w-full h-full pointer-events-none left-0 top-0;
478
+ transition: opacity 0.3s, background-color 0.3s;
479
+ }
627
480
 
628
- &.tab-ontop .tab-background {
629
- transform: rotate(180deg);
630
- }
481
+ .tab-content {
482
+ --at-apply: flex size-full;
483
+ pointer-events: all;
484
+ }
631
485
 
632
- .tab-background {
633
- border-radius: 10px 10px 0 0;
634
-
635
- &::before,
636
- &::after {
637
- position: absolute;
638
- bottom: 0;
639
- width: 20px;
640
- height: 20px;
641
- content: "";
642
- border-radius: 100%;
643
- box-shadow: 0 0 0 20px transparent;
644
- transition: box-shadow 0.3s;
645
- }
646
-
647
- &::before {
648
- left: -20px;
649
- clip-path: inset(50% -10px 0 50%);
650
- }
651
-
652
- &::after {
653
- right: -20px;
654
- clip-path: inset(50% 50% 0 -10px);
655
- }
656
- }
486
+ .tab-content .title {
487
+ --at-apply: flex flex-1 gap-[5px] items-center h-full overflow-hidden whitespace-nowrap px-2.5 py-0;
488
+ margin-inline-end: 10px;
489
+ color: var(--g-tabbar-tab-color);
490
+ mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
491
+ transition: margin-inline-end 0.3s;
492
+ }
657
493
 
658
- &.actived {
659
- .tab-background {
660
- &::before,
661
- &::after {
662
- box-shadow: 0 0 0 20px var(--g-container-bg);
663
- }
664
- }
665
- }
666
- }
667
- }
668
- }
494
+ [dir="rtl"] .tab-content .title {
495
+ mask-image: linear-gradient(to left, #000 calc(100% - 20px), transparent);
496
+ }
669
497
 
670
- &.tabs-card {
671
- .tab-container {
672
- .tab {
673
- height: calc(var(--g-tabbar-height) - 10px);
674
- margin: 5px 0 5px 5px;
498
+ .tab-content .title:has(+ .action-icon) {
499
+ margin-inline-end: 28px;
500
+ }
675
501
 
676
- .tab-dividers {
677
- display: none;
678
- }
502
+ .tab-content .title .icon {
503
+ flex-shrink: 0;
504
+ }
679
505
 
680
- .tab-background {
681
- border-radius: 5px;
682
- }
683
- }
684
- }
685
- }
506
+ .tab-content .action-icon {
507
+ --at-apply: absolute z-10 flex items-center justify-center w-[1.5em] h-[1.5em]
508
+ text-xs text-[--g-tabbar-tab-color] -translate-y-2/4 rounded-[50%] top-2/4;
509
+ inset-inline-end: 0.5em;
510
+ }
686
511
 
687
- &.tabs-square {
688
- .tab-container {
689
- &::after {
690
- height: 2px;
512
+ .tab-content .action-icon:hover {
513
+ background-color: var(--g-bg);
514
+ box-shadow: 0 0 0 1px var(--g-border-color);
515
+ }
691
516
 
692
- --at-apply: bg-ui-primary;
693
- }
517
+ .tab-content .hotkey-number {
518
+ --at-apply: absolute z-10 flex items-center justify-center w-[1.5em] h-[1.5em]
519
+ text-xs -translate-y-2/4 rounded-[50%] right-[0.5em] top-2/4
520
+ text-[--g-tabbar-tab-color] bg-[--g-bg];
521
+ box-shadow: 0 0 0 1px var(--g-border-color);
522
+ }
694
523
 
695
- &:has(> .tab.tab-ontop) {
696
- &::after {
697
- top: 0;
698
- bottom: unset;
699
- }
524
+ .tab-content .drag-handle {
525
+ --at-apply: absolute inset-0 z-9;
526
+ }
700
527
 
701
- .tab {
702
- .tab-background {
703
- top: 0;
704
- bottom: unset;
705
- }
706
- }
707
- }
528
+ /* Fashion 风格样式 */
529
+ .tabs.tabs-fashion {
530
+ --at-apply: bottom-0;
531
+ }
708
532
 
709
- .tab {
710
- &:not(.actived):hover {
711
- .tab-background {
712
- height: 100%;
713
- }
714
- }
533
+ .tabs.tabs-fashion .tab-container:not(.dragging) .tab:not(.actived):hover .tab-background::before,
534
+ .tabs.tabs-fashion .tab-container:not(.dragging) .tab:not(.actived):hover .tab-background::after {
535
+ box-shadow: 0 0 0 20px var(--g-tabbar-tab-hover-bg);
536
+ }
715
537
 
716
- .tab-background {
717
- top: unset;
718
- bottom: 0;
719
- height: 0;
720
- background-color: var(--g-tabbar-tab-hover-bg);
721
- transition: height 0.3s;
722
- }
538
+ .tabs.tabs-fashion .tab {
539
+ height: calc(var(--g-tabbar-height) - 10px);
540
+ margin-inline: 10px -10px;
541
+ line-height: calc(var(--g-tabbar-height) - 12px);
542
+ }
723
543
 
724
- &.actived {
725
- .tab-background {
726
- height: 100%;
727
- background-color: var(--g-container-bg);
728
- }
729
- }
730
- }
731
- }
732
- }
733
- }
544
+ .tabs.tabs-fashion .tab:last-child {
545
+ margin-inline-end: 0;
546
+ }
734
547
 
735
- .more-action {
736
- position: absolute;
737
- top: 0;
738
- right: 0;
739
- z-index: 10;
740
- display: flex;
741
- align-items: center;
742
- justify-content: center;
743
- width: 50px;
744
- height: 100%;
745
- background-image: linear-gradient(to right, transparent, var(--g-bg));
746
-
747
- .icon {
748
- --at-apply: w-6 h-6 rounded-1 text-lg cursor-pointer shadow transition-background-color transition-shadow;
749
-
750
- background-color: var(--g-container-bg);
751
- }
752
- }
548
+ .tabs.tabs-fashion .tab.tab-ontop .tab-background {
549
+ transform: rotate(180deg);
753
550
  }
754
551
 
755
- // 标签栏动画
756
- .tabs {
757
- .tabbar-move,
758
- .tabbar-enter-active,
759
- .tabbar-leave-active {
760
- transition: all 0.3s;
761
- }
552
+ .tabs.tabs-fashion .tab-background {
553
+ border-radius: 10px 10px 0 0;
554
+ }
762
555
 
763
- .tabbar-enter-from,
764
- .tabbar-leave-to {
765
- opacity: 0;
766
- transform: translateY(30px);
767
- }
556
+ .tabs.tabs-fashion .tab-background::before,
557
+ .tabs.tabs-fashion .tab-background::after {
558
+ --at-apply: absolute bottom-0 size-5 content-empty rounded-full;
559
+ box-shadow: 0 0 0 20px transparent;
560
+ transition: box-shadow 0.3s;
561
+ }
768
562
 
769
- &.tabs-ontop {
770
- .tabbar-enter-from,
771
- .tabbar-leave-to {
772
- opacity: 0;
773
- transform: translateY(-30px);
774
- }
775
- }
563
+ .tabs.tabs-fashion .tab-background::before {
564
+ left: -20px;
565
+ clip-path: inset(50% -10px 0 50%);
566
+ }
776
567
 
777
- .tabbar-leave-active {
778
- position: absolute !important;
779
- }
568
+ .tabs.tabs-fashion .tab-background::after {
569
+ right: -20px;
570
+ clip-path: inset(50% 50% 0 -10px);
571
+ }
572
+
573
+ .tabs.tabs-fashion .tab.actived .tab-background::before,
574
+ .tabs.tabs-fashion .tab.actived .tab-background::after {
575
+ box-shadow: 0 0 0 20px var(--g-container-bg);
576
+ }
577
+
578
+ /* Card 风格样式 */
579
+ .tabs.tabs-card .tab {
580
+ --at-apply: ml-[5px] mr-0 my-[5px];
581
+ height: calc(var(--g-tabbar-height) - 10px);
582
+ }
583
+
584
+ .tabs.tabs-card .tab .tab-dividers {
585
+ --at-apply: hidden;
586
+ }
587
+
588
+ .tabs.tabs-card .tab-background {
589
+ --at-apply: rounded-5px;
590
+ }
591
+
592
+ /* Square 风格样式 */
593
+ .tabs.tabs-square .tab-container::after {
594
+ --at-apply: bg-ui-primary h-0.5;
595
+ }
596
+
597
+ .tabs.tabs-square .tab-container:has(> .tab.tab-ontop)::after {
598
+ --at-apply: top-0 bottom-unset;
599
+ }
600
+
601
+ .tabs.tabs-square .tab-container:has(> .tab.tab-ontop) .tab .tab-background {
602
+ --at-apply: top-0 bottom-unset;
603
+ }
604
+
605
+ .tabs.tabs-square .tab:not(.actived):hover .tab-background {
606
+ --at-apply: h-full;
607
+ }
608
+
609
+ .tabs.tabs-square .tab .tab-background {
610
+ --at-apply: top-unset bottom-0 h-0 bg-[--g-tabbar-tab-hover-bg];
611
+ transition: height 0.3s;
612
+ }
613
+
614
+ .tabs.tabs-square .tab.actived .tab-background {
615
+ --at-apply: h-full bg-[--g-container-bg];
616
+ }
617
+
618
+ .more-action {
619
+ --at-apply: absolute z-10 flex items-center justify-center w-[50px] h-full right-0 top-0;
620
+ background-image: linear-gradient(to right, transparent, var(--g-bg));
621
+ }
622
+
623
+ /* 标签栏动画 */
624
+ .tabbar-move,
625
+ .tabbar-enter-active,
626
+ .tabbar-leave-active {
627
+ transition: all 0.3s;
628
+ }
629
+
630
+ .tabbar-enter-from,
631
+ .tabbar-leave-to {
632
+ opacity: 0;
633
+ transform: translateY(30px);
634
+ }
635
+
636
+ .tabs.tabs-ontop .tabbar-enter-from,
637
+ .tabs.tabs-ontop .tabbar-leave-to {
638
+ opacity: 0;
639
+ transform: translateY(-30px);
640
+ }
641
+
642
+ .tabbar-leave-active {
643
+ position: absolute !important;
780
644
  }
781
645
  </style>