25 lines
427 B
Vue
25 lines
427 B
Vue
<template>
|
|
|
|
<RouterView />
|
|
<Toast :queue="toastQueue" />
|
|
|
|
</template>
|
|
|
|
<script setup>
|
|
import { onMounted, ref, provide } from 'vue';
|
|
import Toast from './components/Toast.vue';
|
|
|
|
|
|
const toastQueue = ref([]);
|
|
|
|
const setToast = (message, type = 'info', duration) => {
|
|
toastQueue.value.push({ message, type, duration });
|
|
};
|
|
|
|
onMounted(() => {
|
|
// authStore.checkLoginStatus();
|
|
});
|
|
|
|
provide('toast', { setToast });
|
|
</script>
|