Skip to content

Commit 4baeb59

Browse files
committed
Fixed style
1 parent 28828ce commit 4baeb59

5 files changed

Lines changed: 40 additions & 32 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gin-admin-react",
3-
"version": "2.0.0",
3+
"version": "3.0.0",
44
"description": "RBAC权限管理脚手架",
55
"private": true,
66
"scripts": {

src/layouts/AdminLayout.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff 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>

src/layouts/AdminLayout.less

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
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;
@@ -38,7 +36,7 @@
3836
cursor: pointer;
3937
transition: all 0.3s;
4038
padding: 0 24px;
41-
margin-left: -50px;
39+
margin-left: -12px;
4240
&:hover {
4341
background: #072f53;
4442
}
@@ -86,19 +84,12 @@
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: 24px;
94+
padding: 25px 10px;
10495
}

src/models/login.js

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff 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;

src/pages/Dashboard/Home.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)