1
0
Ответвление 0
Temps_Reel_Robot/software/UserInterfaceWeb/InterfaceUtilisateur/src/components/NotificationList.vue
Sébastien DI MERCURIO 776a2f4ce6 initial commit
2018-08-27 16:39:49 +02:00

33 строки
635 Б
Vue

<template>
<div>
<v-alert icon="info" v-for="(notify, index) in list" :id="index" :key="index"
:color="notify.type" value="true" transition="slide-y-transition" @click="deleteNotes">
{{notify.msg}}
</v-alert>
</div>
</template>
<script>
export default {
data:()=>{
return {
list:[],
}
},
sockets:{
notifications(data){
this.list.push(data);
}
},
methods:{
deleteNotes(e){
const noteSelected = e.target.parentElement.id;
this.list = this.list.filter((info, index) => noteSelected != index);
}
}
}
</script>
<style>
</style>