fix(components): [dialog] appendTo type error (#17814)

closed #17810
This commit is contained in:
知晓同丶 2024-08-09 12:55:39 +08:00 committed by GitHub
parent 839a702af7
commit 5973402fc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -125,7 +125,7 @@ When using `modal` = false, please make sure that `append-to-body` was set to **
| modal | whether a mask is displayed | ^[boolean] | true |
| modal-class | custom class names for mask | ^[string] | — |
| append-to-body | whether to append Dialog itself to body. A nested Dialog should have this attribute set to `true` | ^[boolean] | false |
| append-to ^(2.4.3) | which element the Dialog appends to. Will override `append-to-body` | ^[string] | body |
| append-to ^(2.4.3) | which element the Dialog appends to. Will override `append-to-body` | ^[string] / ^[HTMLElement] | body |
| lock-scroll | whether scroll of body is disabled while Dialog is displayed | ^[boolean] | true |
| custom-class ^(deprecated) | custom class names for Dialog | ^[string] | '' |
| open-delay | the Time(milliseconds) before open | ^[number] | 0 |

View File

@ -17,7 +17,7 @@ export const dialogProps = buildProps({
* @description which element the Dialog appends to
*/
appendTo: {
type: definePropType<string>(String),
type: definePropType<string | HTMLElement>([String, Object]),
default: 'body',
},
/**