54 lines
869 B
Vue
54 lines
869 B
Vue
<template>
|
|
|
|
<v-alert
|
|
:color=feedalert.color
|
|
:icon=feedalert.ico
|
|
theme="dark"
|
|
min-height="40"
|
|
min-width = "500"
|
|
position="fixed"
|
|
location = "bottom"
|
|
class="mb-2"
|
|
v-model="feedalert.alert"
|
|
:text=feedalert.text
|
|
|
|
density="compact"
|
|
>
|
|
</v-alert>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
import { watch} from 'vue'
|
|
import { useAlertStore } from '@/store/useAlertStore'
|
|
|
|
export default {
|
|
name: "AlertDefault",
|
|
setup() {
|
|
|
|
const feedalert = useAlertStore().alert
|
|
|
|
watch(()=>feedalert ,()=>{
|
|
|
|
setTimeout(function() {
|
|
feedalert.text=""
|
|
feedalert.ico=""
|
|
feedalert.color=""
|
|
feedalert.alert = false
|
|
}, 8000)
|
|
|
|
}, {deep:true})
|
|
|
|
|
|
|
|
return {
|
|
feedalert
|
|
}
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
|
|
</style> |