Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pro-blocks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
pro-blocks
Commits
2044e07b
Commit
2044e07b
authored
Sep 06, 2017
by
ddcat1115
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve exception
parent
6ecfedde
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
7 deletions
+19
-7
src/common/nav.js
src/common/nav.js
+2
-2
src/components/Exception/index.js
src/components/Exception/index.js
+4
-1
src/components/Exception/index.less
src/components/Exception/index.less
+10
-1
src/components/Exception/typeConfig.js
src/components/Exception/typeConfig.js
+3
-3
No files found.
src/common/nav.js
View file @
2044e07b
...
...
@@ -123,8 +123,8 @@ const data = [{
component
:
Error
,
}],
},
{
name
:
'
错误
'
,
path
:
'
e
rror
'
,
name
:
'
异常
'
,
path
:
'
e
xception
'
,
icon
:
'
warning
'
,
children
:
[{
name
:
'
403
'
,
...
...
src/components/Exception/index.js
View file @
2044e07b
...
...
@@ -12,7 +12,10 @@ export default ({ className, type, title, desc, img, actions }) => {
return
(
<
div
className
=
{
clsString
}
>
<
div
className
=
{
styles
.
imgBlock
}
>
<
img
src
=
{
img
||
config
[
pageType
].
img
}
alt
=
""
/>
<
div
className
=
{
styles
.
imgEle
}
style
=
{{
backgroundImage
:
`url(
${
img
||
config
[
pageType
].
img
}
)`
}}
/
>
<
/div
>
<
div
className
=
{
styles
.
content
}
>
<
h1
>
{
title
||
config
[
pageType
].
title
}
<
/h1
>
...
...
src/components/Exception/index.less
View file @
2044e07b
@import "~antd/lib/style/themes/default.less";
@import "../../utils/utils.less";
.exception {
display: flex;
...
...
@@ -8,8 +9,16 @@
.imgBlock {
flex: 0 0 62.5%;
width: 62.5%;
text-align: right;
padding-right: 152px;
.clearfix();
}
.imgEle {
height: 360px;
width: 430px;
float: right;
background-repeat: no-repeat;
background-position: 50% 50%;
}
.content {
...
...
src/components/Exception/typeConfig.js
View file @
2044e07b
const
config
=
{
403
:
{
img
:
'
https://gw.alipayobjects.com/zos/rmsportal/
byTGXmzwJVwgotvxHQsU
.svg
'
,
img
:
'
https://gw.alipayobjects.com/zos/rmsportal/
eKcaKpQhaYgsEzCnYKSV
.svg
'
,
title
:
'
403
'
,
desc
:
'
对不起,你没有权限
'
,
},
404
:
{
img
:
'
https://gw.alipayobjects.com/zos/rmsportal/
GdXXOjtMMzaPfCziUVYt
.svg
'
,
img
:
'
https://gw.alipayobjects.com/zos/rmsportal/
CSBcmGONHHPYIrPukBQW
.svg
'
,
title
:
'
404
'
,
desc
:
'
你要找的页面不存在
'
,
},
500
:
{
img
:
'
https://gw.alipayobjects.com/zos/rmsportal/
OpTUNDbQGfEWLubSrJap
.svg
'
,
img
:
'
https://gw.alipayobjects.com/zos/rmsportal/
BxwCjbIDiNOcmoEGMXfk
.svg
'
,
title
:
'
500
'
,
desc
:
'
服务器错误,我们正在维修
'
,
},
...
...
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