-
Notifications
You must be signed in to change notification settings - Fork 4
/
app.vue
46 lines (45 loc) · 1.11 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<template>
<v-app>
<NuxtLayout>
<NuxtPage />
<DialogConfirm />
<ChatBox v-if="checkIsLogin()" />
<MessageBox v-if="checkIsLogin()" />
<VSnackbar
color="success"
location="top"
:timeout="2000"
v-model="isSnackbarOpen"
>{{ snackbarMessage }}</VSnackbar
>
</NuxtLayout>
</v-app>
</template>
<script setup>
import { useSpUtility } from "./composables/useSpUtility";
import { storeToRefs } from "pinia";
import { storeChatBox } from "@/stores/storeChatBox";
const { checkIsLogin } = useSpUtility();
const isSnackbarOpen = useState("isSnackbarOpen", () => ref(false));
const snackbarMessage = useState("snackbarMessage", () => ref(""));
const route = useRoute();
// 路由更換自動關閉聊天室
const _storeChatBox = storeChatBox();
const { showChat } = storeToRefs(_storeChatBox);
watch(
() => route.path,
(val) => {
if (showChat.value) {
_storeChatBox.showChat = false;
}
}
);
</script>
<style>
body::-webkit-scrollbar {
display: none;
}
body {
scrollbar-width: none;
}
</style>