Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
eeef05cd
Commit
eeef05cd
authored
Dec 11, 2020
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:调整左侧边栏的样式
parent
75a85632
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
14 deletions
+19
-14
src/modules/personalInfo/index.tsx
+2
-1
src/modules/root/App.tsx
+7
-4
src/modules/root/Header.tsx
+9
-5
src/modules/root/Menu.tsx
+1
-4
No files found.
src/modules/personalInfo/index.tsx
View file @
eeef05cd
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: zhangleyuan
* @Author: zhangleyuan
* @Date: 2020-11-27 15:06:31
* @Date: 2020-11-27 15:06:31
* @LastEditors: zhangleyuan
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-10 1
0:46:23
* @LastEditTime: 2020-12-10 1
9:30:57
* @Description: 描述一下
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -54,6 +54,7 @@ function PersonalInfoPage() {
...
@@ -54,6 +54,7 @@ function PersonalInfoPage() {
});
});
}
}
function
_handleUpdateAvatar
(
e
:
any
):
any
{
function
_handleUpdateAvatar
(
e
:
any
):
any
{
console
.
log
(
'update'
);
const
avatar
=
e
.
target
.
files
[
0
];
const
avatar
=
e
.
target
.
files
[
0
];
const
newUrl
=
URL
.
createObjectURL
(
avatar
);
const
newUrl
=
URL
.
createObjectURL
(
avatar
);
const
$image
=
$
(
'#image'
);
const
$image
=
$
(
'#image'
);
...
...
src/modules/root/App.tsx
View file @
eeef05cd
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2019-07-10 10:30:49
* @Date: 2019-07-10 10:30:49
* @LastEditors: zhangleyuan
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-10 1
4:49:22
* @LastEditTime: 2020-12-10 1
9:50:59
* @Description:
* @Description:
*/
*/
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
;
...
@@ -21,6 +21,7 @@ declare var window: any;
...
@@ -21,6 +21,7 @@ declare var window: any;
const
App
:
React
.
FC
=
(
props
:
any
)
=>
{
const
App
:
React
.
FC
=
(
props
:
any
)
=>
{
const
ctx
:
any
=
useContext
(
XMContext
);
const
ctx
:
any
=
useContext
(
XMContext
);
const
userId
=
User
.
getUserId
();
const
userId
=
User
.
getUserId
();
const
[
menuType
,
setMenuType
]
=
useState
(
true
);
window
.
ctx
=
ctx
;
window
.
ctx
=
ctx
;
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -55,15 +56,17 @@ const App: React.FC = (props: any) => {
...
@@ -55,15 +56,17 @@ const App: React.FC = (props: any) => {
ctx
.
dispatch
(
setStoreGroupPermission
(
storePermissionGroup
))
ctx
.
dispatch
(
setStoreGroupPermission
(
storePermissionGroup
))
ctx
.
dispatch
(
setStorePermission
(
storeUserPermissionGroup
))
ctx
.
dispatch
(
setStorePermission
(
storeUserPermissionGroup
))
});
});
}
function
handleMenuType
(){
setMenuType
(
!
menuType
);
}
}
return
(
return
(
<
div
id=
"home"
>
<
div
id=
"home"
>
<
Header
/>
<
Header
handleMenuType=
{
handleMenuType
}
menuType=
{
menuType
}
/>
<
ConfigProvider
locale=
{
zhCN
}
>
<
ConfigProvider
locale=
{
zhCN
}
>
<
Main
/>
<
Main
/>
</
ConfigProvider
>
</
ConfigProvider
>
<
Menu
/>
<
Menu
menuType=
{
menuType
}
/>
</
div
>
</
div
>
)
)
}
}
...
...
src/modules/root/Header.tsx
View file @
eeef05cd
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2019-09-10 18:26:03
* @Date: 2019-09-10 18:26:03
* @LastEditors: zhangleyuan
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-
09 11:13:0
5
* @LastEditTime: 2020-12-
10 19:48:5
5
* @Description:
* @Description:
*/
*/
import
React
,
{
useContext
,
useState
}
from
'react'
;
import
React
,
{
useContext
,
useState
}
from
'react'
;
...
@@ -21,9 +21,13 @@ import { XMContext } from '@/store/context';
...
@@ -21,9 +21,13 @@ import { XMContext } from '@/store/context';
import
baseImg
from
'@/common/images/xiaomai-IMG.png'
;
import
baseImg
from
'@/common/images/xiaomai-IMG.png'
;
import
logoImg
from
'@/common/images/logo.png'
;
import
logoImg
from
'@/common/images/logo.png'
;
const
{
confirm
}
=
Modal
;
const
{
confirm
}
=
Modal
;
interface
headerProps
{
menuType
:
boolean
,
handleMenuType
:()
=>
void
}
function
Header
(){
function
Header
(
props
:
headerProps
){
const
[
menuType
,
setMenuType
]
=
useState
(
true
)
;
const
{
menuType
,
handleMenuType
}
=
props
;
const
ctx
:
any
=
useContext
(
XMContext
);
const
ctx
:
any
=
useContext
(
XMContext
);
function
userMenu
()
{
function
userMenu
()
{
return
(
return
(
...
@@ -54,7 +58,7 @@ function Header(){
...
@@ -54,7 +58,7 @@ function Header(){
);
);
}
}
function
handleMenu
(){
function
handleMenu
(){
setMenuType
(
!
menuType
);
handleMenuType
(
);
};
};
function
toPersonalInfoPage
(){
function
toPersonalInfoPage
(){
window
.
RCHistory
.
push
({
window
.
RCHistory
.
push
({
...
@@ -128,4 +132,4 @@ function Header(){
...
@@ -128,4 +132,4 @@ function Header(){
</
div
>
</
div
>
);
);
}
}
export
default
withRouter
(
Header
)
;
export
default
Header
;
src/modules/root/Menu.tsx
View file @
eeef05cd
...
@@ -7,14 +7,11 @@ import { menuList } from '../../routes//config/menuList'
...
@@ -7,14 +7,11 @@ import { menuList } from '../../routes//config/menuList'
import
{
XMContext
}
from
'../../store/context'
;
import
{
XMContext
}
from
'../../store/context'
;
import
"./Menu.less"
;
import
"./Menu.less"
;
const
{
SubMenu
}
=
Menu
;
const
{
SubMenu
}
=
Menu
;
function
Aside
(
props
:
any
)
{
function
Aside
(
props
:
any
)
{
const
{
menuType
}
=
props
const
ctx
:
any
=
useContext
(
XMContext
);
const
ctx
:
any
=
useContext
(
XMContext
);
const
[
selectKey
,
setSelectKey
]
=
useState
();
const
[
selectKey
,
setSelectKey
]
=
useState
();
const
[
openKeys
,
setOpenKeys
]
=
useState
([
''
]);
const
[
openKeys
,
setOpenKeys
]
=
useState
([
''
]);
const
[
menuType
,
setMenuType
]
=
useState
(
1
);
useEffect
(()
=>
{
useEffect
(()
=>
{
const
link
=
props
.
location
.
pathname
;
const
link
=
props
.
location
.
pathname
;
console
.
log
(
'link'
,
link
);
console
.
log
(
'link'
,
link
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment