Skip to content

Commit 1d052ec

Browse files
committed
fix(Toast): only show progress when open
Resolves #4464
1 parent 1ba8a55 commit 1d052ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/runtime/components/Toast.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ defineExpose({
119119
<template>
120120
<ToastRoot
121121
ref="el"
122-
v-slot="{ remaining, duration }"
122+
v-slot="{ remaining, duration, open }"
123123
v-bind="rootProps"
124124
:data-orientation="orientation"
125125
:class="ui.root({ class: [props.ui?.root, props.class] })"
@@ -184,6 +184,6 @@ defineExpose({
184184
</ToastClose>
185185
</div>
186186

187-
<div v-if="progress && remaining > 0 && duration" :class="ui.progress({ class: props.ui?.progress })" :style="{ width: `${remaining / duration * 100}%` }" />
187+
<div v-if="progress && open && remaining > 0 && duration" :class="ui.progress({ class: props.ui?.progress })" :style="{ width: `${remaining / duration * 100}%` }" />
188188
</ToastRoot>
189189
</template>

0 commit comments

Comments
 (0)