2019-06-30 20:15:44 +08:00
|
|
|
|
---
|
2022-11-09 12:28:04 +08:00
|
|
|
|
group: 反馈
|
2019-06-30 20:15:44 +08:00
|
|
|
|
category: Components
|
|
|
|
|
title: Result
|
|
|
|
|
subtitle: 结果
|
2024-03-22 14:22:42 +08:00
|
|
|
|
description: 用于反馈一系列操作任务的处理结果。
|
2022-11-30 20:14:41 +08:00
|
|
|
|
cover: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*-e2IRroDJyEAAAAAAAAAAAAADrJ8AQ/original
|
2023-02-09 22:17:31 +08:00
|
|
|
|
coverDark: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*-0kxQrbHx2kAAAAAAAAAAAAADrJ8AQ/original
|
2019-06-30 20:15:44 +08:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## 何时使用
|
|
|
|
|
|
|
|
|
|
当有重要操作需告知用户处理结果,且反馈内容较为复杂时使用。
|
|
|
|
|
|
2022-11-09 12:28:04 +08:00
|
|
|
|
## 代码演示
|
|
|
|
|
|
2022-11-17 17:31:26 +08:00
|
|
|
|
<!-- prettier-ignore -->
|
2022-11-09 12:28:04 +08:00
|
|
|
|
<code src="./demo/success.tsx">Success</code>
|
|
|
|
|
<code src="./demo/info.tsx">Info</code>
|
|
|
|
|
<code src="./demo/warning.tsx">Warning</code>
|
|
|
|
|
<code src="./demo/403.tsx">403</code>
|
|
|
|
|
<code src="./demo/404.tsx">404</code>
|
|
|
|
|
<code src="./demo/500.tsx">500</code>
|
|
|
|
|
<code src="./demo/error.tsx">Error</code>
|
|
|
|
|
<code src="./demo/customIcon.tsx">自定义 icon</code>
|
2023-05-09 19:24:50 +08:00
|
|
|
|
<code src="./demo/component-token.tsx" debug>组件 Token</code>
|
2022-11-09 12:28:04 +08:00
|
|
|
|
|
2019-06-30 20:15:44 +08:00
|
|
|
|
## API
|
|
|
|
|
|
2023-08-08 18:27:48 +08:00
|
|
|
|
通用属性参考:[通用属性](/docs/react/common-props)
|
|
|
|
|
|
2019-11-20 17:46:50 +08:00
|
|
|
|
| 参数 | 说明 | 类型 | 默认值 |
|
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
|
| extra | 操作区 | ReactNode | - |
|
2020-10-21 10:33:43 +08:00
|
|
|
|
| icon | 自定义 icon | ReactNode | - |
|
|
|
|
|
| status | 结果的状态,决定图标和颜色 | `success` \| `error` \| `info` \| `warning` \| `404` \| `403` \| `500` | `info` |
|
|
|
|
|
| subTitle | subTitle 文字 | ReactNode | - |
|
|
|
|
|
| title | title 文字 | ReactNode | - |
|
2023-04-11 10:25:24 +08:00
|
|
|
|
|
2023-08-30 23:02:35 +08:00
|
|
|
|
## 主题变量(Design Token)
|
2023-04-11 10:25:24 +08:00
|
|
|
|
|
|
|
|
|
<ComponentTokenTable component="Result"></ComponentTokenTable>
|