cfel-base-components 2.5.53 → 2.5.54

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.
@@ -4,7 +4,7 @@ import style from './index.module.less'
4
4
  import { SwapOutlined, QqOutlined, WeiboOutlined } from '@ant-design/icons'
5
5
  import { ConfigProvider } from 'antd'
6
6
  import Layout from '../../src/components/layout'
7
- //import Layout from '../../src/components/layout-console'
7
+ // import Layout from '../../src/components/layout-console'
8
8
  import { QuestionCircleTwoTone } from '@ant-design/icons'
9
9
  // import Account from '../../src/components/universal-pages/account';
10
10
  // import AccountInfo from '../../src/components/universal-pages/accountInfo';
@@ -26,11 +26,19 @@ const menuList = [
26
26
  children: [
27
27
  {
28
28
  label: '产品模型',
29
- key: 'product-list',
29
+ key: 'product-list1',
30
30
  children: [
31
31
  {
32
32
  label: '产品模型',
33
- key: 'product-list',
33
+ key: 'product-list2',
34
+ },
35
+ {
36
+ label: '产品模型',
37
+ key: 'product-list3',
38
+ },
39
+ {
40
+ label: '产品模型',
41
+ key: 'product-list4',
34
42
  },
35
43
  ],
36
44
  },
@@ -39,13 +47,19 @@ const menuList = [
39
47
  key: 'commodity-list',
40
48
  children: [
41
49
  {
42
- label: '产品模型',
43
- key: 'product-list',
50
+ label: <>
51
+ <span>配额列表</span>
52
+ <span className={style.quotaCount}>12</span>
53
+ </>,
54
+ key: 'product-list3',
44
55
  },
45
56
  ],
46
57
  },
47
58
  {
48
- label: '定价项列表',
59
+ label:<>
60
+ <span>配额列表</span>
61
+ <span className={style.quotaCount}>12</span>
62
+ </>,
49
63
  key: 'entity-list',
50
64
  },
51
65
  {
@@ -58,10 +72,54 @@ const menuList = [
58
72
  label: '数据字典',
59
73
  icon: <SwapOutlined />,
60
74
  key: 'dictionary-list',
75
+ children: [
76
+ {
77
+ label: '产品模型',
78
+ key: 'product-lis1',
79
+ children: [
80
+ {
81
+ label: '产品模型',
82
+ key: 'product-lit2',
83
+ },
84
+ {
85
+ label: '产品模型',
86
+ key: 'product-lit3',
87
+ },
88
+ {
89
+ label: '产品模型',
90
+ key: 'product-lit4',
91
+ },
92
+ ],
93
+ },
94
+ {
95
+ label: '商品模型',
96
+ key: 'commodity-li1st',
97
+ children: [
98
+ {
99
+ label: <>
100
+ <span>配额列表</span>
101
+ <span className={style.quotaCount}>12</span>
102
+ </>,
103
+ key: 'product-list3',
104
+ },
105
+ ],
106
+ },
107
+ {
108
+ label:<>
109
+ <span>配额列表</span>
110
+ <span className={style.quotaCount}>12</span>
111
+ </>,
112
+ key: 'entity-list',
113
+ },
114
+ {
115
+ label: '资源类型管理',
116
+ key: 'rsourceType-listawsd',
117
+ },
118
+ ],
61
119
  },
62
120
  {
63
121
  label: '实例管理',
64
- icon: <i className="iconfont icon-moxing-miaobian" />,
122
+ icon: <SwapOutlined />,
65
123
  children: [
66
124
  {
67
125
  label: '容器镜像服务管理',
@@ -89,7 +147,7 @@ const menuList = [
89
147
  {
90
148
  label: 'API管理',
91
149
  key: 'apiAction',
92
- icon: <i className="iconfont icon-API" />,
150
+ icon: <SwapOutlined />,
93
151
  children: [
94
152
  {
95
153
  label: 'API 应用管理',
@@ -108,7 +166,7 @@ const menuList = [
108
166
  {
109
167
  label: '消息中心',
110
168
  key: 'msgAction',
111
- icon: <i className="iconfont icon-xiaoxi" />,
169
+ icon: <SwapOutlined />,
112
170
  children: [
113
171
  {
114
172
  label: '消息管理',
@@ -131,7 +189,7 @@ const menuList = [
131
189
  {
132
190
  label: '权限资源配置',
133
191
  key: 'menuAction',
134
- icon: <i className="iconfont icon-qingdan" />,
192
+ icon: <SwapOutlined />,
135
193
  children: [
136
194
  {
137
195
  label: '菜单管理',
@@ -149,18 +207,18 @@ const menuList = [
149
207
  },
150
208
  {
151
209
  label: '配额管理',
152
- icon: <i className="iconfont icon-peie" />,
210
+ icon: <SwapOutlined />,
153
211
  key: 'quotaList',
154
212
  },
155
213
  {
156
214
  label: '库存管理',
157
- icon: <i className="iconfont icon-peie" />,
215
+ icon: <SwapOutlined />,
158
216
  key: 'inventoryList',
159
217
  },
160
218
  {
161
219
  label: '权限管理',
162
220
  key: 'authority',
163
- icon: <i className="iconfont icon-shezhi" />,
221
+ icon: <SwapOutlined />,
164
222
  children: [
165
223
  {
166
224
  label: '账号列表',
@@ -1,4 +1,24 @@
1
- *,body{
2
- padding: 0px;
3
- margin: 0px;
1
+ *,
2
+ body {
3
+ padding: 0px;
4
+ margin: 0px;
5
+ }
6
+
7
+ .quotaCount {
8
+ display: inline-flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ margin-inline-end: 6px;
12
+ width: 28px;
13
+ height: 28px;
14
+ background: rgba(255, 255, 255, 20%);
15
+ box-shadow: 0 0 10px 0 rgba(0, 0, 0, 5%);
16
+ border-radius: 8px;
17
+ backdrop-filter: blur(10px);
18
+ color: rgba(0, 0, 0, 60%);
19
+ font-weight: 500;
20
+ font-size: 14px;
21
+ line-height: 20px;
22
+ text-align: left;
23
+ font-style: normal;
4
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cfel-base-components",
3
- "version": "2.5.53",
3
+ "version": "2.5.54",
4
4
  "description": "cfel-base-components",
5
5
  "main": "/src/index.tsx",
6
6
  "types": "src/index.d.ts",
@@ -7,14 +7,16 @@ ul {
7
7
  }
8
8
 
9
9
  .ant-layout {
10
- background: linear-gradient(223deg, #fef8ff 0%, #ecf3fe 29%, #f9faff 100%) !important;
11
- box-shadow: inset 0px -1px 0px 0px #edeefd !important;
10
+ background: linear-gradient( 223deg, #FEF8FF 0%, #ECF3FE 29%, #F9FAFF 100%);
11
+ box-shadow: inset 0px -1px 0px 0px #EDEEFD;
12
12
  }
13
13
 
14
14
  .layout-menu {
15
15
  border-radius: 16px;
16
16
  height: calc(100% - 109px);
17
17
  overflow-y: scroll;
18
+ position: relative;
19
+ z-index: 11;
18
20
 
19
21
  .menu {
20
22
  padding: 0;
@@ -41,7 +43,7 @@ ul {
41
43
  &::after {
42
44
  position: absolute;
43
45
  width: 6px;
44
- height: 1.25px;
46
+ height: 1px;
45
47
  scale: 1.25;
46
48
  background: #788bb1;
47
49
  border-radius: 2px;
@@ -178,6 +180,19 @@ ul {
178
180
  position: relative;
179
181
  z-index: 9;
180
182
 
183
+
184
+ .menu-item-content {
185
+ width: 100%;
186
+ padding-right: 24px;
187
+
188
+ .menu-item-label {
189
+ width: 100%;
190
+ display: inline-flex;
191
+ align-items: center;
192
+ justify-content: space-between;
193
+ }
194
+ }
195
+
181
196
  &:hover {
182
197
  > .menu-item-content {
183
198
  .menu-item-icon,
@@ -197,14 +212,14 @@ ul {
197
212
  width: 5px;
198
213
  height: 5px;
199
214
  background: #b4c4dc;
200
- border-radius: 50%;
215
+ border-radius: 100%;
201
216
  z-index: 1;
202
217
  }
203
218
 
204
219
  &::after {
205
220
  content: '';
206
221
  position: absolute;
207
- left: 32.8px;
222
+ left: 32.9px;
208
223
  top: 0 !important;
209
224
  width: 1px;
210
225
  height: 100%;
@@ -263,13 +278,28 @@ ul {
263
278
  }
264
279
 
265
280
  .grand-li {
266
- background: #dcebfc;
281
+ background: rgba(224,235,251);
267
282
  position: relative;
268
283
  z-index: 9;
269
284
  display: flex;
270
285
  align-items: center;
271
286
  margin-left: 2px;
272
- width: 252px;
287
+
288
+
289
+ .menu-item-content {
290
+ width: 100%;
291
+ padding-right: 24px;
292
+ height: 52px;
293
+ display: flex;
294
+ align-items: center;
295
+
296
+ .menu-item-label {
297
+ width: 100%;
298
+ display: inline-flex;
299
+ align-items: center;
300
+ justify-content: space-between;
301
+ }
302
+ }
273
303
 
274
304
  &:hover {
275
305
  > .menu-item-content {
@@ -293,7 +323,7 @@ ul {
293
323
  width: 5px;
294
324
  height: 5px;
295
325
  background: #b4c4dc;
296
- border-radius: 50%;
326
+ border-radius: 100%;
297
327
  transform: translateY(-50%);
298
328
  z-index: 1;
299
329
  }
@@ -328,16 +358,7 @@ ul {
328
358
  }
329
359
 
330
360
  &.rc-menu-item-selected {
331
- .menu-item-content {
332
- width: 100%;
333
- padding-right: 24px;
334
- height: 52px;
335
- display: flex;
336
- align-items: center;
337
- }
338
361
  .menu-item-label {
339
- display: flex;
340
- align-items: center;
341
362
  padding-left: 12px;
342
363
  width: 100%;
343
364
  height: 40px;
@@ -429,6 +450,7 @@ body {
429
450
  border-radius: 10px;
430
451
  backdrop-filter: blur(10px);
431
452
  position: relative;
453
+ z-index: 11;
432
454
 
433
455
  .search-bg-mask {
434
456
  position: absolute;
@@ -458,9 +480,6 @@ body {
458
480
  background: rgba(0, 0, 0, 0.05);
459
481
  }
460
482
 
461
- box-shadow:
462
- inset 0px 2px 1px 0px rgba(0, 0, 0, 0.05),
463
- inset 0px -2px 0px 0px rgba(255, 255, 255, 0.3);
464
483
  border-radius: 10px;
465
484
  backdrop-filter: blur(10px);
466
485
 
@@ -509,6 +528,17 @@ body {
509
528
  }
510
529
 
511
530
  .layout-side-mask1 {
531
+ background: white;
532
+ position: absolute;
533
+ top: 0;
534
+ left: 0;
535
+ width: 100%;
536
+ height: 100%;
537
+ border-radius: 16px;
538
+ z-index: 9;
539
+ }
540
+
541
+ .layout-side-mask2 {
512
542
  background: radial-gradient(
513
543
  152% 131% at 3% 1%,
514
544
  #e8e2fa 0%,
@@ -524,10 +554,10 @@ body {
524
554
  width: 100%;
525
555
  height: 100%;
526
556
  border-radius: 16px;
557
+ z-index: 10;
527
558
  }
528
559
 
529
560
  .layout-side {
530
- // background: url('https://cfel-front.oss-cn-hangzhou.aliyuncs.com/logo/base-component/menu-bg-other.png') no-repeat !important;
531
561
  background: transparent !important;
532
562
  position: relative;
533
563
  height: calc(100vh - 24px);
@@ -543,6 +573,8 @@ body {
543
573
  justify-content: space-between;
544
574
  cursor: pointer;
545
575
  height: 30px;
576
+ position: relative;
577
+ z-index: 11;
546
578
 
547
579
  .logo-sub {
548
580
  width: 31px;
@@ -559,7 +591,7 @@ body {
559
591
  .layout-header {
560
592
  z-index: 1;
561
593
  height: $header-height;
562
- background: linear-gradient(223deg, #faf8ff 0%, #ecf2fe 29%, #ffffff 100%);
594
+ background: linear-gradient( 223deg, #FAF8FF 0%, #ECF2FE 29%, #FFFFFF 100%);
563
595
  border-radius: 16px;
564
596
  border: 1px solid #ffffff;
565
597
  position: relative;
@@ -760,57 +792,3 @@ body {
760
792
  }
761
793
  }
762
794
 
763
-
764
- .#{$menuPrefixCls} {
765
- &-zoom-enter,
766
- &-zoom-appear {
767
- opacity: 0;
768
- animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
769
- animation-play-state: paused;
770
- }
771
-
772
- &-zoom-leave {
773
- animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
774
- animation-play-state: paused;
775
- }
776
-
777
- &-zoom-enter#{&}-zoom-enter-active,
778
- &-zoom-appear#{&}-zoom-appear-active {
779
- animation-name: rcMenuOpenZoomIn;
780
- animation-play-state: running;
781
- }
782
-
783
- &-zoom-leave#{&}-zoom-leave-active {
784
- animation-name: rcMenuOpenZoomOut;
785
- animation-play-state: running;
786
- }
787
-
788
- &-zoom-enter,
789
- &-zoom-appear,
790
- &-zoom-leave {
791
- .#{$menuPrefixCls}-submenu-rtl & {
792
- transform-origin: top right !important;
793
- }
794
- }
795
-
796
- @keyframes rcMenuOpenZoomIn {
797
- 0% {
798
- opacity: 0;
799
- transform: scale(0, 0);
800
- }
801
- 100% {
802
- opacity: 1;
803
- transform: scale(1, 1);
804
- }
805
- }
806
-
807
- @keyframes rcMenuOpenZoomOut {
808
- 0% {
809
- transform: scale(1, 1);
810
- }
811
- 100% {
812
- opacity: 0;
813
- transform: scale(0, 0);
814
- }
815
- }
816
- }
@@ -106,7 +106,8 @@ export default function LiosLayout(props: LiosLayoutlProps) {
106
106
  const { name, avatar } = user || {}
107
107
 
108
108
  // 初始化展开菜单
109
- const [openKeys, setOpenKeys] = useState<any>(defaultOpenKeys || [])
109
+ const [openKeys, setOpenKeys] = useState<string[]>(defaultOpenKeys || [])
110
+ const [activeThirdLevelMenu, setActiveThirdLevelMenu] = useState<string | null>(null)
110
111
 
111
112
  //处理搜索菜单后自动展开目录
112
113
  const findParentMenu = (menuList: any[], pathname: string) => {
@@ -150,7 +151,25 @@ export default function LiosLayout(props: LiosLayoutlProps) {
150
151
  })
151
152
 
152
153
  const onOpenChange: MenuProps['onOpenChange'] = (keys) => {
153
- setOpenKeys(keys)
154
+ // Find the last opened key
155
+ const latestOpenKey = keys.find((key) => openKeys.indexOf(key) === -1)
156
+
157
+ if (latestOpenKey) {
158
+ // If opening a new key
159
+ const rootSubmenuKeys = menuList.map((item) => item.key)
160
+
161
+ if (rootSubmenuKeys.indexOf(latestOpenKey) === -1) {
162
+ // If it's a third level menu, only keep its parent menu open
163
+ const parentKey = keys.find((key) => rootSubmenuKeys.includes(key))
164
+ setOpenKeys(parentKey ? [parentKey, latestOpenKey] : [latestOpenKey])
165
+ } else {
166
+ // If it's a second level menu, only keep it open
167
+ setOpenKeys([latestOpenKey])
168
+ }
169
+ } else {
170
+ // If closing a menu
171
+ setOpenKeys(keys)
172
+ }
154
173
  }
155
174
 
156
175
  const copyTextToClipboard = async (text: string, key: string) => {
@@ -187,6 +206,13 @@ export default function LiosLayout(props: LiosLayoutlProps) {
187
206
  motionLeave: true,
188
207
  }
189
208
 
209
+ useEffect(() => {
210
+ return () => {
211
+ setActiveThirdLevelMenu(null)
212
+ setOpenKeys([])
213
+ }
214
+ }, [])
215
+
190
216
  return (
191
217
  <Layout className="layout-warps">
192
218
  {Array.isArray(menuList) && menuList.length > 0 && (
@@ -205,6 +231,7 @@ export default function LiosLayout(props: LiosLayoutlProps) {
205
231
  }}
206
232
  >
207
233
  <div className="layout-side-mask1"></div>
234
+ <div className="layout-side-mask2"></div>
208
235
 
209
236
  <div className="header-logo" style={{ justifyContent: collapsed ? 'center' : '', paddingLeft: collapsed ? '0' : '' }}>
210
237
  <div
@@ -42,7 +42,7 @@ ul {
42
42
  &::after {
43
43
  position: absolute;
44
44
  width: 6px;
45
- height: 1.25px;
45
+ height: 1px;
46
46
  scale: 1.25;
47
47
  background: rgba(255, 255, 255, 0.65);
48
48
  border-radius: 2px;
@@ -220,6 +220,20 @@ ul {
220
220
  position: relative;
221
221
  z-index: 9;
222
222
  line-height: 52px;
223
+ width: 100%;
224
+
225
+ .menu-item-content{
226
+ width: 100%;
227
+ padding-right: 24px;
228
+
229
+ .menu-item-label{
230
+ width: 100%;
231
+ display: flex;
232
+ align-items: center;
233
+ justify-content: space-between;
234
+ }
235
+ }
236
+
223
237
 
224
238
  &::before {
225
239
  content: '';
@@ -229,14 +243,14 @@ ul {
229
243
  width: 5px;
230
244
  height: 5px;
231
245
  background: #8f9cec;
232
- border-radius: 50%;
246
+ border-radius: 100%;
233
247
  z-index: 1;
234
248
  }
235
249
 
236
250
  &::after {
237
251
  content: '';
238
252
  position: absolute;
239
- left: 32.8px;
253
+ left: 32.9px;
240
254
  top: 0 !important;
241
255
  width: 1px;
242
256
  height: 100%;
@@ -275,10 +289,6 @@ ul {
275
289
  box-shadow: 0px 0px 30px 0px transparent;
276
290
 
277
291
  &.rc-menu-item-selected {
278
- .menu-item-content {
279
- width: 100%;
280
- padding-right: 24px;
281
- }
282
292
  .menu-item-label {
283
293
  color: #fff;
284
294
  font-weight: 500;
@@ -286,7 +296,6 @@ ul {
286
296
  align-items: center;
287
297
  padding-left: 12px;
288
298
  width: 100%;
289
- padding-right: 24px;
290
299
  height: 40px;
291
300
  background: rgba(255, 255, 255, 0.05);
292
301
  box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.05);
@@ -300,7 +309,7 @@ ul {
300
309
  }
301
310
 
302
311
  .grand-li {
303
- background: #206abd;
312
+ background: #3568B7;
304
313
  position: relative;
305
314
  z-index: 9;
306
315
  line-height: 52px;
@@ -321,7 +330,7 @@ ul {
321
330
  width: 5px;
322
331
  height: 5px;
323
332
  background: #8f9cec;
324
- border-radius: 50%;
333
+ border-radius: 100%;
325
334
  transform: translateY(-50%);
326
335
  z-index: 2;
327
336
  }
@@ -387,12 +396,14 @@ ul {
387
396
  }
388
397
  }
389
398
 
390
- .menu-collapsed-console {
399
+ .menu-console-collapsed {
391
400
  display: flex;
392
401
  flex-direction: column;
393
402
  align-items: center;
394
403
  list-style: none;
395
404
  cursor: pointer;
405
+ position: relative;
406
+ z-index: 20;
396
407
 
397
408
  .menu-item-content {
398
409
  font-weight: 400;
@@ -441,13 +452,15 @@ body {
441
452
  }
442
453
 
443
454
  .close-trigger-console {
455
+ position: relative;
456
+ z-index: 20;
444
457
  margin-top: 24px;
445
458
  width: 30px;
446
459
  height: 30px;
447
- background: #f0f4fe;
460
+ background: rgba(255, 255, 255, 0.05);
448
461
  box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.05);
449
462
  border-radius: 4px;
450
- border: 1px solid rgba(255, 255, 255, 0.55);
463
+ border: 1px solid rgba(255, 255, 255, 0.1);
451
464
  backdrop-filter: blur(10px);
452
465
  display: flex;
453
466
  justify-content: center;
@@ -456,7 +469,7 @@ body {
456
469
 
457
470
  .search-console {
458
471
  position: relative;
459
- z-index: 99;
472
+ z-index: 11;
460
473
  height: 40px;
461
474
  color: #fff;
462
475
  background: #5b6ecf;
@@ -548,6 +561,19 @@ body {
548
561
  }
549
562
  }
550
563
 
564
+ .layout-side-mask1-console {
565
+ z-index: 9;
566
+ background: white;
567
+ border: 2px solid #ffffff;
568
+ position: absolute;
569
+ top: 0;
570
+ left: 0;
571
+ width: 100%;
572
+ height: 100%;
573
+ border-radius: 16px;
574
+ }
575
+
576
+
551
577
  .layout-side-mask2-console {
552
578
  z-index: 10;
553
579
  background: linear-gradient(227deg, #7856e6 0%, #6a6ed2 0%, #0271c3 100%) !important;
@@ -575,7 +601,8 @@ body {
575
601
  cursor: pointer;
576
602
  height: 30px;
577
603
  position: relative;
578
- z-index: 99;
604
+ z-index: 11;
605
+
579
606
 
580
607
  .logo-sub {
581
608
  width: 31px;
@@ -590,36 +617,6 @@ body {
590
617
  }
591
618
 
592
619
  .layout-header-console {
593
- .down {
594
- transform: rotate(0deg);
595
- animation: downanimation 0.3s ease-in-out;
596
- }
597
-
598
- @keyframes downanimation {
599
- from {
600
- transform: rotate(180deg);
601
- }
602
-
603
- to {
604
- transform: rotate(0deg);
605
- }
606
- }
607
-
608
- //---
609
- .up {
610
- transform: rotate(180deg);
611
- animation: upanimation 0.3s ease-in-out;
612
- }
613
-
614
- @keyframes upanimation {
615
- from {
616
- transform: rotate(0deg);
617
- }
618
-
619
- to {
620
- transform: rotate(180deg);
621
- }
622
- }
623
620
 
624
621
  z-index: 1;
625
622
  height: $header-height;
@@ -675,6 +672,37 @@ body {
675
672
  border-radius: 6px;
676
673
  cursor: pointer;
677
674
 
675
+ &-down {
676
+ transform: rotate(0deg);
677
+ animation: downanimation 0.3s ease-in-out;
678
+ }
679
+
680
+ @keyframes downanimation {
681
+ from {
682
+ transform: rotate(180deg);
683
+ }
684
+
685
+ to {
686
+ transform: rotate(0deg);
687
+ }
688
+ }
689
+
690
+ //---
691
+ &-up {
692
+ transform: rotate(180deg);
693
+ animation: upanimation 0.3s ease-in-out;
694
+ }
695
+
696
+ @keyframes upanimation {
697
+ from {
698
+ transform: rotate(0deg);
699
+ }
700
+
701
+ to {
702
+ transform: rotate(180deg);
703
+ }
704
+ }
705
+
678
706
  &:hover {
679
707
  background: rgba(0, 0, 0, 0.06);
680
708
  }