mirror of
https://github.com/element-plus/element-plus.git
synced 2025-02-23 11:59:34 +08:00
fix(components): [message] set appentTo value (#8730)
* fix(components): [message] set appentTo value * feat: update judge
This commit is contained in:
parent
3d96c878bf
commit
e6e6842805
@ -41,7 +41,9 @@ const normalizeOptions = (params?: MessageParams) => {
|
||||
...options,
|
||||
}
|
||||
|
||||
if (isString(normalized.appendTo)) {
|
||||
if (!normalized.appendTo) {
|
||||
normalized.appendTo = document.body
|
||||
} else if (isString(normalized.appendTo)) {
|
||||
let appendTo = document.querySelector<HTMLElement>(normalized.appendTo)
|
||||
|
||||
// should fallback to default value with a warning
|
||||
|
Loading…
Reference in New Issue
Block a user