Skip to content

Commit

Permalink
fix: bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Jun 20, 2022
1 parent 12bfa07 commit 80265ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/components/message/src/message-method.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ messageTypes.forEach((type) => {

export function closeAll(): void {
for (const instance of instances) {
closeMessage(instance)
instance.handler.close()
}
}

Expand Down
5 changes: 4 additions & 1 deletion packages/components/message/src/message.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { isClient } from '@vueuse/core'
import {
buildProps,
definePropType,
Expand Down Expand Up @@ -26,9 +27,10 @@ export const messageDefaults = mutable({
showClose: false,
type: 'info',
offset: 20,
zIndex: 0,
grouping: false,
repeatNum: 1,
appendTo: document.body,
appendTo: isClient ? document.body : (undefined as never),
} as const)

export const messageProps = buildProps({
Expand Down Expand Up @@ -83,6 +85,7 @@ export const messageProps = buildProps({
},
zIndex: {
type: Number,
default: messageDefaults.zIndex,
},
grouping: {
type: Boolean,
Expand Down

0 comments on commit 80265ef

Please sign in to comment.