diff --git a/docs/en-US/component/dialog.md b/docs/en-US/component/dialog.md index 907ea3ced3..d2d81df85a 100644 --- a/docs/en-US/component/dialog.md +++ b/docs/en-US/component/dialog.md @@ -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 | diff --git a/packages/components/dialog/src/dialog.ts b/packages/components/dialog/src/dialog.ts index 6309e00697..9c08656d26 100644 --- a/packages/components/dialog/src/dialog.ts +++ b/packages/components/dialog/src/dialog.ts @@ -17,7 +17,7 @@ export const dialogProps = buildProps({ * @description which element the Dialog appends to */ appendTo: { - type: definePropType(String), + type: definePropType([String, Object]), default: 'body', }, /**