Result结果
Result
结果
用于反馈一系列操作任务的处理结果。
使用import{ Result }from"antd"; |
何时使用
当有重要操作需告知用户处理结果,且反馈内容较为复杂时使用。
代码演示
Successfully Purchased Cloud Server ECS!
Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait.
Your operation has been executed
There are some problems with your operation.
403
Sorry, you are not authorized to access this page.
404
Sorry, the page you visited does not exist.
500
Sorry, something went wrong.
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 >
Great, we have done all the operations!
API
通用属性参考:通用属性
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
extra | 操作区 | ReactNode | - |
icon | 自定义 icon | ReactNode | - |
status | 结果的状态,决定图标和颜色 | success | error | info | warning | 404 | 403 | 500 | info |
subTitle | subTitle 文字 | ReactNode | - |
title | title 文字 | ReactNode | - |
主题变量(Design Token)
组件 Token如何定制?
Token 名称 | 描述 | 类型 | 默认值 |
---|---|---|---|
extraMargin | 额外区域外间距 | undefined | Margin<string | number> | 24px 0 0 0 |
iconFontSize | 图标大小 | number | 72 |
subtitleFontSize | 副标题字体大小 | number | 14 |
titleFontSize | 标题字体大小 | number | 24 |