cfel-base-components 2.5.46 → 2.5.47
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/demo/src/index.jsx
CHANGED
|
@@ -13,11 +13,6 @@ import ProTable from "../../src/components/base-component/ProTable";
|
|
|
13
13
|
import PageContainer from "../../src/components/base-component/PageContainer";
|
|
14
14
|
|
|
15
15
|
const menuList = [
|
|
16
|
-
{
|
|
17
|
-
label: "目录0",
|
|
18
|
-
key: "a",
|
|
19
|
-
icon: <QqOutlined />,
|
|
20
|
-
},
|
|
21
16
|
{
|
|
22
17
|
label: "目录1",
|
|
23
18
|
key: "a",
|
|
@@ -188,7 +183,7 @@ const App = () => {
|
|
|
188
183
|
appName="控制台"
|
|
189
184
|
productList={false}
|
|
190
185
|
menuList={menuList}
|
|
191
|
-
type=""
|
|
186
|
+
//type="console"
|
|
192
187
|
customAction={()=>{
|
|
193
188
|
history.push("/web/user-info")
|
|
194
189
|
}}
|
package/package.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
$menuPrefixCls: rc-menu;
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
|
|
3
5
|
ul {
|
|
4
6
|
list-style: none;
|
|
5
7
|
padding: 0;
|
|
@@ -11,6 +13,7 @@ ul {
|
|
|
11
13
|
overflow-y: scroll;
|
|
12
14
|
|
|
13
15
|
.menu {
|
|
16
|
+
|
|
14
17
|
padding: 0;
|
|
15
18
|
margin: 0;
|
|
16
19
|
list-style: none;
|
|
@@ -27,7 +30,7 @@ ul {
|
|
|
27
30
|
.menu-item-content {
|
|
28
31
|
font-weight: 400;
|
|
29
32
|
font-size: 14px;
|
|
30
|
-
line-height:
|
|
33
|
+
line-height: 50px;
|
|
31
34
|
text-align: left;
|
|
32
35
|
}
|
|
33
36
|
|
|
@@ -56,9 +59,9 @@ ul {
|
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
.sub-li {
|
|
59
|
-
background: #5b73deee;
|
|
60
62
|
position: relative;
|
|
61
63
|
z-index: 9;
|
|
64
|
+
line-height: 52px;
|
|
62
65
|
|
|
63
66
|
&::before {
|
|
64
67
|
content: '';
|
|
@@ -114,13 +117,18 @@ ul {
|
|
|
114
117
|
box-shadow: 0px 0px 30px 0px transparent;
|
|
115
118
|
|
|
116
119
|
&.rc-menu-item-selected {
|
|
120
|
+
.menu-item-content{
|
|
121
|
+
width: 100%;
|
|
122
|
+
padding-right: 24px;
|
|
123
|
+
}
|
|
117
124
|
.menu-item-label {
|
|
118
125
|
color: #fff;
|
|
119
126
|
font-weight: 500;
|
|
120
127
|
display: flex;
|
|
121
128
|
align-items: center;
|
|
122
129
|
padding-left: 12px;
|
|
123
|
-
width:
|
|
130
|
+
width: 100%;
|
|
131
|
+
padding-right: 24px;
|
|
124
132
|
height: 40px;
|
|
125
133
|
background: rgba(255, 255, 255, 0.05);
|
|
126
134
|
box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.05);
|
|
@@ -134,17 +142,17 @@ ul {
|
|
|
134
142
|
}
|
|
135
143
|
|
|
136
144
|
.grand-li {
|
|
137
|
-
background: #
|
|
145
|
+
background: #4370DA;
|
|
138
146
|
position: relative;
|
|
139
147
|
z-index: 9;
|
|
140
|
-
height: 52px;
|
|
148
|
+
line-height: 52px;
|
|
141
149
|
display: flex;
|
|
142
150
|
align-items: center;
|
|
143
151
|
|
|
144
152
|
&::before {
|
|
145
153
|
content: '';
|
|
146
154
|
position: absolute;
|
|
147
|
-
left:
|
|
155
|
+
left: 49px;
|
|
148
156
|
top: 48%;
|
|
149
157
|
width: 5px;
|
|
150
158
|
height: 5px;
|
|
@@ -157,7 +165,7 @@ ul {
|
|
|
157
165
|
&::after {
|
|
158
166
|
content: '';
|
|
159
167
|
position: absolute;
|
|
160
|
-
left:
|
|
168
|
+
left: 51px;
|
|
161
169
|
top: 0;
|
|
162
170
|
width: 1px;
|
|
163
171
|
height: 100%;
|
|
@@ -178,11 +186,18 @@ ul {
|
|
|
178
186
|
}
|
|
179
187
|
|
|
180
188
|
&.rc-menu-item-selected {
|
|
189
|
+
.menu-item-content{
|
|
190
|
+
width: 100%;
|
|
191
|
+
padding-right: 24px;
|
|
192
|
+
height: 52px;
|
|
193
|
+
display: flex;
|
|
194
|
+
align-items: center;
|
|
195
|
+
}
|
|
181
196
|
.menu-item-label {
|
|
182
197
|
display: flex;
|
|
183
198
|
align-items: center;
|
|
184
199
|
padding-left: 12px;
|
|
185
|
-
width:
|
|
200
|
+
width: 100%;
|
|
186
201
|
height: 40px;
|
|
187
202
|
background: rgba(255, 255, 255, 0.05);
|
|
188
203
|
box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.05);
|
|
@@ -222,7 +237,6 @@ ul {
|
|
|
222
237
|
}
|
|
223
238
|
}
|
|
224
239
|
|
|
225
|
-
$header-height: 62px;
|
|
226
240
|
$header-height: 62px;
|
|
227
241
|
$base-color: #c6538c;
|
|
228
242
|
|
|
@@ -240,13 +254,13 @@ body {
|
|
|
240
254
|
}
|
|
241
255
|
|
|
242
256
|
.trigger {
|
|
243
|
-
margin-
|
|
257
|
+
margin-right: 16px;
|
|
244
258
|
width: 30px;
|
|
245
259
|
height: 30px;
|
|
246
|
-
background:
|
|
247
|
-
box-shadow: 0px 0px 30px 0px rgba(0,
|
|
260
|
+
background: rgba(255,255,255,0.05);
|
|
261
|
+
box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.05);
|
|
248
262
|
border-radius: 4px;
|
|
249
|
-
border: 1px solid rgba(255,
|
|
263
|
+
border: 1px solid rgba(255,255,255,0.1);
|
|
250
264
|
backdrop-filter: blur(10px);
|
|
251
265
|
display: flex;
|
|
252
266
|
justify-content: center;
|
|
@@ -268,18 +282,17 @@ body {
|
|
|
268
282
|
}
|
|
269
283
|
|
|
270
284
|
.search {
|
|
271
|
-
width: 228px;
|
|
272
285
|
height: 40px;
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
286
|
+
color: #fff;
|
|
287
|
+
background: #7E64F5;
|
|
288
|
+
box-shadow: inset 0px 2px 1px 0px rgba(0,0,0,0.05), inset 0px -2px 0px 0px #FFFFFF22;
|
|
276
289
|
border-radius: 10px;
|
|
277
|
-
|
|
278
|
-
background:
|
|
279
|
-
no-repeat;
|
|
290
|
+
background: url('https://cfel-front.oss-cn-hangzhou.aliyuncs.com/logo/base-component/menu-search-bg-console.png') no-repeat;
|
|
291
|
+
background-size: 50%;
|
|
280
292
|
background-position-x: right;
|
|
281
293
|
position: relative;
|
|
282
294
|
|
|
295
|
+
|
|
283
296
|
.search-input {
|
|
284
297
|
width: 100%;
|
|
285
298
|
height: 100%;
|
|
@@ -291,6 +304,7 @@ body {
|
|
|
291
304
|
font-size: 14px;
|
|
292
305
|
color: #ffffff;
|
|
293
306
|
|
|
307
|
+
|
|
294
308
|
&::placeholder {
|
|
295
309
|
color: rgba(255, 255, 255, 0.45);
|
|
296
310
|
}
|
|
@@ -308,8 +322,7 @@ body {
|
|
|
308
322
|
.search-icon {
|
|
309
323
|
position: absolute;
|
|
310
324
|
left: 12px;
|
|
311
|
-
top:
|
|
312
|
-
transform: translateY(-50%);
|
|
325
|
+
top: 11px;
|
|
313
326
|
}
|
|
314
327
|
|
|
315
328
|
.search-command {
|
|
@@ -341,15 +354,26 @@ body {
|
|
|
341
354
|
inset 0px -2px 0px 0px #ffffff;
|
|
342
355
|
border-radius: 10px;
|
|
343
356
|
backdrop-filter: blur(10px);
|
|
344
|
-
|
|
345
|
-
justify-content: center;
|
|
346
|
-
align-items: center;
|
|
357
|
+
padding-top: 11px;
|
|
347
358
|
cursor: pointer;
|
|
359
|
+
|
|
360
|
+
|
|
348
361
|
}
|
|
349
362
|
}
|
|
350
363
|
|
|
351
|
-
.layout-side
|
|
364
|
+
.layout-side-mask{
|
|
352
365
|
background: linear-gradient(227deg, #805df5 0%, #757ef6 38%, #3d76ec 100%) !important;
|
|
366
|
+
position: absolute;
|
|
367
|
+
top: 0;
|
|
368
|
+
left: 0;
|
|
369
|
+
width: 100%;
|
|
370
|
+
height: 100%;
|
|
371
|
+
border-radius: 16px;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
.layout-side {
|
|
376
|
+
background: transparent !important;
|
|
353
377
|
height: calc(100vh - 24px) !important;
|
|
354
378
|
user-select: none;
|
|
355
379
|
border: 2px solid white;
|
|
@@ -357,20 +381,30 @@ body {
|
|
|
357
381
|
padding-top: 24px;
|
|
358
382
|
|
|
359
383
|
.header-logo {
|
|
384
|
+
padding-left: 16px;
|
|
360
385
|
display: flex;
|
|
361
|
-
justify-content:
|
|
386
|
+
justify-content: space-between;
|
|
362
387
|
cursor: pointer;
|
|
388
|
+
height: 30px;
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
.logo-sub{
|
|
392
|
+
width: 31px;
|
|
393
|
+
height: 30px;
|
|
394
|
+
}
|
|
395
|
+
|
|
363
396
|
|
|
364
397
|
.logo-base {
|
|
365
|
-
height:
|
|
398
|
+
height: 30px;
|
|
399
|
+
width: 105px;
|
|
366
400
|
}
|
|
367
|
-
|
|
401
|
+
}
|
|
368
402
|
}
|
|
369
403
|
|
|
370
404
|
.layout-header {
|
|
371
405
|
z-index: 1;
|
|
372
406
|
height: $header-height;
|
|
373
|
-
background: linear-gradient(223deg, #
|
|
407
|
+
background: linear-gradient( 223deg, #FAF8FF 0%, #EEECFE 29%, #FFFFFF 100%);
|
|
374
408
|
box-shadow: inset 0px -1px 0px 0px #edeefd;
|
|
375
409
|
border-radius: 16px;
|
|
376
410
|
border: 1px solid #ffffff;
|
|
@@ -449,7 +483,7 @@ body {
|
|
|
449
483
|
|
|
450
484
|
.layout-content {
|
|
451
485
|
width: 100%;
|
|
452
|
-
height: calc(100vh - #{$header-height});
|
|
486
|
+
height: calc(100vh - #{$header-height} - 12px - 24px);
|
|
453
487
|
overflow: auto;
|
|
454
488
|
margin-top: 12px;
|
|
455
489
|
border-radius: 16px;
|
|
@@ -466,19 +500,93 @@ body {
|
|
|
466
500
|
}
|
|
467
501
|
|
|
468
502
|
.lists {
|
|
469
|
-
left: 0;
|
|
470
503
|
position: absolute;
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
504
|
+
z-index: 1000;
|
|
505
|
+
width: 88%;
|
|
506
|
+
background: linear-gradient(
|
|
507
|
+
227deg,
|
|
508
|
+
rgba(128, 93, 245, 0.98) 0%,
|
|
509
|
+
rgba(117, 126, 246, 0.95) 100%
|
|
510
|
+
);
|
|
511
|
+
color: #fff;
|
|
512
|
+
border-radius: 16px;
|
|
513
|
+
box-shadow:
|
|
514
|
+
0 8px 20px rgba(0, 0, 0, 0.1),
|
|
515
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.1);
|
|
516
|
+
backdrop-filter: blur(10px);
|
|
517
|
+
padding: 16px;
|
|
518
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
519
|
+
animation: dropDown 0.2s ease-out;
|
|
520
|
+
|
|
521
|
+
.ant-list-header {
|
|
522
|
+
padding: 0 0 12px;
|
|
523
|
+
font-weight: 500;
|
|
524
|
+
font-size: 14px;
|
|
525
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
526
|
+
display: flex;
|
|
527
|
+
align-items: center;
|
|
528
|
+
justify-content: space-between;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.ant-list-item {
|
|
532
|
+
color: #fff;
|
|
533
|
+
cursor: pointer;
|
|
534
|
+
padding: 10px 12px;
|
|
535
|
+
margin: 4px 0;
|
|
536
|
+
border-radius: 8px;
|
|
537
|
+
transition: all 0.2s ease;
|
|
538
|
+
display: flex;
|
|
539
|
+
align-items: center;
|
|
540
|
+
gap: 12px;
|
|
541
|
+
font-size: 14px;
|
|
542
|
+
|
|
543
|
+
&:hover {
|
|
544
|
+
background: rgba(255, 255, 255, 0.08);
|
|
545
|
+
transform: translateX(2px);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
.search-item-icon {
|
|
549
|
+
color: rgba(255, 255, 255, 0.9);
|
|
550
|
+
font-size: 16px;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.search-item-content {
|
|
554
|
+
flex: 1;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.search-item-title {
|
|
558
|
+
font-size: 14px;
|
|
559
|
+
color: rgba(255, 255, 255, 0.95);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.search-item-description {
|
|
563
|
+
font-size: 12px;
|
|
564
|
+
color: rgba(255, 255, 255, 0.6);
|
|
565
|
+
margin-top: 2px;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.search-item-shortcut {
|
|
569
|
+
font-size: 12px;
|
|
570
|
+
color: rgba(255, 255, 255, 0.5);
|
|
571
|
+
background: rgba(255, 255, 255, 0.1);
|
|
572
|
+
padding: 2px 6px;
|
|
573
|
+
border-radius: 4px;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
475
576
|
}
|
|
476
577
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
578
|
+
@keyframes dropDown {
|
|
579
|
+
from {
|
|
580
|
+
opacity: 0;
|
|
581
|
+
transform: translateY(-4px);
|
|
582
|
+
}
|
|
583
|
+
to {
|
|
584
|
+
opacity: 1;
|
|
585
|
+
transform: translateY(0);
|
|
586
|
+
}
|
|
480
587
|
}
|
|
481
588
|
|
|
589
|
+
|
|
482
590
|
.#{$menuPrefixCls}-submenu-arrow {
|
|
483
591
|
display: inline-block;
|
|
484
592
|
position: absolute;
|
|
@@ -599,3 +707,4 @@ body {
|
|
|
599
707
|
}
|
|
600
708
|
}
|
|
601
709
|
}
|
|
710
|
+
|
|
@@ -9,6 +9,7 @@ ul {
|
|
|
9
9
|
.layout-menu {
|
|
10
10
|
height: calc(100% - 120px);
|
|
11
11
|
overflow-y: scroll;
|
|
12
|
+
|
|
12
13
|
.menu{
|
|
13
14
|
padding: 0;
|
|
14
15
|
margin: 0;
|
|
@@ -26,7 +27,7 @@ ul {
|
|
|
26
27
|
.menu-item-content {
|
|
27
28
|
font-weight: 400;
|
|
28
29
|
font-size: 14px;
|
|
29
|
-
line-height:
|
|
30
|
+
line-height: 50px;
|
|
30
31
|
text-align: left;
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -49,13 +50,12 @@ ul {
|
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
.submenu-selected {
|
|
52
|
-
color: #185DFF;
|
|
53
|
+
color: #185DFF !important;
|
|
53
54
|
font-weight: 500;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
|
|
57
58
|
.sub-li {
|
|
58
|
-
background: rgba(255, 255, 255, 0.15);
|
|
59
59
|
position: relative;
|
|
60
60
|
z-index: 9;
|
|
61
61
|
|
|
@@ -113,11 +113,15 @@ ul {
|
|
|
113
113
|
box-shadow: 0px 0px 30px 0px transparent;
|
|
114
114
|
|
|
115
115
|
&.rc-menu-item-selected {
|
|
116
|
+
.menu-item-content{
|
|
117
|
+
width: 100%;
|
|
118
|
+
padding-right: 24px;
|
|
119
|
+
}
|
|
116
120
|
.menu-item-label {
|
|
117
121
|
display: flex;
|
|
118
122
|
align-items: center;
|
|
119
123
|
padding-left: 12px;
|
|
120
|
-
width:
|
|
124
|
+
width: 100%;
|
|
121
125
|
height: 40px;
|
|
122
126
|
background: #C5D6FF;
|
|
123
127
|
border-radius: 10px;
|
|
@@ -129,10 +133,9 @@ ul {
|
|
|
129
133
|
}
|
|
130
134
|
|
|
131
135
|
.grand-li {
|
|
132
|
-
background: #
|
|
136
|
+
background: #CEE1F8;
|
|
133
137
|
position: relative;
|
|
134
138
|
z-index: 9;
|
|
135
|
-
height: 52px;
|
|
136
139
|
display: flex;
|
|
137
140
|
align-items: center;
|
|
138
141
|
|
|
@@ -140,7 +143,7 @@ ul {
|
|
|
140
143
|
&::before {
|
|
141
144
|
content: '';
|
|
142
145
|
position: absolute;
|
|
143
|
-
left:
|
|
146
|
+
left: 49px;
|
|
144
147
|
top: 50%;
|
|
145
148
|
width: 5px;
|
|
146
149
|
height: 5px;
|
|
@@ -153,7 +156,7 @@ ul {
|
|
|
153
156
|
&::after {
|
|
154
157
|
content: '';
|
|
155
158
|
position: absolute;
|
|
156
|
-
left:
|
|
159
|
+
left: 51px;
|
|
157
160
|
top: 0;
|
|
158
161
|
width: 1px;
|
|
159
162
|
height: 100%;
|
|
@@ -180,11 +183,18 @@ ul {
|
|
|
180
183
|
}
|
|
181
184
|
|
|
182
185
|
&.rc-menu-item-selected {
|
|
186
|
+
.menu-item-content{
|
|
187
|
+
width: 100%;
|
|
188
|
+
padding-right: 24px;
|
|
189
|
+
height: 52px;
|
|
190
|
+
display: flex;
|
|
191
|
+
align-items: center;
|
|
192
|
+
}
|
|
183
193
|
.menu-item-label {
|
|
184
194
|
display: flex;
|
|
185
195
|
align-items: center;
|
|
186
196
|
padding-left: 12px;
|
|
187
|
-
width:
|
|
197
|
+
width: 100%;
|
|
188
198
|
height: 40px;
|
|
189
199
|
background: #C5D6FF;
|
|
190
200
|
border-radius: 10px;
|
|
@@ -225,7 +235,6 @@ ul {
|
|
|
225
235
|
}
|
|
226
236
|
|
|
227
237
|
|
|
228
|
-
$header-height: 62px;
|
|
229
238
|
$header-height: 62px;
|
|
230
239
|
$base-color: #c6538c;
|
|
231
240
|
|
|
@@ -270,14 +279,15 @@ body {
|
|
|
270
279
|
align-items: center;
|
|
271
280
|
}
|
|
272
281
|
|
|
282
|
+
|
|
273
283
|
.search {
|
|
274
|
-
width: 228px;
|
|
275
284
|
height: 40px;
|
|
276
285
|
box-shadow: inset 0px 2px 1px 0px rgba(0, 0, 0, 0.05), inset 0px -2px 0px 0px rgba(255, 255, 255, 0.3);
|
|
277
286
|
border-radius: 10px;
|
|
278
287
|
backdrop-filter: blur(10px);
|
|
279
288
|
background: url('https://cfel-front.oss-cn-hangzhou.aliyuncs.com/logo/base-component/menu-search-bg.png') no-repeat;
|
|
280
289
|
background-position-x: right;
|
|
290
|
+
background-size: 50%;
|
|
281
291
|
position: relative;
|
|
282
292
|
|
|
283
293
|
.search-input{
|
|
@@ -290,13 +300,20 @@ body {
|
|
|
290
300
|
line-height: 32px;
|
|
291
301
|
font-size: 14px;
|
|
292
302
|
color: #7D8295;
|
|
303
|
+
|
|
304
|
+
box-shadow: inset 0px 2px 1px 0px rgba(0,0,0,0.05), inset 0px -2px 0px 0px rgba(255,255,255,0.3);
|
|
305
|
+
border-radius: 10px;
|
|
306
|
+
backdrop-filter: blur(10px);
|
|
307
|
+
|
|
308
|
+
&::placeholder {
|
|
309
|
+
color: #7D8295;
|
|
310
|
+
}
|
|
293
311
|
}
|
|
294
312
|
|
|
295
313
|
.search-icon{
|
|
296
314
|
position: absolute;
|
|
297
315
|
left: 12px;
|
|
298
|
-
top:
|
|
299
|
-
transform: translateY(-50%);
|
|
316
|
+
top: 11px;
|
|
300
317
|
}
|
|
301
318
|
|
|
302
319
|
.search-command{
|
|
@@ -322,19 +339,30 @@ body {
|
|
|
322
339
|
.search-mobile{
|
|
323
340
|
width: 40px;
|
|
324
341
|
height: 40px;
|
|
325
|
-
|
|
326
|
-
box-shadow: inset 0px 2px 1px 0px rgba(0,0,0,0.05), inset 0px -2px 0px 0px #FFFFFF;
|
|
342
|
+
box-shadow: inset 0px 2px 1px 0px rgba(0,0,0,0.05), inset 0px -2px 0px 0px rgba(255,255,255,0.3);
|
|
327
343
|
border-radius: 10px;
|
|
328
344
|
backdrop-filter: blur(10px);
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
align-items: center;
|
|
345
|
+
padding-top: 11px;
|
|
346
|
+
padding-left: 12px;
|
|
332
347
|
cursor: pointer;
|
|
333
348
|
}
|
|
334
349
|
}
|
|
335
350
|
|
|
351
|
+
.layout-side-mask{
|
|
352
|
+
background: radial-gradient( 152% 131% at 3% 1%, #E8E2FA 0%, #C4D0F3 10%, #AFCAF8 25%, #89BFF6 49%, #478EED 100%);
|
|
353
|
+
opacity: 0.3;
|
|
354
|
+
position: absolute;
|
|
355
|
+
top: 0;
|
|
356
|
+
left: 0;
|
|
357
|
+
width: 100%;
|
|
358
|
+
height: 100%;
|
|
359
|
+
border-radius: 16px;
|
|
360
|
+
}
|
|
361
|
+
|
|
336
362
|
.layout-side {
|
|
337
|
-
|
|
363
|
+
// background: url('https://cfel-front.oss-cn-hangzhou.aliyuncs.com/logo/base-component/menu-bg-other.png') no-repeat !important;
|
|
364
|
+
background: transparent !important;
|
|
365
|
+
position: relative;
|
|
338
366
|
height: calc(100vh - 24px);
|
|
339
367
|
user-select: none;
|
|
340
368
|
border: 2px solid white;
|
|
@@ -343,15 +371,22 @@ body {
|
|
|
343
371
|
overflow: visible;
|
|
344
372
|
|
|
345
373
|
.header-logo {
|
|
374
|
+
padding-left: 16px;
|
|
346
375
|
display: flex;
|
|
347
|
-
justify-content:
|
|
376
|
+
justify-content: space-between;
|
|
348
377
|
cursor: pointer;
|
|
349
|
-
height:
|
|
378
|
+
height: 30px;
|
|
379
|
+
|
|
380
|
+
.logo-sub{
|
|
381
|
+
width: 31px;
|
|
382
|
+
height: 30px;
|
|
383
|
+
}
|
|
350
384
|
|
|
351
385
|
.logo-base {
|
|
352
|
-
height:
|
|
386
|
+
height: 30px;
|
|
387
|
+
width: 105px;
|
|
353
388
|
}
|
|
354
|
-
|
|
389
|
+
}
|
|
355
390
|
}
|
|
356
391
|
|
|
357
392
|
.layout-header {
|
|
@@ -436,7 +471,7 @@ body {
|
|
|
436
471
|
|
|
437
472
|
.layout-content {
|
|
438
473
|
width: 100%;
|
|
439
|
-
height: calc(100vh - #{$header-height});
|
|
474
|
+
height: calc(100vh - #{$header-height} - 12px - 24px);
|
|
440
475
|
overflow: auto;
|
|
441
476
|
margin-top: 12px;
|
|
442
477
|
border-radius: 16px;
|
|
@@ -457,22 +492,17 @@ body {
|
|
|
457
492
|
|
|
458
493
|
|
|
459
494
|
|
|
460
|
-
.
|
|
461
|
-
left: 0;
|
|
495
|
+
.lists{
|
|
462
496
|
position: absolute;
|
|
463
497
|
width: 100%;
|
|
464
498
|
background: white;
|
|
465
499
|
cursor: pointer;
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
.search-item:hover{
|
|
470
|
-
background-color: ghostwhite;
|
|
471
|
-
border-radius: 7px;
|
|
500
|
+
position: absolute;
|
|
501
|
+
z-index: 1000;
|
|
502
|
+
width: 88%;
|
|
472
503
|
}
|
|
473
504
|
|
|
474
505
|
|
|
475
|
-
|
|
476
506
|
.#{$menuPrefixCls}-submenu-arrow {
|
|
477
507
|
display: inline-block;
|
|
478
508
|
position: absolute;
|
|
@@ -181,6 +181,8 @@ export default function LiosLayout(props: LiosLayoutlProps) {
|
|
|
181
181
|
setCollapsed(value)
|
|
182
182
|
}}
|
|
183
183
|
>
|
|
184
|
+
<div className="layout-side-mask"></div>
|
|
185
|
+
|
|
184
186
|
<div className="header-logo" style={{ justifyContent: collapsed ? 'center' : '', paddingLeft: collapsed ? '0' : '' }}>
|
|
185
187
|
<div
|
|
186
188
|
onClick={() => {
|
|
@@ -188,23 +190,23 @@ export default function LiosLayout(props: LiosLayoutlProps) {
|
|
|
188
190
|
}}
|
|
189
191
|
>
|
|
190
192
|
{!collapsed && <img className={`logo-base current-logo`} src={logo || logoUrl} />}
|
|
191
|
-
|
|
192
|
-
{collapsed && <img className={`logo-base sub-logo`} src={logo || subLogoUrl} />}
|
|
193
|
+
{collapsed && <img className={`logo-sub`} src={subLogoUrl} />}
|
|
194
|
+
{/* {collapsed && <img className={`logo-base sub-logo`} src={logo || subLogoUrl} />} */}
|
|
193
195
|
</div>
|
|
194
196
|
|
|
195
|
-
{/*
|
|
197
|
+
{/* {!collapsed && (
|
|
196
198
|
<div
|
|
197
|
-
className=
|
|
199
|
+
className='trigger'
|
|
198
200
|
onClick={() => {
|
|
199
201
|
setCollapsed(true)
|
|
200
202
|
}}
|
|
201
203
|
>
|
|
202
|
-
<Arrow collapsed={true} />
|
|
204
|
+
<Arrow collapsed={true} type={type} />
|
|
203
205
|
</div>
|
|
204
206
|
)} */}
|
|
205
207
|
</div>
|
|
206
208
|
|
|
207
|
-
{
|
|
209
|
+
{collapsed && (
|
|
208
210
|
<div style={{ width: '100%', display: 'flex', justifyContent: 'center' }}>
|
|
209
211
|
<div
|
|
210
212
|
className="close-trigger"
|
|
@@ -212,12 +214,18 @@ export default function LiosLayout(props: LiosLayoutlProps) {
|
|
|
212
214
|
setCollapsed(false)
|
|
213
215
|
}}
|
|
214
216
|
>
|
|
215
|
-
<Arrow collapsed={false} />
|
|
217
|
+
<Arrow collapsed={false} type={type} />
|
|
216
218
|
</div>
|
|
217
219
|
</div>
|
|
218
|
-
)}
|
|
220
|
+
)}
|
|
221
|
+
|
|
222
|
+
<div style={{ height: 24 }}></div>
|
|
223
|
+
|
|
224
|
+
<div style={{ width: '100%', padding: '0 16px' }}>
|
|
225
|
+
<Search menuList={menuList} collapsed={collapsed} type={type || ''} />
|
|
226
|
+
</div>
|
|
219
227
|
|
|
220
|
-
{!collapsed && <div style={{ height:
|
|
228
|
+
{!collapsed && <div style={{ height: 12 }}></div>}
|
|
221
229
|
|
|
222
230
|
<div className="layout-menu">
|
|
223
231
|
<RcMenu
|
|
@@ -373,23 +381,20 @@ export default function LiosLayout(props: LiosLayoutlProps) {
|
|
|
373
381
|
)
|
|
374
382
|
}
|
|
375
383
|
|
|
376
|
-
function Arrow({ collapsed }: { collapsed?: boolean }) {
|
|
384
|
+
function Arrow({ collapsed, type }: { collapsed?: boolean; type?: string }) {
|
|
377
385
|
return (
|
|
378
|
-
<
|
|
379
|
-
<
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
</svg>
|
|
385
|
-
</div>
|
|
386
|
+
<svg style={{ transform: !collapsed ? 'rotate(180deg)' : 'rotate(0deg)' }} viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20">
|
|
387
|
+
<path
|
|
388
|
+
fill={type === 'console' ? '#FFFFFF' : '#817F9B'}
|
|
389
|
+
d="M564.6336 775.168a41.5744 41.5744 0 0 0-13.312-28.672l-230.4-234.4448 229.9904-234.1888a42.0864 42.0864 0 0 0-26.3168-73.0112 42.0864 42.0864 0 0 0-30.6176 11.264L231.0656 481.024a41.984 41.984 0 0 0-2.4576 59.5968l1.9968 2.048 263.7824 265.6256a41.984 41.984 0 0 0 70.2464-33.0752z m254.5152 0a41.472 41.472 0 0 0-13.312-28.672L575.488 512l229.9904-234.1376a41.984 41.984 0 1 0-56.9344-61.7984L485.632 480.9728a42.0864 42.0864 0 0 0-2.4064 59.6992l0.8704 0.9216 0.8704 0.8192 0.4096 0.4096 263.5776 265.4208a41.984 41.984 0 0 0 70.1952-33.0752z"
|
|
390
|
+
></path>
|
|
391
|
+
</svg>
|
|
386
392
|
)
|
|
387
393
|
}
|
|
388
394
|
|
|
389
395
|
function Search({ menuList, collapsed, type }: { menuList: any; collapsed: boolean; type: string }) {
|
|
390
396
|
useEffect(() => {
|
|
391
397
|
const handleKeyDown = (event: KeyboardEvent) => {
|
|
392
|
-
// Check for Ctrl+K (Windows) or Cmd+K (Mac)
|
|
393
398
|
if ((navigator.platform.toLowerCase().includes('mac') ? event.metaKey : event.ctrlKey) && event.key.toLowerCase() === 'k') {
|
|
394
399
|
event.preventDefault()
|
|
395
400
|
const searchInput = document.querySelector('#menu-input') as HTMLInputElement
|
|
@@ -438,7 +443,14 @@ function Search({ menuList, collapsed, type }: { menuList: any; collapsed: boole
|
|
|
438
443
|
setSearchResult(searchResults)
|
|
439
444
|
function search(data: Router[]) {
|
|
440
445
|
data.forEach((item) => {
|
|
441
|
-
if (item.
|
|
446
|
+
if (item.key === '/quota-check') {
|
|
447
|
+
searchResults.push({
|
|
448
|
+
label: '配额列表',
|
|
449
|
+
key: '/quota-check',
|
|
450
|
+
})
|
|
451
|
+
return
|
|
452
|
+
}
|
|
453
|
+
if (typeof item.label === 'string' && item.label.includes(value.toLocaleUpperCase())) {
|
|
442
454
|
searchResults.push(item)
|
|
443
455
|
}
|
|
444
456
|
if (item.children) {
|
|
@@ -482,11 +494,10 @@ function Search({ menuList, collapsed, type }: { menuList: any; collapsed: boole
|
|
|
482
494
|
<>
|
|
483
495
|
{collapsed ? (
|
|
484
496
|
<div className="search-mobile">
|
|
485
|
-
{' '}
|
|
486
497
|
<div className="search-icon">
|
|
487
498
|
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="18" height="18">
|
|
488
499
|
<path
|
|
489
|
-
fill=
|
|
500
|
+
fill={type === 'console' ? '#C2B7F6' : '#817F9B'}
|
|
490
501
|
d="M962.048 907.776l-229.0176-229.0176a384.3072 384.3072 0 1 0-54.272 54.272l229.0176 229.0176a38.4 38.4 0 0 0 54.272-54.272zM436.1216 743.0656a306.944 306.944 0 1 1 306.944-306.944 307.3024 307.3024 0 0 1-306.944 306.944z"
|
|
491
502
|
></path>
|
|
492
503
|
</svg>
|
|
@@ -504,18 +515,27 @@ function Search({ menuList, collapsed, type }: { menuList: any; collapsed: boole
|
|
|
504
515
|
></path>
|
|
505
516
|
</svg>
|
|
506
517
|
</div>
|
|
507
|
-
<div className="search-command"
|
|
518
|
+
<div className="search-command" style={{ width: navigator.platform.toLowerCase().includes('mac') ? '' : '50px' }}>
|
|
519
|
+
{navigator.platform.toLowerCase().includes('mac') ? '⌘' : 'Ctrl+'}K
|
|
520
|
+
</div>
|
|
521
|
+
|
|
522
|
+
{/* <div
|
|
523
|
+
className='search-command'
|
|
524
|
+
style={{ width: '50px' }}
|
|
525
|
+
>
|
|
526
|
+
{'Ctrl+'}K
|
|
527
|
+
</div> */}
|
|
508
528
|
</div>
|
|
509
529
|
<div>
|
|
510
530
|
{isHovered && (
|
|
511
531
|
<>
|
|
512
532
|
{searchTerm ? (
|
|
513
|
-
<List split={false} className="
|
|
533
|
+
<List split={false} className="lists" size="small" bordered dataSource={searchResult} renderItem={(item) => <List.Item onClick={() => enter(item)}>{item.label}</List.Item>} />
|
|
514
534
|
) : (
|
|
515
535
|
<List
|
|
516
536
|
split={false}
|
|
517
|
-
className="
|
|
518
|
-
header=
|
|
537
|
+
className="lists"
|
|
538
|
+
header="最近访问"
|
|
519
539
|
size="small"
|
|
520
540
|
bordered
|
|
521
541
|
dataSource={searchHistory}
|
|
@@ -532,7 +552,7 @@ function Search({ menuList, collapsed, type }: { menuList: any; collapsed: boole
|
|
|
532
552
|
>
|
|
533
553
|
<List.Item>{item.label}</List.Item>
|
|
534
554
|
<div
|
|
535
|
-
style={{ paddingRight: 10 }}
|
|
555
|
+
style={{ paddingRight: 10, cursor: 'pointer' }}
|
|
536
556
|
onClick={() => {
|
|
537
557
|
deleteHistory(item)
|
|
538
558
|
}}
|