Skip to content

Commit 5861572

Browse files
authored
docs(style): [result] use new display tag (element-plus#12661)
* refactor(components): [result] updated doc and code to new display tag * style(components): [result] undo redundant changes * docs(components): [result] update default
1 parent 2bb2d07 commit 5861572

File tree

2 files changed

+27
-16
lines changed

2 files changed

+27
-16
lines changed

docs/en-US/component/result.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,21 @@ result/customized-content
2323

2424
:::
2525

26-
## Result Attributes
27-
28-
| Name | Description | Type | Accepted Values | Default |
29-
| --------- | ----------- | ------ | -------------------------------- | ------- |
30-
| title | title | string |||
31-
| sub-title | sub title | string |||
32-
| icon | icon type | string | success / warning / info / error | info |
33-
34-
## Result Slots
35-
36-
| Name | Description |
37-
| --------- | ----------------- |
38-
| icon | custom icon |
39-
| title | custom title |
40-
| sub-title | custom sub title |
41-
| extra | custom extra area |
26+
## API
27+
28+
### Attributes
29+
30+
| Name | Description | Type | Default |
31+
| --------- | ------------------- | ---------------------------------------------------- | -------- |
32+
| title | title of result | ^[string] | '' |
33+
| sub-title | sub title of result | ^[string] | '' |
34+
| icon | icon type of result | ^[enum]`'success' \| 'warning' \| 'info' \| 'error'` | info |
35+
36+
### Slots
37+
38+
| Name | Description |
39+
| --------- | ---------------------------- |
40+
| icon | content as result icon |
41+
| title | content as result title |
42+
| sub-title | content as result sub title |
43+
| extra | content as result extra area |

packages/components/result/src/result.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,23 @@ export const IconComponentMap: Record<
2626
}
2727

2828
export const resultProps = buildProps({
29+
/**
30+
* @description title of result
31+
*/
2932
title: {
3033
type: String,
3134
default: '',
3235
},
36+
/**
37+
* @description sub title of result
38+
*/
3339
subTitle: {
3440
type: String,
3541
default: '',
3642
},
43+
/**
44+
* @description icon type of result
45+
*/
3746
icon: {
3847
type: String,
3948
values: ['success', 'warning', 'info', 'error'],

0 commit comments

Comments
 (0)