From cb96f91b4db3f4dbe7f5a405b733ccb45bbc337d Mon Sep 17 00:00:00 2001 From: iczer <1126263215@qq.com> Date: Tue, 24 Jul 2018 21:38:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96Result=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E5=AE=8C=E5=96=84=E7=BB=93=E6=9E=9C=E9=A1=B5=EF=BC=88?= =?UTF-8?q?error=E3=80=81success=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/menu/menu.js | 2 +- src/components/page/PageHeader.vue | 2 +- src/components/result/Error.vue | 61 +++++++++++++++++ src/components/result/Result.vue | 28 ++++++-- src/components/result/Success.vue | 105 +++++++++++++++++++++++++++++ src/router/index.js | 10 +-- 6 files changed, 197 insertions(+), 11 deletions(-) create mode 100644 src/components/result/Error.vue create mode 100644 src/components/result/Success.vue diff --git a/src/components/menu/menu.js b/src/components/menu/menu.js index e448751..2e4d8aa 100644 --- a/src/components/menu/menu.js +++ b/src/components/menu/menu.js @@ -47,7 +47,7 @@ export default { data () { return { rootSubmenuKeys: ['/form', '/list', '/detail', '/exception', '/result'], - openKeys: ['/form'] + openKeys: [] } }, methods: { diff --git a/src/components/page/PageHeader.vue b/src/components/page/PageHeader.vue index e71c21f..cbc2c2f 100644 --- a/src/components/page/PageHeader.vue +++ b/src/components/page/PageHeader.vue @@ -23,7 +23,7 @@ export default { props: { title: { type: String, - required: true + required: false }, breadcrumb: { type: Array, diff --git a/src/components/result/Error.vue b/src/components/result/Error.vue new file mode 100644 index 0000000..5374b2d --- /dev/null +++ b/src/components/result/Error.vue @@ -0,0 +1,61 @@ + + + + + diff --git a/src/components/result/Result.vue b/src/components/result/Result.vue index f5265f1..5be41fc 100644 --- a/src/components/result/Result.vue +++ b/src/components/result/Result.vue @@ -3,9 +3,13 @@
-
{{title}}
-
- +
{{title}}
+
{{description}}
+
+ +
+
+
@@ -15,13 +19,12 @@ import AIcon from 'vue-antd-ui/es/icon/icon' export default { name: 'Result', components: {AIcon}, - props: ['isSuccess', 'title'] + props: ['isSuccess', 'title', 'description'] } diff --git a/src/components/result/Success.vue b/src/components/result/Success.vue new file mode 100644 index 0000000..33e9b25 --- /dev/null +++ b/src/components/result/Success.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index 4761b9b..5d365ef 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -9,6 +9,8 @@ import Form from '@/components/form/Form' import BasicForm from '@/components/form/BasicForm' import StepForm from '@/components/form/stepForm/StepForm' import AdvancedForm from '@/components/form/advancedForm/AdvancedForm' +import Success from '@/components/result/Success' +import Error from '@/components/result/Error' Vue.use(Router) @@ -100,7 +102,7 @@ export default new Router({ }, { path: '/result', - name: '详情页', + name: '结果页', icon: 'check-circle-o', component: Exception, children: [ @@ -108,13 +110,13 @@ export default new Router({ path: '/result/success', name: '成功', icon: 'none', - component: NotFound + component: Success }, { - path: '/result/failure', + path: '/result/error', name: '失败', icon: 'none', - component: NotFound + component: Error } ] },