This commit is contained in:
2026-05-29 12:05:22 +08:00
parent 9b5cd5b2b9
commit 7f4fad7b62
7 changed files with 6073 additions and 50 deletions
+7 -7
View File
@@ -86,7 +86,7 @@
<script setup lang="ts">
import { computed, onMounted, onUnmounted, ref } from 'vue'
import { onShow, onHide } from '@dcloudio/uni-app'
import { onShow, onHide, onUnload } from '@dcloudio/uni-app'
import { useMetronome } from '../hooks/useMetronome'
import WalkerCanvas from './components/walker-canvas.vue'
@@ -206,15 +206,15 @@ onShow(() => {
fg.preload()
})
onHide(() => {
function cleanupMetronome() {
fg.stop()
uni.setKeepScreenOn({ keepScreenOn: false })
})
}
onUnmounted(() => {
fg.stop()
uni.setKeepScreenOn({ keepScreenOn: false })
})
onHide(cleanupMetronome)
onUnload(cleanupMetronome)
onUnmounted(cleanupMetronome)
</script>
<style lang="scss" scoped>