afn-basic-components 1.0.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.
@@ -0,0 +1,292 @@
1
+ #app {
2
+ .main-container {
3
+ min-height: 100%;
4
+ transition: margin-left 0.28s;
5
+ margin-left: $base-sidebar-width;
6
+ position: relative;
7
+ }
8
+
9
+ .sidebar-container {
10
+ transition: width 0.28s;
11
+ width: $base-sidebar-width !important;
12
+ background-color: $base-menu-background;
13
+ height: 100%;
14
+ position: fixed;
15
+ font-size: 0px;
16
+ top: 0;
17
+ bottom: 0;
18
+ left: 0;
19
+ z-index: 1001;
20
+ overflow: hidden;
21
+
22
+ // reset element-ui css
23
+ .horizontal-collapse-transition {
24
+ transition: 0s width ease-in-out, 0s padding-left ease-in-out,
25
+ 0s padding-right ease-in-out;
26
+ }
27
+
28
+ .scrollbar-wrapper {
29
+ overflow-x: hidden !important;
30
+
31
+ .el-scrollbar__view {
32
+ height: 100%;
33
+ }
34
+ }
35
+
36
+ .el-scrollbar__bar.is-vertical {
37
+ right: 0px;
38
+ }
39
+
40
+ .is-horizontal {
41
+ display: none;
42
+ }
43
+
44
+ a {
45
+ display: inline-block;
46
+ width: 100%;
47
+ overflow: hidden;
48
+ }
49
+
50
+ .svg-icon {
51
+ margin-right: 16px;
52
+ }
53
+
54
+ .sub-el-icon {
55
+ margin-right: 12px;
56
+ margin-left: -2px;
57
+ }
58
+
59
+ .el-menu {
60
+ border: none;
61
+ height: 100%;
62
+ width: 100% !important;
63
+ }
64
+
65
+ // menu hover
66
+ .submenu-title-noDropdown,
67
+ .el-submenu__title {
68
+ &:hover {
69
+ background-color: $base-menu-hover !important;
70
+ }
71
+ }
72
+
73
+ .is-active > .el-submenu__title {
74
+ color: $base-sub-menu-active-text !important;
75
+ }
76
+
77
+ & .nest-menu .el-submenu > .el-submenu__title,
78
+ & .el-submenu .el-menu-item {
79
+ min-width: $base-sidebar-width !important;
80
+ background-color: $base-sub-menu-background !important;
81
+
82
+ &:hover {
83
+ background-color: $base-sub-menu-hover !important;
84
+ }
85
+ }
86
+ }
87
+
88
+ .hideSidebar {
89
+ .sidebar-container {
90
+ width: 54px !important;
91
+ }
92
+
93
+ .main-container {
94
+ margin-left: 54px;
95
+ }
96
+
97
+ .submenu-title-noDropdown {
98
+ padding: 0 !important;
99
+ position: relative;
100
+
101
+ .el-tooltip {
102
+ padding: 0 !important;
103
+
104
+ .svg-icon {
105
+ margin-left: 20px;
106
+ }
107
+
108
+ .sub-el-icon {
109
+ margin-left: 19px;
110
+ }
111
+ }
112
+ }
113
+
114
+ .el-submenu {
115
+ overflow: hidden;
116
+
117
+ &>.el-submenu__title {
118
+ padding: 0 !important;
119
+
120
+ .svg-icon {
121
+ margin-left: 20px;
122
+ }
123
+
124
+ .sub-el-icon {
125
+ margin-left: 19px;
126
+ }
127
+
128
+ .el-submenu__icon-arrow {
129
+ display: none;
130
+ }
131
+ }
132
+ }
133
+
134
+ .el-menu--collapse {
135
+ .el-submenu {
136
+ &>.el-submenu__title {
137
+ &>span {
138
+ height: 0;
139
+ width: 0;
140
+ overflow: hidden;
141
+ visibility: hidden;
142
+ display: inline-block;
143
+ }
144
+ }
145
+ }
146
+ }
147
+ }
148
+
149
+ .el-menu--collapse {
150
+ width: 54px;
151
+
152
+ .el-menu-item,
153
+ .el-submenu__title {
154
+ &>span {
155
+ height: 0;
156
+ width: 0;
157
+ overflow: hidden;
158
+ visibility: hidden;
159
+ display: inline-block;
160
+ }
161
+ }
162
+ }
163
+
164
+ .withoutAnimation {
165
+ .main-container,
166
+ .sidebar-container {
167
+ transition: none;
168
+ }
169
+ }
170
+ }
171
+
172
+ // when menu collapsed
173
+ .el-menu--vertical {
174
+ &>.el-menu {
175
+ .svg-icon {
176
+ margin-right: 16px;
177
+ }
178
+
179
+ .sub-el-icon {
180
+ margin-right: 12px;
181
+ margin-left: -2px;
182
+ }
183
+ }
184
+
185
+ .nest-menu .el-submenu>.el-submenu__title,
186
+ .el-menu-item {
187
+ &:hover {
188
+ // you can use $subMenuHover
189
+ background-color: $base-menu-hover !important;
190
+ }
191
+ }
192
+ }
193
+
194
+ // the scrollBar style
195
+ .el-scrollbar__wrap {
196
+ overflow-x: scroll !important;
197
+ }
198
+
199
+ .el-scrollbar__bar.is-horizontal {
200
+ display: none;
201
+ }
202
+
203
+ // 移动端样式
204
+ @media (max-width: 768px) {
205
+ .sidebar-container {
206
+ width: 80% !important;
207
+ background-color: $base-menu-background;
208
+ height: 100%;
209
+ position: fixed;
210
+ font-size: 0px;
211
+ top: 0;
212
+ bottom: 0;
213
+ left: 0;
214
+ z-index: 1001;
215
+ overflow: hidden;
216
+ box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
217
+ }
218
+
219
+ .main-container {
220
+ margin-left: 0 !important;
221
+ }
222
+
223
+ .hideSidebar {
224
+ .sidebar-container {
225
+ transform: translateX(-100%);
226
+ }
227
+ }
228
+ }
229
+
230
+ // 子菜单样式
231
+ .el-submenu {
232
+ .el-menu {
233
+ background-color: $base-sub-menu-background !important;
234
+ border-radius: 4px;
235
+ padding: 4px 0;
236
+ }
237
+
238
+ .el-menu-item {
239
+ padding-left: 50px !important;
240
+ min-height: 40px;
241
+ line-height: 40px;
242
+ font-size: 13px;
243
+ color: $base-menu-color;
244
+ transition: all 0.3s;
245
+
246
+ &:hover {
247
+ background-color: $base-sub-menu-hover !important;
248
+ color: $base-menu-active-color !important;
249
+ }
250
+
251
+ &.is-active {
252
+ background-color: $base-sub-menu-active !important;
253
+ color: $base-menu-active-color !important;
254
+ font-weight: 500;
255
+ }
256
+ }
257
+ }
258
+
259
+ // 菜单项样式
260
+ .el-menu-item {
261
+ min-height: 50px;
262
+ line-height: 50px;
263
+ font-size: 14px;
264
+ color: $base-menu-color;
265
+ transition: all 0.3s;
266
+
267
+ &:hover {
268
+ background-color: $base-menu-hover !important;
269
+ color: $base-menu-active-color !important;
270
+ }
271
+
272
+ &.is-active {
273
+ background-color: $base-menu-active !important;
274
+ color: $base-menu-active-color !important;
275
+ font-weight: 500;
276
+ }
277
+ }
278
+
279
+ // 滚动条样式
280
+ .el-scrollbar__wrap::-webkit-scrollbar {
281
+ width: 4px;
282
+ height: 4px;
283
+ }
284
+
285
+ .el-scrollbar__wrap::-webkit-scrollbar-thumb {
286
+ background: rgba(144, 147, 153, 0.3);
287
+ border-radius: 4px;
288
+ }
289
+
290
+ .el-scrollbar__wrap::-webkit-scrollbar-track {
291
+ background: transparent;
292
+ }
@@ -0,0 +1,49 @@
1
+ // global transition css
2
+
3
+ /* fade */
4
+ .fade-enter-active,
5
+ .fade-leave-active {
6
+ transition: opacity 0.28s;
7
+ }
8
+
9
+ .fade-enter,
10
+ .fade-leave-active {
11
+ opacity: 0;
12
+ }
13
+
14
+ /* fade-transform */
15
+ .fade-transform--move,
16
+ .fade-transform-leave-active,
17
+ .fade-transform-enter-active {
18
+ transition: all .5s;
19
+ }
20
+
21
+ .fade-transform-enter {
22
+ opacity: 0;
23
+ transform: translateX(-30px);
24
+ }
25
+
26
+ .fade-transform-leave-to {
27
+ opacity: 0;
28
+ transform: translateX(30px);
29
+ }
30
+
31
+ /* breadcrumb transition */
32
+ .breadcrumb-enter-active,
33
+ .breadcrumb-leave-active {
34
+ transition: all .5s;
35
+ }
36
+
37
+ .breadcrumb-enter,
38
+ .breadcrumb-leave-active {
39
+ opacity: 0;
40
+ transform: translateX(20px);
41
+ }
42
+
43
+ .breadcrumb-move {
44
+ transition: all .5s;
45
+ }
46
+
47
+ .breadcrumb-leave-active {
48
+ position: absolute;
49
+ }
@@ -0,0 +1,57 @@
1
+ // base color
2
+ $blue: #324157;
3
+ $light-blue: #3a71a8;
4
+ $red: #c03639;
5
+ $pink: #e65d6e;
6
+ $green: #30b08f;
7
+ $tiffany: #4ab7bd;
8
+ $yellow: #fec171;
9
+ $panGreen: #30b08f;
10
+
11
+ // 默认菜单主题风格
12
+ $base-menu-color: #333; // 🌟 默认菜单文字颜色
13
+ $base-menu-color-active: rgb(74, 127, 248); // 💫 激活状态菜单文字颜色
14
+ $base-menu-background: transparent; // 🎯 菜单背景色
15
+ $base-logo-title-color: #000; // 🏷️ Logo标题文字颜色 -
16
+
17
+ $base-menu-light-color: rgba(0, 0, 0, 0.7); // ☀️ 浅色主题菜单文字颜色
18
+ $base-menu-light-background: transparent; // 🌞 浅色主题菜单背景色
19
+ $base-logo-light-title-color: #001529; // 🌅 浅色主题Logo标题颜色 -
20
+
21
+ $base-sub-menu-background: transparent; // 🎨 子菜单背景色
22
+ $base-sub-menu-hover: rgba(202, 210, 228, 0.3); // 🖱️ 子菜单悬停背景色
23
+
24
+ //自定义新增
25
+ $base-menu-active-background: #fff; // 🌟 新增:菜单选中背景色 -
26
+ // 自定义暗色菜单风格
27
+ /**
28
+ $base-menu-color:hsla(0,0%,100%,.65);
29
+ $base-menu-color-active:#fff;
30
+ $base-menu-background:#001529;
31
+ $base-logo-title-color: #ffffff;
32
+
33
+ $base-menu-light-color:rgba(0,0,0,.70);
34
+ $base-menu-light-background:#ffffff;
35
+ $base-logo-light-title-color: #001529;
36
+
37
+ $base-sub-menu-background:#000c17;
38
+ $base-sub-menu-hover:#001528;
39
+ */
40
+
41
+ $base-sidebar-width: 204px;
42
+
43
+ // the :export directive is the magic sauce for webpack
44
+ // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
45
+ :export {
46
+ menuColor: $base-menu-color;
47
+ menuLightColor: $base-menu-light-color;
48
+ menuColorActive: $base-menu-color-active;
49
+ menuBackground: $base-menu-background;
50
+ menuLightBackground: $base-menu-light-background;
51
+ subMenuBackground: $base-sub-menu-background;
52
+ subMenuHover: $base-sub-menu-hover;
53
+ menuActiveBackground: $base-menu-active-background;
54
+ sideBarWidth: $base-sidebar-width;
55
+ logoTitleColor: $base-logo-title-color;
56
+ logoLightTitleColor: $base-logo-light-title-color;
57
+ }