细节优化

This commit is contained in:
kron
2025-07-14 13:39:10 +08:00
parent d73d52f752
commit cde905c680
15 changed files with 106 additions and 90 deletions

View File

@@ -40,12 +40,16 @@ const showGlobalHint = (type) => {
hintType.value = type;
showHint.value = true;
};
const hideGlobalHint = () => {
showHint.value = false;
};
onMounted(() => {
const deviceInfo = uni.getDeviceInfo();
isIos.value = deviceInfo.osName === "ios";
});
onShow(() => {
uni.$showHint = showGlobalHint;
uni.$hideHint = hideGlobalHint;
showHint.value = false;
});
const backToGame = debounce(async () => {
@@ -86,10 +90,10 @@ const goBack = () => {
<text>离开比赛可能会导致比赛失败</text>
<text>确认离开吗</text>
<view>
<button hover-class="none" @click="goBack">离开比赛</button>
<button hover-class="none" @click="() => (showHint = false)">
继续比赛
</button>
<button hover-class="none" @click="goBack">离开比赛</button>
</view>
</view>
<view v-if="hintType === 3" class="tip-content">