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

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 +12 -0
  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 +19 -0
  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,9 +1,9 @@
1
1
  <script setup lang="ts">
2
2
  import type { colorScheme, cssVarKey } from '@pubinfo/config/themes';
3
- import { useTheme } from '@/composables';
4
3
  import { getThemes } from '@pubinfo/config/themes';
5
4
  import JamBookmarkF from '~icons/jam/bookmark-f';
6
5
  import PajamasCheckCircleFilled from '~icons/pajamas/check-circle-filled';
6
+ import { useTheme } from '@/composables';
7
7
  import { useContext } from '../../../composables/useContext';
8
8
  import DayNightToggle from './DayNightToggle.vue';
9
9
 
@@ -102,7 +102,7 @@ function clickHandle(item: ThemeListCard) {
102
102
  </HDivider>
103
103
  </template>
104
104
 
105
- <style lang="scss" scoped>
105
+ <style scoped>
106
106
  .divider {
107
107
  --at-apply:
108
108
  flex
@@ -113,92 +113,55 @@ function clickHandle(item: ThemeListCard) {
113
113
  whitespace-nowrap
114
114
  text-sm
115
115
  font-500;
116
+ }
116
117
 
117
- &::before,
118
- &::after {
119
- --at-apply:
120
- content-empty
121
- w-full
122
- h-1px
123
- bg-stone-2
124
- dark:bg-stone-6;
125
- }
118
+ .divider::before,
119
+ .divider::after {
120
+ --at-apply:
121
+ content-empty
122
+ w-full
123
+ h-1px
124
+ bg-stone-2
125
+ dark:bg-stone-6;
126
126
  }
127
127
 
128
128
  .themes {
129
- box-sizing: border-box;
130
- display: grid;
131
- grid-template-columns: repeat(3, 125px);
132
- grid-gap: 15px;
133
- width: 100%;
134
-
135
- .theme {
136
- position: relative;
137
- box-sizing: border-box;
138
- height: 78px;
139
- padding: 15px;
140
- margin-bottom: 15px;
141
- color: #fff;
142
- cursor: pointer;
143
- background-color: #f7f8f9;
144
- border-radius: 12px;
145
- transition: all 0.2s ease-in-out;
146
-
147
- --at-apply: shadow dark:bg-dark-2;
148
-
149
- &:hover {
150
- transform: scale(1.05);
151
- }
152
-
153
- .explosion {
154
- position: absolute;
155
- top: -10px;
156
- right: -10px;
157
- z-index: 1;
158
- display: flex;
159
- align-items: center;
160
- justify-content: center;
161
- width: 24px;
162
- height: 24px;
163
- background-color: rgb(var(--ui-primary));
164
- border-radius: 50%;
165
- transition: all 0.3s;
166
- transform: scale(0);
167
- transform-origin: center;
168
- }
169
-
170
- &.active {
171
- box-shadow: 0 0 0 4px rgb(var(--ui-primary));
172
-
173
- .explosion {
174
- transform: scale(1);
175
- }
176
- }
177
-
178
- .theme-type {
179
- width: 100%;
180
- height: 16px;
181
- margin-top: 5px;
182
- margin-bottom: 10px;
183
- }
184
-
185
- .theme-point {
186
- display: grid;
187
- grid-template-columns: repeat(6, 15px);
188
- width: 100%;
189
- height: 20px;
190
-
191
- .point {
192
- box-sizing: border-box;
193
- width: 20px;
194
- height: 20px;
195
- margin-right: 5px;
196
- border: 2px solid #fff;
197
- border-radius: 50%;
198
-
199
- --at-apply: shadow shadow-stone-4 dark:shadow-stone-8;
200
- }
201
- }
202
- }
129
+ --at-apply: box-border grid grid-cols-[repeat(3,125px)] gap-[15px] w-full;
130
+ }
131
+
132
+ .themes .theme {
133
+ --at-apply: relative box-border h-[78px] text-white cursor-pointer bg-[#f7f8f9] dark:bg-dark-2
134
+ transition-all duration-[0.2s] ease-[ease-in-out] mb-[15px] p-[15px] rounded-xl shadow;
135
+ }
136
+
137
+ .themes .theme:hover {
138
+ transform: scale(1.05);
139
+ }
140
+
141
+ .themes .theme .explosion {
142
+ --at-apply: bg-ui-primary absolute z-[1] flex items-center justify-center w-6 h-6
143
+ transition-all duration-[0.3s] origin-center rounded-[50%] scale-0 -right-2.5 -top-2.5;
144
+ }
145
+
146
+ .themes .theme.active {
147
+ box-shadow: 0 0 0 4px rgb(var(--ui-primary));
148
+ }
149
+
150
+ .themes .theme.active .explosion {
151
+ transform: scale(1);
152
+ }
153
+
154
+ .themes .theme .theme-type {
155
+ --at-apply: w-full h-4 mt-5px pb-10px;
156
+ }
157
+
158
+ .themes .theme .theme-point {
159
+ --at-apply: grid grid-cols-[repeat(6,15px)] w-full h-5;
160
+ }
161
+
162
+ .themes .theme .theme-point .point {
163
+ --at-apply: box-border w-5 h-5 mr-[5px] rounded-[50%]
164
+ border-2 border-solid border-white
165
+ shadow shadow-stone-4 dark:shadow-stone-8;
203
166
  }
204
167
  </style>
@@ -71,79 +71,71 @@ function clickHandle(item: Settings.layout['widthMode']) {
71
71
  </HDivider>
72
72
  </template>
73
73
 
74
- <style lang="scss" scoped>
74
+ <style scoped>
75
75
  .app-width-mode {
76
76
  --at-apply: flex items-center justify-center gap-4 pb-4;
77
+ }
77
78
 
78
- .mode {
79
- --at-apply: relative w-16 h-12 rounded-2 ring-1 ring-stone-2 dark:ring-stone-7 cursor-pointer transition of-hidden;
80
-
81
- &.active {
82
- --at-apply: ring-ui-primary ring-2;
83
- }
84
-
85
- &-adaption {
86
- &::before {
87
- --at-apply: content-empty absolute w-full h-full bg-stone-1 dark:bg-stone-9;
88
- }
89
-
90
- .left,
91
- .right {
92
- --at-apply: absolute top-1/2 -translate-y-1/2;
93
- }
94
-
95
- .left {
96
- --at-apply: left-1;
97
- }
98
-
99
- .right {
100
- --at-apply: right-1;
101
- }
102
- }
103
-
104
- &-adaption-min-width {
105
- &::before {
106
- --at-apply: content-empty absolute w-1/2 h-full left-1/2 -translate-x-1/2 bg-stone-1 dark:bg-stone-9;
107
- }
108
-
109
- .left,
110
- .right {
111
- --at-apply: absolute top-1/2 -translate-y-1/2;
112
- }
113
-
114
- .left {
115
- --at-apply: left-0.5;
116
- }
117
-
118
- .right {
119
- --at-apply: right-0.5;
120
- }
121
- }
122
-
123
- &-center {
124
- &::before {
125
- --at-apply: content-empty absolute w-3/5 h-full left-1/2 -translate-x-1/2 bg-stone-1 dark:bg-stone-9;
126
- }
127
- }
128
-
129
- &-center-max-width {
130
- &::before {
131
- --at-apply: content-empty absolute w-3/5 h-full left-1/2 -translate-x-1/2 bg-stone-1 dark:bg-stone-9;
132
- }
133
-
134
- .left,
135
- .right {
136
- --at-apply: absolute top-1/2 -translate-y-1/2;
137
- }
138
-
139
- .left {
140
- --at-apply: left-2.5;
141
- }
142
-
143
- .right {
144
- --at-apply: right-2.5;
145
- }
146
- }
147
- }
79
+ .app-width-mode .mode {
80
+ --at-apply: relative w-16 h-12 rounded-2 ring-1 ring-stone-2 dark:ring-stone-7 cursor-pointer transition of-hidden;
81
+ }
82
+
83
+ .app-width-mode .mode.active {
84
+ --at-apply: ring-ui-primary ring-2;
85
+ }
86
+
87
+ .app-width-mode .mode-adaption::before {
88
+ --at-apply: content-empty absolute w-full h-full bg-stone-1 dark:bg-stone-9;
89
+ }
90
+
91
+ .app-width-mode .mode-adaption .left,
92
+ .app-width-mode .mode-adaption .right {
93
+ --at-apply: absolute top-1/2 -translate-y-1/2;
94
+ }
95
+
96
+ .app-width-mode .mode-adaption .left {
97
+ --at-apply: left-1;
98
+ }
99
+
100
+ .app-width-mode .mode-adaption .right {
101
+ --at-apply: right-1;
102
+ }
103
+
104
+ .app-width-mode .mode-adaption-min-width::before {
105
+ --at-apply: content-empty absolute w-1/2 h-full left-1/2 -translate-x-1/2 bg-stone-1 dark:bg-stone-9;
106
+ }
107
+
108
+ .app-width-mode .mode-adaption-min-width .left,
109
+ .app-width-mode .mode-adaption-min-width .right {
110
+ --at-apply: absolute top-1/2 -translate-y-1/2;
111
+ }
112
+
113
+ .app-width-mode .mode-adaption-min-width .left {
114
+ --at-apply: left-0.5;
115
+ }
116
+
117
+ .app-width-mode .mode-adaption-min-width .right {
118
+ --at-apply: right-0.5;
119
+ }
120
+
121
+ .app-width-mode .mode-center::before {
122
+ --at-apply: content-empty absolute w-3/5 h-full left-1/2 -translate-x-1/2 bg-stone-1 dark:bg-stone-9;
123
+ }
124
+
125
+ .app-width-mode .mode-center-max-width::before {
126
+ --at-apply: content-empty absolute w-3/5 h-full left-1/2 -translate-x-1/2 bg-stone-1 dark:bg-stone-9;
127
+ }
128
+
129
+ .app-width-mode .mode-center-max-width .left,
130
+ .app-width-mode .mode-center-max-width .right {
131
+ --at-apply: absolute top-1/2 -translate-y-1/2;
132
+ }
133
+
134
+ .app-width-mode .mode-center-max-width .left {
135
+ --at-apply: left-2.5;
136
+ }
137
+
138
+ .app-width-mode .mode-center-max-width .right {
139
+ --at-apply: right-2.5;
148
140
  }
149
141
  </style>
@@ -36,79 +36,46 @@ const [open, setOpen] = useToggle(false);
36
36
  </div>
37
37
  </template>
38
38
 
39
- <style lang="scss" scoped>
40
- @use "sass:color";
41
-
39
+ <style scoped>
42
40
  .app-setting-warp {
43
- position: relative;
44
- position: fixed;
45
- top: calc(50%);
46
- right: 10px;
47
- z-index: 10;
41
+ --at-apply: relative fixed top-1/2 right-10px z-10;
42
+ }
48
43
 
49
- .vue-devtools__anchor--glowing {
50
- position: absolute;
51
- top: 0;
52
- left: 0;
53
- z-index: -1;
54
- width: 160px;
55
- height: 160px;
56
- pointer-events: none;
57
- background-image: linear-gradient(45deg, #00dc82, #36e4da, #0047e1);
58
- filter: blur(60px);
59
- border-radius: 9999px;
60
- opacity: 0;
61
- transition: all 1s ease;
62
- transform: translate(-25%, -25%);
63
- }
44
+ .app-setting-warp .vue-devtools__anchor--glowing {
45
+ --at-apply: absolute z-[-1] w-40 h-40 pointer-events-none blur-[60px] opacity-0
46
+ transition-all duration-[1s] ease-[ease] -translate-x-1/4 -translate-y-1/4
47
+ rounded-full left-0 top-0;
48
+ background-image: linear-gradient(45deg, #00dc82, #36e4da, #0047e1);
49
+ }
64
50
 
65
- &:hover {
66
- .vue-devtools__anchor--glowing {
67
- opacity: 0.7;
68
- }
69
- }
51
+ .app-setting-warp:hover .vue-devtools__anchor--glowing {
52
+ --at-apply: op-70;
70
53
  }
71
54
 
72
55
  .app-setting {
73
- --at-apply: text-white dark:text-dark bg-ui-primary;
56
+ --at-apply: text-white dark:text-dark bg-ui-primary
57
+ flex flex-col items-center justify-between w-[30px] h-[76px]
58
+ text-sm cursor-pointer rounded-[30px];
59
+ }
74
60
 
75
- display: flex;
76
- flex-direction: column;
77
- align-items: center;
78
- justify-content: space-between;
79
- width: 30px;
80
- height: 76px;
81
- font-size: 14px;
82
- cursor: pointer;
83
- border-radius: 30px;
61
+ .app-setting .app-setting-item {
62
+ --at-apply: flex flex-[auto] items-center justify-center w-full h-0;
63
+ }
84
64
 
85
- .app-setting-item {
86
- display: flex;
87
- flex: auto;
88
- align-items: center;
89
- justify-content: center;
90
- width: 100%;
91
- height: 0;
92
- }
65
+ .app-setting .divider {
66
+ --at-apply: w-10px h-px bg-[#b3b3b3];
67
+ }
93
68
 
94
- .divider {
95
- width: 10px;
96
- height: 1px;
97
- background-color: color.scale($color: #fff, $lightness: -30%)
98
- }
69
+ .app-setting .icon {
70
+ animation: rotate 5s linear infinite;
71
+ }
99
72
 
100
- .icon {
101
- animation: rotate 5s linear infinite;
73
+ @keyframes rotate {
74
+ from {
75
+ transform: rotate(0deg);
102
76
  }
103
-
104
- @keyframes rotate {
105
- from {
106
- transform: rotate(0deg);
107
- }
108
-
109
- to {
110
- transform: rotate(360deg);
111
- }
77
+ to {
78
+ transform: rotate(360deg);
112
79
  }
113
80
  }
114
81
  </style>
@@ -86,145 +86,100 @@ function iconName(isActive: boolean, icon?: string, activeIcon?: string) {
86
86
  </Transition>
87
87
  </template>
88
88
 
89
- <style lang="scss" scoped>
89
+ <style scoped>
90
90
  .main-sidebar-container {
91
- position: relative;
92
- z-index: 1;
93
- display: flex;
94
- flex-direction: column;
91
+ --at-apply: relative z-1 flex flex-col;
95
92
  width: var(--g-main-sidebar-width);
96
93
  color: var(--g-main-sidebar-menu-color);
97
94
  background-color: var(--g-main-sidebar-bg);
98
95
  box-shadow: 1px 0 0 0 var(--g-border-color);
99
96
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
97
+ }
100
98
 
101
- .sidebar-logo {
102
- background-color: var(--g-main-sidebar-bg);
103
- transition: background-color 0.3s;
104
- }
99
+ .sidebar-logo {
100
+ --at-apply: bg-[--g-main-sidebar-bg];
101
+ transition: background-color 0.3s;
102
+ }
105
103
 
106
- :deep(.menu-item-container-layout) {
107
- display: flex;
108
- flex-direction: row;
109
- width: auto;
104
+ :deep(.menu-item-container-layout) {
105
+ --at-apply: flex flex-col w-auto;
106
+ }
110
107
 
111
- .title {
112
- display: none;
113
- }
114
- }
108
+ :deep(.menu-item-container-layout) .title {
109
+ --at-apply: hidden;
110
+ }
115
111
 
116
- .menu-active {
117
- &-arrow {
118
- .item-container::before,
119
- :deep(.menu-item::before) {
120
- right: -5px;
121
- width: 0;
122
- height: 0;
123
- content: "";
124
- border-top: 5px solid transparent;
125
- border-right: 5px solid var(--g-main-sidebar-bg);
126
- border-bottom: 5px solid transparent;
127
- opacity: 0;
128
- transition: all 0.3s;
129
-
130
- @include position-center(y);
131
- }
132
-
133
- .item-container.active::before,
134
- :deep(.menu-item.active::before) {
135
- right: 8px;
136
- opacity: 1;
137
- }
138
- }
139
-
140
- &-line {
141
- .item-container::before,
142
- :deep(.menu-item::before) {
143
- left: 6px;
144
- width: 4px;
145
- height: 0;
146
- content: "";
147
- background-color: var(--g-main-sidebar-menu-active-bg);
148
- border-radius: 2px;
149
- box-shadow: 0 0 0 1px var(--g-main-sidebar-bg);
150
- opacity: 0;
151
- transition: all 0.3s;
152
-
153
- @include position-center(y);
154
- }
155
-
156
- .item-container.active::before,
157
- :deep(.menu-item.active::before) {
158
- height: 20px;
159
- opacity: 1;
160
- }
161
- }
162
-
163
- &-dot {
164
- .item-container::before,
165
- :deep(.menu-item::before) {
166
- left: 0;
167
- width: 10px;
168
- height: 10px;
169
- content: "";
170
- background-color: var(--g-main-sidebar-menu-active-bg);
171
- border-radius: 50%;
172
- box-shadow: 0 0 0 1px var(--g-main-sidebar-bg);
173
- opacity: 0;
174
- transition: all 0.3s;
175
-
176
- @include position-center(y);
177
- }
178
-
179
- .item-container.active::before,
180
- :deep(.menu-item.active::before) {
181
- left: 4px;
182
- opacity: 1;
183
- }
184
- }
185
- }
112
+ /* 菜单激活样式 */
113
+ .menu-active-arrow .item-container::before,
114
+ .menu-active-arrow :deep(.menu-item::before) {
115
+ --at-apply: content-empty absolute top-1/2 right-[-5px] w-0 h-0 op-0
116
+ border-t-5px border-t-solid border-t-transparent
117
+ border-r-5px border-r-solid border-r-[--g-main-sidebar-bg]
118
+ border-b-5px border-b-solid border-b-transparent
119
+ -translate-y-2/4 transition-all duration-[0.3s];
120
+ }
186
121
 
187
- .menu {
188
- flex: 1;
189
- width: initial;
190
- overflow: hidden auto;
191
- overscroll-behavior: contain;
192
-
193
- // firefox隐藏滚动条
194
- scrollbar-width: none;
195
-
196
- // chrome隐藏滚动条
197
- &::-webkit-scrollbar {
198
- display: none;
199
- }
200
-
201
- :deep(.menu-item) {
202
- .menu-item-container {
203
- height: 50px;
204
- padding: 0 5px;
205
- color: var(--g-main-sidebar-menu-color);
206
- background-color: var(--g-main-sidebar-menu-bg);
207
-
208
- .menu-item-container-icon {
209
- font-size: 24px !important;
210
- transform: scale(1);
211
- }
212
- }
213
-
214
- &:hover .menu-item-container {
215
- color: var(--g-main-sidebar-menu-hover-color);
216
- background-color: var(--g-main-sidebar-menu-hover-bg);
217
- }
218
-
219
- &.active .menu-item-container {
220
- color: var(--g-main-sidebar-menu-active-color) !important;
221
- background-color: var(--g-main-sidebar-menu-active-bg) !important;
222
- }
223
- }
224
- }
122
+ .menu-active-arrow .item-container.active::before,
123
+ .menu-active-arrow :deep(.menu-item.active::before) {
124
+ --at-apply: right-2 op-100;
125
+ }
126
+
127
+ .menu-active-line .item-container::before,
128
+ .menu-active-line :deep(.menu-item::before) {
129
+ --at-apply: content-empty absolute top-1/2 left-6px -translate-y-2/4 w-1 h-0
130
+ bg-[--g-main-sidebar-menu-active-bg] opacity-0 transition-all duration-[0.3s]
131
+ rounded-sm;
132
+ box-shadow: 0 0 0 1px var(--g-main-sidebar-bg);
133
+ }
134
+
135
+ .menu-active-line .item-container.active::before,
136
+ .menu-active-line :deep(.menu-item.active::before) {
137
+ --at-apply: h-5 op-100;
138
+ }
139
+
140
+ .menu-active-dot .item-container::before,
141
+ .menu-active-dot :deep(.menu-item::before) {
142
+ --at-apply: bg-[--g-main-sidebar-menu-active-bg] content-empty
143
+ absolute -translate-y-2/4 w-2.5 h-2.5 opacity-0 transition-all
144
+ duration-[0.3s] rounded-[50%] left-0 top-2/4;
145
+ box-shadow: 0 0 0 1px var(--g-main-sidebar-bg);
146
+ }
147
+
148
+ .menu-active-dot .item-container.active::before,
149
+ .menu-active-dot :deep(.menu-item.active::before) {
150
+ --at-apply: left-1 op-100;
151
+ }
152
+
153
+ .menu {
154
+ --at-apply: flex-1 w-[initial] overscroll-contain;
155
+ overflow: hidden auto;
156
+ scrollbar-width: none;
157
+ }
158
+
159
+ .menu::-webkit-scrollbar {
160
+ --at-apply: hidden;
161
+ }
162
+
163
+ .menu :deep(.menu-item) .menu-item-container {
164
+ --at-apply: h-[50px] px-5px py-0 text-[--g-main-sidebar-menu-color] bg-[--g-main-sidebar-menu-bg];
165
+ }
166
+
167
+ .menu :deep(.menu-item) .menu-item-container .menu-item-container-icon {
168
+ --at-apply: scale-100;
169
+ font-size: 24px !important;
170
+ }
171
+
172
+ .menu :deep(.menu-item):hover .menu-item-container {
173
+ color: var(--g-main-sidebar-menu-hover-color);
174
+ background-color: var(--g-main-sidebar-menu-hover-bg);
175
+ }
176
+
177
+ .menu :deep(.menu-item).active .menu-item-container {
178
+ color: var(--g-main-sidebar-menu-active-color) !important;
179
+ background-color: var(--g-main-sidebar-menu-active-bg) !important;
225
180
  }
226
181
 
227
- // 主侧边栏动画
182
+ /* 主侧边栏动画 */
228
183
  .main-sidebar-enter-active,
229
184
  .main-sidebar-leave-active {
230
185
  transition: 0.3s;