From 3cc0285b36f7ffcc997d5b2132720626e803c3e3 Mon Sep 17 00:00:00 2001 From: hugangjun Date: Tue, 22 Mar 2022 16:30:54 +0800 Subject: [PATCH] feat: add result page --- package.json | 1 + src/views/exception-network/index.tsx | 23 ++++++++++ src/views/exception-notfound/index.tsx | 23 ++++++++++ src/views/exception-permission/index.tsx | 23 ++++++++++ src/views/exception-server-error/index.tsx | 23 ++++++++++ src/views/result-failure/index.tsx | 40 ++++++++++++++++++ src/views/result-success/index.tsx | 49 +++++++++++++++++++++- 7 files changed, 181 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 6cbb9bd..523ce5d 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@hi-ui/icons": "^4.0.0-beta.6", "@hi-ui/loading": "^4.0.0-beta.7", "@hi-ui/radio": "^4.0.0-beta.5", + "@hi-ui/result": "^4.0.0-alpha.1", "@hi-ui/table": "^4.0.0-beta.27", "@hi-ui/utils": "^4.0.0-beta.5", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3", diff --git a/src/views/exception-network/index.tsx b/src/views/exception-network/index.tsx index 283e796..801ef06 100644 --- a/src/views/exception-network/index.tsx +++ b/src/views/exception-network/index.tsx @@ -1,5 +1,6 @@ import { Button } from "@hi-ui/hiui"; import { PlusOutlined } from "@hi-ui/icons"; +import Result, { IconNetError } from "@hi-ui/result"; import { ContentHeader } from "../../components/content-header"; export const ExceptionNetwork = () => { @@ -22,5 +23,27 @@ export const ExceptionNetwork = () => { } /> +
+ } + imageSize="lg" + title="网络中断" + content="抱歉,网络连接中断,请稍后再试!" + children={ + + } + /> +
} diff --git a/src/views/exception-notfound/index.tsx b/src/views/exception-notfound/index.tsx index 55af428..431a233 100644 --- a/src/views/exception-notfound/index.tsx +++ b/src/views/exception-notfound/index.tsx @@ -1,5 +1,6 @@ import { Button } from "@hi-ui/hiui"; import { PlusOutlined } from "@hi-ui/icons"; +import Result, { IconNotFound } from "@hi-ui/result"; import { ContentHeader } from "../../components/content-header"; export const ExceptionNotfound = () => { @@ -22,5 +23,27 @@ export const ExceptionNotfound = () => { } /> +
+ } + imageSize="lg" + title="404" + content="抱歉,服务器开小差了!" + children={ + + } + /> +
} diff --git a/src/views/exception-permission/index.tsx b/src/views/exception-permission/index.tsx index 8e81a8a..ff6cf91 100644 --- a/src/views/exception-permission/index.tsx +++ b/src/views/exception-permission/index.tsx @@ -1,5 +1,6 @@ import { Button } from "@hi-ui/hiui"; import { PlusOutlined } from "@hi-ui/icons"; +import Result, { IconNoPermission } from "@hi-ui/result"; import { ContentHeader } from "../../components/content-header"; export const ExceptionPermission = () => { @@ -22,5 +23,27 @@ export const ExceptionPermission = () => { } /> +
+ } + imageSize="lg" + title="暂无权限" + content="抱歉,您没有当前模块的访问权限" + children={ + + } + /> +
} diff --git a/src/views/exception-server-error/index.tsx b/src/views/exception-server-error/index.tsx index 59596f6..f7cd06f 100644 --- a/src/views/exception-server-error/index.tsx +++ b/src/views/exception-server-error/index.tsx @@ -1,5 +1,6 @@ import { Button } from "@hi-ui/hiui"; import { PlusOutlined } from "@hi-ui/icons"; +import Result, { IconServerError } from "@hi-ui/result"; import { ContentHeader } from "../../components/content-header"; export const ExceptionServerError = () => { @@ -22,5 +23,27 @@ export const ExceptionServerError = () => { } /> +
+ } + imageSize="lg" + title="500" + content="抱歉,服务器开小差了!" + children={ + + } + /> +
} diff --git a/src/views/result-failure/index.tsx b/src/views/result-failure/index.tsx index 8fbbf14..4b8459a 100644 --- a/src/views/result-failure/index.tsx +++ b/src/views/result-failure/index.tsx @@ -1,5 +1,6 @@ import { Button } from "@hi-ui/hiui"; import { PlusOutlined } from "@hi-ui/icons"; +import Result from "@hi-ui/result"; import { ContentHeader } from "../../components/content-header"; export const ResultFailure = () => { @@ -22,5 +23,44 @@ export const ResultFailure = () => { } /> +
+ +
+ {[ + , + , + ]} +
+
说明
+ {'此处展示共建创建失败的相关说明文字,此处展示共建创建失败的相关说明文字,\n此处展示共建创建失败后可以进行的后续操作'} +
+
+
+
} diff --git a/src/views/result-success/index.tsx b/src/views/result-success/index.tsx index 80533eb..621a107 100644 --- a/src/views/result-success/index.tsx +++ b/src/views/result-success/index.tsx @@ -1,5 +1,6 @@ -import { Button } from "@hi-ui/hiui"; +import { Button, Stepper } from "@hi-ui/hiui"; import { PlusOutlined } from "@hi-ui/icons"; +import Result from "@hi-ui/result"; import { ContentHeader } from "../../components/content-header"; export const ResultSuccess = () => { @@ -22,5 +23,51 @@ export const ResultSuccess = () => { } /> +
+ +
+ {[ + , + , + , + ]} +
+ +
+
+
+
}