module-menu 0.2.38 → 0.2.40
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/src/.umi/.cache/babel-loader/0373a5643899ba8332f46d5b310d4095.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/2263d16027a39c738899b682762b634a.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/25c2db5524b548644eafcd31e1f6baf9.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/7ae4287997aac2394b3316acbd00fb9c.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/8d6b35feae4547f26e00fa08cf1aed14.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/9eb8afb066569c2f8065c4e56d6155f7.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/ac51e7bbed59e2bc0921cdf08112ca85.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/acd06c34328d2dc25d3c7100b09d5114.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/af6dff70e86a43b3991e49f52b887cfd.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/e57e146a2a498c87432b1a3b15e73425.json.gz +0 -0
- package/src/pages/ModuleMenu/index.jsx +25 -23
- package/src/pages/ModuleUser/index.less +1 -1
- package/src/pages/index.jsx +1 -1
package/package.json
CHANGED
|
@@ -33,27 +33,9 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
|
|
|
33
33
|
{},
|
|
34
34
|
)
|
|
35
35
|
.then((res) => {
|
|
36
|
-
const resD = JSON.parse(localStorage.getItem('moduleRoutes'))
|
|
37
|
-
let menuGet =
|
|
38
|
-
(resD?.map((item) => {
|
|
39
|
-
return {
|
|
40
|
-
...item,
|
|
41
|
-
path:
|
|
42
|
-
item.path.indexOf('/') !== -1
|
|
43
|
-
? item.path
|
|
44
|
-
: '/' + item.path,
|
|
45
|
-
};
|
|
46
|
-
})) ||
|
|
47
|
-
[];
|
|
48
|
-
console.log('menuGet', menuGet)
|
|
49
|
-
setSessionMenu(menuGet);
|
|
50
|
-
const menuLists = getNewMenuList(menuGet);
|
|
51
|
-
setMenuList(menuLists);
|
|
52
|
-
|
|
53
|
-
// if (res.data.code === 0) {
|
|
36
|
+
// const resD = JSON.parse(localStorage.getItem('moduleRoutes'))
|
|
54
37
|
// let menuGet =
|
|
55
|
-
// (
|
|
56
|
-
// res.data.data[0]?.routes?.map((item) => {
|
|
38
|
+
// (resD?.map((item) => {
|
|
57
39
|
// return {
|
|
58
40
|
// ...item,
|
|
59
41
|
// path:
|
|
@@ -67,7 +49,25 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
|
|
|
67
49
|
// setSessionMenu(menuGet);
|
|
68
50
|
// const menuLists = getNewMenuList(menuGet);
|
|
69
51
|
// setMenuList(menuLists);
|
|
70
|
-
|
|
52
|
+
|
|
53
|
+
if (res.data.code === 0) {
|
|
54
|
+
let menuGet =
|
|
55
|
+
(res.data.data &&
|
|
56
|
+
res.data.data[0]?.routes?.map((item) => {
|
|
57
|
+
return {
|
|
58
|
+
...item,
|
|
59
|
+
path:
|
|
60
|
+
item.path.indexOf('/') !== -1
|
|
61
|
+
? item.path
|
|
62
|
+
: '/' + item.path,
|
|
63
|
+
};
|
|
64
|
+
})) ||
|
|
65
|
+
[];
|
|
66
|
+
console.log('menuGet', menuGet)
|
|
67
|
+
setSessionMenu(menuGet);
|
|
68
|
+
const menuLists = getNewMenuList(menuGet);
|
|
69
|
+
setMenuList(menuLists);
|
|
70
|
+
}
|
|
71
71
|
})
|
|
72
72
|
.catch((e) => console.log('e', e));
|
|
73
73
|
}else{
|
|
@@ -323,13 +323,15 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
|
|
|
323
323
|
className={cn(stash !== 'LNRD'? 'menuIcon_size':'menuIcon_size_LNRD', 'menuIcon')}
|
|
324
324
|
onMouseOver={() => setshowMenuList(true)}
|
|
325
325
|
style={{
|
|
326
|
-
backgroundImage: `url(${menuIconSrc})`,
|
|
326
|
+
// backgroundImage: `url(${menuIconSrc})`,
|
|
327
327
|
backgroundRepeat: 'no-repeat',
|
|
328
328
|
backgroundSize: '50%',
|
|
329
329
|
backgroundPosition: 'center',
|
|
330
330
|
backgroundColor: stash !== 'LNRD'? '#4091F7':'#EA1A1A'
|
|
331
331
|
}}
|
|
332
|
-
|
|
332
|
+
>
|
|
333
|
+
<img src={menuIconSrc} className={cn(stash !== 'LNRD'? null:'menuIcon_img')}></img>
|
|
334
|
+
</div>
|
|
333
335
|
<div className={cn(stash !== 'LNRD'? 'menu_title_content_size':'menu_title_content_size_LNRD', 'menu_title_content')}
|
|
334
336
|
|
|
335
337
|
>
|
package/src/pages/index.jsx
CHANGED