cfel-base-components 2.5.61 → 2.5.63
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/.vscode/settings.json +3 -0
- package/package.json +1 -1
- package/src/.umi/core/helmet.ts +1 -1
- package/src/components/layout/index.tsx +10 -2
- package/src/components/layout-cloud/index.scss +889 -0
- package/src/components/layout-cloud/index.tsx +736 -0
- package/src/components/layout-cloud/user-card/index.scss +180 -0
- package/src/components/layout-cloud/user-card/index.tsx +162 -0
- package/src/components/layout-console/index.tsx +33 -37
- package/src/index.tsx +2 -0
package/package.json
CHANGED
package/src/.umi/core/helmet.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// This file is generated by Umi automatically
|
|
3
3
|
// DO NOT CHANGE IT MANUALLY!
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { HelmetProvider } from '/Users/
|
|
5
|
+
import { HelmetProvider } from '/Users/wujingang/Desktop/workspace/base-components/node_modules/@umijs/renderer-react';
|
|
6
6
|
import { context } from './helmetContext';
|
|
7
7
|
|
|
8
8
|
export const innerProvider = (container) => {
|
|
@@ -138,15 +138,23 @@ export default function LiosLayout(props: LiosLayoutlProps) {
|
|
|
138
138
|
tenantId: false,
|
|
139
139
|
})
|
|
140
140
|
|
|
141
|
+
|
|
141
142
|
useEffect(() => {
|
|
142
143
|
//在这里找到当前菜单的上层目录
|
|
143
144
|
const paMenu = findParentMenu(menuList, '/' + location.pathname.split('/')[2])
|
|
145
|
+
//去重
|
|
146
|
+
const set = new Set(paMenu.map((item) => item.key))
|
|
144
147
|
|
|
145
|
-
|
|
148
|
+
openKeys.forEach((element: string) => {
|
|
149
|
+
set.add(element)
|
|
150
|
+
})
|
|
151
|
+
setOpenKeys(Array.from(set))
|
|
146
152
|
|
|
153
|
+
// 设置选中的菜单项
|
|
147
154
|
const selectedPath = findKeyPath('/' + location.pathname.split('/')[2])
|
|
148
155
|
setSelectKey(selectedPath)
|
|
149
|
-
}, [location.pathname
|
|
156
|
+
}, [location.pathname])
|
|
157
|
+
|
|
150
158
|
|
|
151
159
|
const onOpenChange: MenuProps['onOpenChange'] = (keys) => {
|
|
152
160
|
// Find the last opened key
|