keyed notifications

This commit is contained in:
koehr 2020-06-30 20:50:08 +02:00
parent 1c146816ab
commit da2d4639ec

View file

@ -1,6 +1,6 @@
<template> <template>
<transition-group name="notifications" tag="section" class="notification-section"> <transition-group name="notifications" tag="section" class="notification-section">
<p class="note" :class="note.level" v-for="note in notifications"> <p :key="i" class="note" :class="note.level" v-for="(note, i) in notifications">
<strong>{{ note.title }}</strong> <strong>{{ note.title }}</strong>
<div v-html="note.content" /> <div v-html="note.content" />
<button @click="$emit('dismiss', note)">dismiss</button> <button @click="$emit('dismiss', note)">dismiss</button>