Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro-vue
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianzhuanghu
ant-design-pro-vue
Commits
51edd222
Commit
51edd222
authored
Aug 24, 2018
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added error components
parent
3e060b65
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
5 deletions
+52
-5
PageHeader.vue
src/components/layout/PageHeader.vue
+1
-1
index.js
src/router/index.js
+5
-4
Error.vue
src/views/result/Error.vue
+46
-0
No files found.
src/components/layout/PageHeader.vue
View file @
51edd222
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</a-breadcrumb>
</a-breadcrumb>
<div
class=
"detail"
>
<div
class=
"detail"
>
<div
class=
"main"
>
<div
class=
"main"
v-if=
"!$route.meta.hiddenPageHeader"
>
<div
class=
"row"
>
<div
class=
"row"
>
<img
v-if=
"logo"
:src=
"logo"
class=
"logo"
/>
<img
v-if=
"logo"
:src=
"logo"
class=
"logo"
/>
<h1
v-if=
"title"
class=
"title"
>
{{
title
}}
</h1>
<h1
v-if=
"title"
class=
"title"
>
{{
title
}}
</h1>
...
...
src/router/index.js
View file @
51edd222
...
@@ -14,6 +14,7 @@ Vue.use(Router)
...
@@ -14,6 +14,7 @@ Vue.use(Router)
* meta : {
* meta : {
title: 'title' the name show in submenu and breadcrumb (recommend set)
title: 'title' the name show in submenu and breadcrumb (recommend set)
icon: 'svg-name' the icon show in the sidebar,
icon: 'svg-name' the icon show in the sidebar,
hiddenPageHeader: true if `hiddenPageHeader: true` will not show page-header(details)
}
}
**/
**/
export
const
constantRouterMap
=
[
export
const
constantRouterMap
=
[
...
@@ -181,8 +182,8 @@ export const asyncRouterMap = [
...
@@ -181,8 +182,8 @@ export const asyncRouterMap = [
{
{
path
:
'/result/success'
,
path
:
'/result/success'
,
name
:
'ResultSuccess'
,
name
:
'ResultSuccess'
,
component
:
()
=>
import
(
'../views/result/Success'
),
component
:
()
=>
import
(
/* webpackChunkName: "result" */
'../views/result/Success'
),
meta
:
{
title
:
'成功'
}
meta
:
{
title
:
'成功'
,
hiddenPageHeader
:
true
}
},
},
{
{
path
:
'/result/fail'
,
path
:
'/result/fail'
,
...
@@ -190,8 +191,8 @@ export const asyncRouterMap = [
...
@@ -190,8 +191,8 @@ export const asyncRouterMap = [
// route level code-splitting
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
// which is lazy-loaded when the route is visited.
component
:
()
=>
import
(
/* webpackChunkName: "
fail" */
'../views/result/Success
'
),
component
:
()
=>
import
(
/* webpackChunkName: "
result" */
'../views/result/Error
'
),
meta
:
{
title
:
'失败'
}
meta
:
{
title
:
'失败'
,
hiddenPageHeader
:
true
}
}
}
]
]
},
},
...
...
src/views/result/Error.vue
0 → 100644
View file @
51edd222
<
template
>
<a-card
:bordered=
"false"
>
<result
style=
"margin-bottom: 16px; margin-top: 48px"
:is-success=
"false"
:title=
"title"
:description=
"description"
>
<template
slot=
"action"
>
<a-button
type=
"primary"
>
返回修改
</a-button>
</
template
>
<div>
<div
style=
"font-size: 16px; color: rgba(0, 0, 0, 0.85); font-weight: 500; margin-bottom: 16px"
>
您提交的内容有如下错误:
</div>
<div
style=
"margin-bottom: 16px"
>
<a-icon
type=
"close-circle-o"
style=
"color: #f5222d; margin-right: 8px"
/>
您的账户已被冻结
<a
style=
"margin-left: 16px"
>
立即解冻
<a-icon
type=
"right"
/></a>
</div>
<div>
<a-icon
type=
"close-circle-o"
style=
"color: #f5222d; margin-right: 8px"
/>
您的账户还不具备申请资格
<a
style=
"margin-left: 16px"
>
立即升级
<a-icon
type=
"right"
/></a>
</div>
</div>
</result>
</a-card>
</template>
<
script
>
import
Result
from
'./Result'
export
default
{
name
:
"Error"
,
components
:
{
Result
},
data
()
{
return
{
title
:
'提交失败'
,
description
:
'请核对并修改以下信息后,再重新提交。'
}
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
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