Skip to content

Result ​

Brief Introduction ​

The Result component is used to display the status of an operation result.
You can use <MYResult></MYResult> to display a result.

Basic Usage ​

Use the title prop to set the main title and the subTitle prop to set the subtitle.

Code Demo
i
Operation Successful
Your operation has been completed successfully
展开代码

Icon Types ​

Use the icon prop to set the result icon.

Code Demo
i
Primary Result
This is a primary result
Success Result
Operation completed successfully
Warning Result
Please pay attention to related matters
Error Result
Operation failed, please try again
i
Info Result
This is an information message
展开代码

Slot Usage ​

Use slots to customize the subtitle and extra content.

Code Demo
Operation Successful
Custom subtitle content with HTML support
展开代码

Combined Usage ​

Finally, here is a combination of multiple APIs to create a result page:

Code Demo
Combined Usage Example
This is a complete example of combined usage
展开代码

API Reference ​

Props ​

PropDescriptionTypeOptionsDefault
titleMain titlestring—''
subTitleSubtitlestring—''
iconIcon typestringprimary/success/warning/error/info'info'

Slots ​

NameDescription
sub-titleCustom subtitle content
extraExtra content area

Type Definitions ​

typescript
interface ResultProps {
  title?: string;
  subTitle?: string;
  icon?: 'primary' | 'success' | 'warning' | 'error' | 'info';
}

Released under the MIT License.