Fixed animations of Toast and Messages
parent
c182f92c96
commit
d855b68897
|
@ -1,6 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="containerClass">
|
<div :class="containerClass">
|
||||||
|
<transition-group name="p-toast-message" tag="div">
|
||||||
<ToastMessage v-for="msg of messages" :key="msg.id" :message="msg" @close="remove($event)"/>
|
<ToastMessage v-for="msg of messages" :key="msg.id" :message="msg" @close="remove($event)"/>
|
||||||
|
</transition-group>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<template>
|
<template>
|
||||||
<transition name="p-toast-message">
|
|
||||||
<div :class="containerClass">
|
<div :class="containerClass">
|
||||||
<div class="p-toast-item">
|
<div class="p-toast-item">
|
||||||
<button class="p-toast-icon-close p-link" @click="close">
|
<button class="p-toast-icon-close p-link" @click="close">
|
||||||
|
@ -12,7 +11,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -17,7 +17,9 @@
|
||||||
<h3>Dynamic</h3>
|
<h3>Dynamic</h3>
|
||||||
<Button label="Show" @click="addMessages()" />
|
<Button label="Show" @click="addMessages()" />
|
||||||
<Button label="Clear" @click="removeMessages()" class="p-button-secondary"/>
|
<Button label="Clear" @click="removeMessages()" class="p-button-secondary"/>
|
||||||
|
<transition-group name="p-messages" tag="div">
|
||||||
<Message v-for="msg of messages" :severity="msg.severity" :key="msg.content">{{msg.content}}</Message>
|
<Message v-for="msg of messages" :severity="msg.severity" :key="msg.content">{{msg.content}}</Message>
|
||||||
|
</transition-group>
|
||||||
|
|
||||||
<h3>Auto Dismiss</h3>
|
<h3>Auto Dismiss</h3>
|
||||||
<Message severity="warn" :life="10000" :sticky="false">This message will hide in 10 seconds.</Message>
|
<Message severity="warn" :life="10000" :sticky="false">This message will hide in 10 seconds.</Message>
|
||||||
|
|
|
@ -250,7 +250,10 @@ import Message from 'primevue/message';
|
||||||
<h3>Dynamic</h3>
|
<h3>Dynamic</h3>
|
||||||
<Button label="Show" @click="addMessages()" />
|
<Button label="Show" @click="addMessages()" />
|
||||||
<Button label="Clear" @click="removeMessages()" class="p-button-secondary"/>
|
<Button label="Clear" @click="removeMessages()" class="p-button-secondary"/>
|
||||||
|
|
||||||
|
<transition-group name="p-messages" tag="div">
|
||||||
<Message v-for="msg of messages" :severity="msg.severity" :key="msg.content">{{msg.content}}</Message>
|
<Message v-for="msg of messages" :severity="msg.severity" :key="msg.content">{{msg.content}}</Message>
|
||||||
|
</transition-group>
|
||||||
|
|
||||||
<h3>Auto Dismiss</h3>
|
<h3>Auto Dismiss</h3>
|
||||||
<Message severity="warn" :life="10000" :sticky="false">This message will hide in 10 seconds.</Message>
|
<Message severity="warn" :life="10000" :sticky="false">This message will hide in 10 seconds.</Message>
|
||||||
|
|
Loading…
Reference in New Issue