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