mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 20:29:35 +02:00
added logic for notification
This commit is contained in:
36
luckydiamond/src/components/NotiicationwindowComponent.vue
Normal file
36
luckydiamond/src/components/NotiicationwindowComponent.vue
Normal file
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<div class="notification" v-if="notification">
|
||||
<div class="notification__content">
|
||||
<h3>Успешное пополнение</h3>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@/assets/css/ComponentsStyles/notification.css'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
notification: Boolean
|
||||
},
|
||||
emits: ['notificationremove'],
|
||||
methods: {
|
||||
NotificationsTimer() {
|
||||
setTimeout(() => {
|
||||
this.$emit('notificationremove')
|
||||
}, 4000)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
notification(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.NotificationsTimer()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user