|
@@ -1,5 +1,5 @@
|
|
|
<script setup>
|
|
|
-import { ref } from 'vue'
|
|
|
+import { ref, onMounted } from 'vue'
|
|
|
import { useRouter } from "vue-router"
|
|
|
import useSizeAdapt from "@/useFunctions/useSizeAdapt"
|
|
|
|
|
@@ -20,7 +20,6 @@ const goHome = () => {
|
|
|
const toast = ref(null)
|
|
|
|
|
|
const showToast = () => {
|
|
|
- console.log('showToast被触发')
|
|
|
toast.value.show()
|
|
|
setTimeout(() => {
|
|
|
toast.value.hide()
|
|
@@ -31,6 +30,13 @@ const {
|
|
|
windowSizeInCssForRef,
|
|
|
windowSizeWhenDesignForRef,
|
|
|
} = useSizeAdapt()
|
|
|
+
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ window.closeGame = () => {
|
|
|
+ mode.value = 'home'
|
|
|
+ }
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
<template>
|