@xilonglab/vue-main 1.5.8 → 1.5.9
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.
- package/package.json +1 -1
- package/packages/else/XlSideBar.vue +36 -32
package/package.json
CHANGED
|
@@ -67,28 +67,34 @@ const triggers = {
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
<style lang="less">
|
|
70
|
+
// ==================== 变量定义 ====================
|
|
70
71
|
@sidebar-background: rgb(0 0 0 / 40%);
|
|
71
72
|
@sidebar-color: #f0f0f0;
|
|
72
73
|
@sidebar-active-background: rgb(0 0 0 / 30%);
|
|
73
74
|
@transition-function: width 0.7s cubic-bezier(0.17, 0.67, 0.84, 0.66);
|
|
74
|
-
@menu-item-blue:
|
|
75
|
-
@menu-item-blue-dark:
|
|
76
|
-
@menu-item-blue-light:
|
|
75
|
+
@menu-item-blue: rgba(23, 80, 141, 0.7);
|
|
76
|
+
@menu-item-blue-dark: rgba(15, 36, 56, 0.7);
|
|
77
|
+
@menu-item-blue-light: transparent;
|
|
77
78
|
|
|
79
|
+
// ==================== 主容器 ====================
|
|
78
80
|
.xl-side-bar {
|
|
81
|
+
height: 100%;
|
|
82
|
+
width: 150px;
|
|
79
83
|
overflow-y: scroll;
|
|
80
84
|
scrollbar-width: none;
|
|
81
85
|
border-right: 0 !important;
|
|
82
|
-
height: 100%;
|
|
83
86
|
|
|
87
|
+
&::-webkit-scrollbar {
|
|
88
|
+
display: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// ==================== 菜单容器 ====================
|
|
84
92
|
.side-bar-menu {
|
|
85
93
|
margin: 5px;
|
|
86
|
-
background: @sidebar-background;
|
|
87
94
|
height: calc(~"100% - 10px");
|
|
95
|
+
background: @sidebar-background;
|
|
88
96
|
border-radius: 7px;
|
|
89
97
|
border: 0;
|
|
90
|
-
overflow: hidden;
|
|
91
|
-
|
|
92
98
|
overflow: auto;
|
|
93
99
|
scrollbar-width: none;
|
|
94
100
|
-ms-overflow-style: none;
|
|
@@ -102,17 +108,15 @@ const triggers = {
|
|
|
102
108
|
}
|
|
103
109
|
}
|
|
104
110
|
|
|
111
|
+
// ==================== 菜单项基础样式(共同部分)====================
|
|
105
112
|
.el-sub-menu__title,
|
|
106
113
|
.el-menu-item {
|
|
107
|
-
background:
|
|
114
|
+
background: transparent;
|
|
108
115
|
margin: 4px 8px;
|
|
109
116
|
border-radius: 6px;
|
|
110
117
|
position: relative;
|
|
111
118
|
overflow: hidden;
|
|
112
|
-
|
|
113
|
-
// 深蓝色渐变背景
|
|
114
|
-
background: linear-gradient(135deg, @menu-item-blue-dark 0%, @menu-item-blue 50%, @menu-item-blue-light 100%);
|
|
115
|
-
|
|
119
|
+
|
|
116
120
|
// 光泽反光效果
|
|
117
121
|
&::before {
|
|
118
122
|
content: '';
|
|
@@ -130,22 +134,24 @@ const triggers = {
|
|
|
130
134
|
pointer-events: none;
|
|
131
135
|
border-radius: 6px 6px 0 0;
|
|
132
136
|
}
|
|
133
|
-
|
|
137
|
+
|
|
134
138
|
// 底部阴影增强立体感
|
|
135
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3),
|
|
136
|
-
|
|
139
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3),
|
|
140
|
+
0 1px 0 rgba(255, 255, 255, 0.1) inset;
|
|
137
141
|
}
|
|
138
142
|
|
|
143
|
+
// ==================== 菜单项特定样式 ====================
|
|
139
144
|
.el-menu-item {
|
|
140
145
|
transition: @transition-function;
|
|
141
146
|
-moz-transition: @transition-function;
|
|
142
147
|
-webkit-transition: @transition-function;
|
|
143
148
|
-o-transition: @transition-function;
|
|
149
|
+
background: transparent;
|
|
144
150
|
|
|
145
151
|
&:hover {
|
|
146
152
|
color: @sidebar-color !important;
|
|
147
153
|
background: linear-gradient(135deg, @menu-item-blue 0%, @menu-item-blue-light 50%, @menu-item-blue 100%) !important;
|
|
148
|
-
|
|
154
|
+
|
|
149
155
|
&::before {
|
|
150
156
|
background: linear-gradient(
|
|
151
157
|
180deg,
|
|
@@ -154,9 +160,9 @@ const triggers = {
|
|
|
154
160
|
transparent 100%
|
|
155
161
|
);
|
|
156
162
|
}
|
|
157
|
-
|
|
158
|
-
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4),
|
|
159
|
-
|
|
163
|
+
|
|
164
|
+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4),
|
|
165
|
+
0 1px 0 rgba(255, 255, 255, 0.15) inset;
|
|
160
166
|
|
|
161
167
|
i {
|
|
162
168
|
color: @sidebar-color !important;
|
|
@@ -165,7 +171,7 @@ const triggers = {
|
|
|
165
171
|
|
|
166
172
|
&.is-active {
|
|
167
173
|
background: linear-gradient(135deg, @menu-item-blue-light 0%, @menu-item-blue 50%, @menu-item-blue-dark 100%) !important;
|
|
168
|
-
|
|
174
|
+
|
|
169
175
|
&::before {
|
|
170
176
|
background: linear-gradient(
|
|
171
177
|
180deg,
|
|
@@ -174,17 +180,18 @@ const triggers = {
|
|
|
174
180
|
transparent 100%
|
|
175
181
|
);
|
|
176
182
|
}
|
|
177
|
-
|
|
178
|
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5),
|
|
179
|
-
|
|
183
|
+
|
|
184
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5),
|
|
185
|
+
0 2px 0 rgba(255, 255, 255, 0.2) inset;
|
|
180
186
|
}
|
|
181
187
|
}
|
|
182
|
-
|
|
188
|
+
|
|
189
|
+
// ==================== 子菜单标题样式 ====================
|
|
183
190
|
.el-sub-menu__title {
|
|
184
191
|
&:hover {
|
|
185
192
|
color: @sidebar-color !important;
|
|
186
193
|
background: linear-gradient(135deg, @menu-item-blue 0%, @menu-item-blue-light 50%, @menu-item-blue 100%) !important;
|
|
187
|
-
|
|
194
|
+
|
|
188
195
|
&::before {
|
|
189
196
|
background: linear-gradient(
|
|
190
197
|
180deg,
|
|
@@ -193,18 +200,15 @@ const triggers = {
|
|
|
193
200
|
transparent 100%
|
|
194
201
|
);
|
|
195
202
|
}
|
|
196
|
-
|
|
197
|
-
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4),
|
|
198
|
-
|
|
203
|
+
|
|
204
|
+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4),
|
|
205
|
+
0 1px 0 rgba(255, 255, 255, 0.15) inset;
|
|
199
206
|
}
|
|
200
207
|
}
|
|
201
208
|
|
|
209
|
+
// ==================== 其他辅助样式 ====================
|
|
202
210
|
.el-menu-item-group__title {
|
|
203
211
|
display: none;
|
|
204
212
|
}
|
|
205
|
-
|
|
206
|
-
&::-webkit-scrollbar {
|
|
207
|
-
display: none;
|
|
208
|
-
}
|
|
209
213
|
}
|
|
210
214
|
</style>
|