Skip to content

Commit

Permalink
fix(message): 解决消息加载后立即调用显示报错
Browse files Browse the repository at this point in the history
  • Loading branch information
Yin-Jinlong committed Jun 26, 2024
1 parent a8aff22 commit 8d46552
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/components/message/src/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface RawMsg {
closeable: boolean
}

let contents: RawMsg[]
let contents: RawMsg[] = []

function messageEnter(el: HTMLElement, done: () => void) {
el.style.left = `0px`
Expand Down Expand Up @@ -113,7 +113,7 @@ function createContainer() {
return defineComponent({
name: 'HMessageContainer',
setup(_, ctx) {
contents = reactive<RawMsg[]>([])
contents = reactive<RawMsg[]>(contents)
dark = ref(isDark())
return () => {
let list = []
Expand Down

0 comments on commit 8d46552

Please sign in to comment.