设置屏幕常亮
This commit is contained in:
@@ -81,10 +81,16 @@ async function onComplete() {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
uni.setKeepScreenOn({
|
||||
keepScreenOn: true,
|
||||
});
|
||||
uni.$on("socket-inbox", onReceiveMessage);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
uni.setKeepScreenOn({
|
||||
keepScreenOn: false,
|
||||
});
|
||||
uni.$off("socket-inbox", onReceiveMessage);
|
||||
});
|
||||
</script>
|
||||
@@ -112,6 +118,7 @@ onUnmounted(() => {
|
||||
</view>
|
||||
<BowTarget
|
||||
:start="start"
|
||||
:currentRound="scores.length"
|
||||
:totalRound="start ? total : 0"
|
||||
:scores="scores"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user