更换事件

This commit is contained in:
kron
2025-08-25 13:47:32 +08:00
parent 7a9439567f
commit 448df06daf
28 changed files with 52 additions and 52 deletions

View File

@@ -1,5 +1,5 @@
<script setup>
import { ref, watch, onMounted, onUnmounted } from "vue";
import { ref, watch, onMounted, onBeforeUnmount } from "vue";
import { onLoad, onShow, onHide } from "@dcloudio/uni-app";
import Container from "@/components/Container.vue";
import BowTarget from "@/components/BowTarget.vue";
@@ -160,7 +160,7 @@ onMounted(() => {
});
uni.$on("socket-inbox", onReceiveMessage);
});
onUnmounted(() => {
onBeforeUnmount(() => {
uni.setKeepScreenOn({
keepScreenOn: false,
});