File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " gin-admin-react" ,
3- "version" : " 2 .0.0" ,
3+ "version" : " 3 .0.0" ,
44 "description" : " RBAC权限管理脚手架" ,
55 "private" : true ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ class AdminLayout extends React.PureComponent {
248248 const GlobalContext = GetGlobalContext ( ) ;
249249
250250 const menu = (
251- < Menu className = { classNames ( ' menu' ) } selectedKeys = { [ ] } onClick = { this . onMenuClick } >
251+ < Menu className = " menu" selectedKeys = { [ ] } onClick = { this . onMenuClick } >
252252 < Menu . Item key = "updatepwd" >
253253 < LockOutlined />
254254 修改密码
@@ -274,9 +274,9 @@ class AdminLayout extends React.PureComponent {
274274 breakpoint = "lg"
275275 onCollapse = { this . onCollapse }
276276 width = { siderWidth }
277- className = { classNames ( ' sider' ) }
277+ className = " sider"
278278 >
279- < div className = { classNames ( ' logo' ) } >
279+ < div className = " logo" >
280280 < Link to = "/" >
281281 < img src = { logo } alt = "logo" />
282282 < h1 > { title } </ h1 >
@@ -294,7 +294,13 @@ class AdminLayout extends React.PureComponent {
294294 </ Menu >
295295 </ Sider >
296296 < Layout >
297- < Header className = { classNames ( 'header' ) } >
297+ < Header
298+ className = { classNames ( 'header' ) }
299+ style = { {
300+ paddingLeft : 12 ,
301+ paddingRight : 12 ,
302+ } }
303+ >
298304 < div className = { classNames ( 'foldout' ) } onClick = { ( ) => this . onCollapse ( ) } >
299305 { collapsed ? < MenuUnfoldOutlined /> : < MenuFoldOutlined /> }
300306 </ div >
Original file line number Diff line number Diff line change 11@import ' ~antd/lib/style/themes/default.less' ;
22
33.header {
4- padding : 0 12px 0 0 ;
5- background : #002140 ;
6- box-shadow : 0 1px 4px rgba (0 , 21 , 41 , 0.08 );
4+ box-shadow : 2px 0 6px rgba (0 , 21 , 41 , 0.35 );
75 position : relative ;
86}
97
108.logo {
119 height : 64px ;
1210 position : relative ;
1311 line-height : 64px ;
14- padding-left : (@menu-collapsed-width - 32px ) / 2 ;
1512 transition : all 0.3s ;
1613 background : #002140 ;
1714 overflow : hidden ;
15+ text-align : center ;
1816 img {
1917 display : inline-block ;
2018 vertical-align : middle ;
3836 cursor : pointer ;
3937 transition : all 0.3s ;
4038 padding : 0 24px ;
41- margin-left : -50 px ;
39+ margin-left : -12 px ;
4240 & :hover {
4341 background : #072f53 ;
4442 }
8684 }
8785}
8886
89- .menu {
90- :global(.anticon ) {
91- margin-right : 8px ;
92- }
93- }
94-
9587.sider {
9688 position : relative ;
9789 z-index : 10 ;
9890 min-height : 100vh ;
99- box-shadow : 2px 0 6px rgba (0 , 21 , 41 , 0.35 );
10091}
10192
10293.content {
103- padding : 24 px ;
94+ padding : 25 px 10 px ;
10495}
Original file line number Diff line number Diff line change @@ -52,23 +52,34 @@ export default {
5252 type : 'saveStatus' ,
5353 payload : response . status >= 500 ? 'ERROR' : 'FAIL' ,
5454 } ) ,
55+ put ( {
56+ type : 'changeSubmitting' ,
57+ payload : false ,
58+ } ) ,
59+ put ( {
60+ type : 'loadCaptcha' ,
61+ } ) ,
5562 ] ;
56- yield put ( {
57- type : 'changeSubmitting' ,
58- payload : false ,
59- } ) ;
60- yield put ( {
61- type : 'loadCaptcha' ,
62- } ) ;
6363 return ;
6464 }
6565
6666 // 保存访问令牌
6767 store . setAccessToken ( response ) ;
68- yield put ( {
69- type : 'changeSubmitting' ,
70- payload : false ,
71- } ) ;
68+
69+ yield [
70+ put ( {
71+ type : 'saveTip' ,
72+ payload : '' ,
73+ } ) ,
74+ put ( {
75+ type : 'saveStatus' ,
76+ payload : '' ,
77+ } ) ,
78+ put ( {
79+ type : 'changeSubmitting' ,
80+ payload : false ,
81+ } ) ,
82+ ] ;
7283
7384 const params = parse ( window . location . href . split ( '?' ) [ 1 ] ) ;
7485 const { redirect } = params ;
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ class Home extends PureComponent {
6969 >
7070 < Card >
7171 < Alert
72- message = "gin-admin 5.2.1 现已发布,欢迎使用 gin-admin-cli 启动体验。"
72+ message = "gin-admin 6.0.0 现已发布,欢迎使用 gin-admin-cli 启动体验。"
7373 type = "success"
7474 showIcon
7575 banner
@@ -100,8 +100,8 @@ class Home extends PureComponent {
100100 </ Typography . Text >
101101 < CodePreview > cd ~/go/src/gin-admin</ CodePreview >
102102 < CodePreview >
103- go run cmd/server /main.go -c ./configs/config.toml -m ./configs/model.conf -swagger
104- ./docs/swagger -menu ./ configs/menu.json
103+ go run cmd/gin-admin /main.go web -c ./configs/config.toml -m ./configs/model.conf --menu
104+ ./configs/menu.yaml
105105 </ CodePreview >
106106 < Typography . Text
107107 strong
You can’t perform that action at this time.
0 commit comments