UI优化
This commit is contained in:
@@ -295,6 +295,15 @@ const exitRoom = async () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
const setClipboardData = () => {
|
||||
uni.setClipboardData({
|
||||
data: roomNumber.value,
|
||||
success() {
|
||||
uni.showToast({ title: "复制成功" });
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
uni.$on("socket-inbox", onReceiveMessage);
|
||||
});
|
||||
@@ -315,9 +324,13 @@ onUnmounted(() => {
|
||||
>
|
||||
<view class="standby-phase" v-if="step === 1">
|
||||
<Guide>
|
||||
<view :style="{ display: 'flex', flexDirection: 'column' }">
|
||||
<text :style="{ color: '#fed847' }">人都到齐了吗?</text>
|
||||
<text>天赋异禀的弓箭手们,比赛即将开始!</text>
|
||||
<view class="battle-guide">
|
||||
<view :style="{ display: 'flex', flexDirection: 'column' }">
|
||||
<text :style="{ color: '#fed847' }">弓箭手们,人都到齐了吗?</text>
|
||||
<text v-if="room.battleType === 1">1v1比赛即将开始! </text>
|
||||
<text v-if="room.battleType === 2">大乱斗即将开始! </text>
|
||||
</view>
|
||||
<view @click="setClipboardData">邀请好友</view>
|
||||
</view>
|
||||
</Guide>
|
||||
<view v-if="room.battleType === 1" class="team-mode">
|
||||
@@ -412,7 +425,11 @@ onUnmounted(() => {
|
||||
/>
|
||||
</view>
|
||||
<Timer :seq="timerSeq" />
|
||||
<ScreenHint :show="showRoundTip" :onClose="() => (showRoundTip = false)">
|
||||
<ScreenHint
|
||||
:show="showRoundTip"
|
||||
:onClose="() => (showRoundTip = false)"
|
||||
:mode="isFinalShoot ? 'tall' : 'normal'"
|
||||
>
|
||||
<RoundEndTip
|
||||
:isFinal="isFinalShoot"
|
||||
:round="currentRound - 1"
|
||||
@@ -485,7 +502,7 @@ onUnmounted(() => {
|
||||
}
|
||||
.team-mode {
|
||||
width: calc(100vw - 30px);
|
||||
height: 107vw;
|
||||
height: 125vw;
|
||||
margin: 15px;
|
||||
}
|
||||
.team-mode > image:first-child {
|
||||
@@ -547,4 +564,17 @@ onUnmounted(() => {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.battle-guide {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.battle-guide > view:last-child {
|
||||
color: #fed847;
|
||||
border: 1px solid #fed847;
|
||||
margin-right: 10px;
|
||||
padding: 5px 12px;
|
||||
border-radius: 20px;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user