添加全局提示

This commit is contained in:
kron
2025-07-02 17:21:44 +08:00
parent 5c5b72d556
commit 7fb72c9b1e
6 changed files with 261 additions and 228 deletions

View File

@@ -1,7 +1,6 @@
<script setup>
import { ref } from "vue";
import AppBackground from "@/components/AppBackground.vue";
import Header from "@/components/Header.vue";
import Container from "@/components/Container.vue";
import Guide from "@/components/Guide.vue";
import SButton from "@/components/SButton.vue";
import SModal from "@/components/SModal.vue";
@@ -51,48 +50,48 @@ const onCreateRoom = () => {
</script>
<template>
<view>
<AppBackground />
<Header title="好友约战" />
<Guide>
<view class="guide-tips">
<text>约上朋友开几局欢乐多不寂寞</text>
<text>一起练升级更快早日加入全国排位赛</text>
</view>
</Guide>
<view class="founded-room">
<image src="../static/founded-room.png" mode="widthFix" />
<view>
<input
placeholder="输入房间号"
v-model="roomNumber"
placeholder-style="color: #ccc"
/>
<view @click="enterRoom">进入房间</view>
</view>
</view>
<view class="create-room">
<image src="../static/battle-bg.png" mode="widthFix" />
<view>
<image src="../static/avatar.png" mode="widthFix" />
<image src="../static/versus.png" mode="widthFix" />
<Container title="好友约战">
<view :style="{ width: '100%' }">
<Guide>
<view class="guide-tips">
<text>约上朋友开几局欢乐多不寂寞</text>
<text>一起练升级更快早日加入全国排位赛</text>
</view>
</Guide>
<view class="founded-room">
<image src="../static/founded-room.png" mode="widthFix" />
<view>
<image src="../static/question-mark.png" mode="widthFix" />
<input
placeholder="输入房间号"
v-model="roomNumber"
placeholder-style="color: #ccc"
/>
<view @click="enterRoom">进入房间</view>
</view>
</view>
<view>
<SButton width="70%" :rounded="30" :onClick="onCreateRoom">
创建约战房
</SButton>
<view class="create-room">
<image src="../static/battle-bg.png" mode="widthFix" />
<view>
<image src="../static/avatar.png" mode="widthFix" />
<image src="../static/versus.png" mode="widthFix" />
<view>
<image src="../static/question-mark.png" mode="widthFix" />
</view>
</view>
<view>
<SButton width="70%" :rounded="30" :onClick="onCreateRoom">
创建约战房
</SButton>
</view>
</view>
<SModal :show="showModal" :onClose="() => (showModal = false)">
<view v-if="warnning" class="warnning">
{{ warnning }}
</view>
<CreateRoom v-if="!warnning" :onConfirm="() => (showModal = false)" />
</SModal>
</view>
<SModal :show="showModal" :onClose="() => (showModal = false)">
<view v-if="warnning" class="warnning">
{{ warnning }}
</view>
<CreateRoom v-if="!warnning" :onConfirm="() => (showModal = false)" />
</SModal>
</view>
</Container>
</template>
<style scoped>