Result
结果

用于反馈一系列操作任务的处理结果。
使用import{ Result }from"antd";

何时使用

当有重要操作需告知用户处理结果,且反馈内容较为复杂时使用。

代码演示

Successfully Purchased Cloud Server ECS!
Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait.

成功的结果。

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Your operation has been executed

展示处理结果。

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
There are some problems with your operation.

警告类型的结果。

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Unauthorized
403
Sorry, you are not authorized to access this page.

你没有此页面的访问权限。

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
No Found
404
Sorry, the page you visited does not exist.

此页面未找到。

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Server Error
500
Sorry, something went wrong.

服务器发生了错误。

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Submission Failed
Please check and modify the following information before resubmitting.
The content you submitted has the following error:
Your account has been frozen. Thaw immediately >
Your account is not yet eligible to apply. Apply Unlock >

复杂的错误反馈。

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Great, we have done all the operations!

自定义 icon。

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code

API

通用属性参考:通用属性

参数说明类型默认值
extra操作区ReactNode-
icon自定义 iconReactNode-
status结果的状态,决定图标和颜色success | error | info | warning | 404 | 403 | 500info
subTitlesubTitle 文字ReactNode-
titletitle 文字ReactNode-

主题变量(Design Token)

组件 Token如何定制?

Token 名称描述类型默认值
extraMargin额外区域外间距undefined | Margin<string | number>24px 0 0 0
iconFontSize图标大小number72
subtitleFontSize副标题字体大小number14
titleFontSize标题字体大小number24

全局 Token如何定制?