细节优化
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user