Fixed #653 - Closing message and reopening it does not work
parent
835ad45065
commit
8c0122cb9d
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<transition name="p-message" appear>
|
||||
<div :class="containerClass" v-if="visible" role="alert">
|
||||
<div :class="containerClass" v-show="visible" role="alert">
|
||||
<div class="p-message-wrapper">
|
||||
<span :class="iconClass"></span>
|
||||
<div class="p-message-text">
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<h5>Dynamic</h5>
|
||||
<Button label="Show" @click="addMessages()" />
|
||||
<transition-group name="p-message" 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.id">{{msg.content}}</Message>
|
||||
</transition-group>
|
||||
|
||||
<h5>Auto Dismiss</h5>
|
||||
|
@ -55,9 +55,9 @@ export default {
|
|||
methods: {
|
||||
addMessages() {
|
||||
this.messages = [
|
||||
{severity: 'info', content: 'Dynamic Info Message'},
|
||||
{severity: 'success', content: 'Dynamic Success Message'},
|
||||
{severity: 'warn', content: 'Dynamic Warning Message'}
|
||||
{severity: 'info', content: 'Dynamic Info Message', id: this.count++},
|
||||
{severity: 'success', content: 'Dynamic Success Message', id: this.count++},
|
||||
{severity: 'warn', content: 'Dynamic Warning Message', id: this.count++}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
|
@ -254,7 +254,7 @@ import InlineMessage from 'primevue/inlinemessage';
|
|||
<h5>Dynamic</h5>
|
||||
<Button label="Show" @click="addMessages()" />
|
||||
<transition-group name="p-message" 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.id">{{msg.content}}</Message>
|
||||
</transition-group>
|
||||
|
||||
<h5>Auto Dismiss</h5>
|
||||
|
@ -286,9 +286,9 @@ export default {
|
|||
methods: {
|
||||
addMessages() {
|
||||
this.messages = [
|
||||
{severity: 'info', content: 'Dynamic Info Message'},
|
||||
{severity: 'success', content: 'Dynamic Success Message'},
|
||||
{severity: 'warn', content: 'Dynamic Warning Message'}
|
||||
{severity: 'info', content: 'Dynamic Info Message', id: this.count++},
|
||||
{severity: 'success', content: 'Dynamic Success Message', id: this.count++},
|
||||
{severity: 'warn', content: 'Dynamic Warning Message', id: this.count++}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue