添加2v2页面

This commit is contained in:
kron
2025-08-13 16:44:25 +08:00
parent 5709035d4b
commit f388270fff
18 changed files with 779 additions and 54 deletions

View File

@@ -1,4 +1,6 @@
<script setup>
import BowPower from "@/components/BowPower.vue";
import { RoundImages } from "@/constants";
defineProps({
roundResults: {
type: Array,
@@ -17,6 +19,12 @@ defineProps({
<template>
<view class="container">
<view class="guide-row">
<image src="../static/shooter.png" mode="widthFix" />
<view :style="{ marginBottom: '10px', transform: 'scale(0.8) translateX(10px)' }">
<BowPower :power="20" />
</view>
</view>
<view>
<image src="../static/battle-header-melee.png" mode="widthFix" />
<text>蓝队({{ bluePoints }})</text>
@@ -25,10 +33,7 @@ defineProps({
<view class="players">
<view>
<view v-for="(result, index) in roundResults" :key="index">
<text
>{{ index > 4 ? "决金箭" : "Round" }}
{{ index > 4 ? `R${index - 4}` : index + 1 }}</text
>
<image :src="RoundImages[`round${index + 1}`]" mode="widthFix" />
<view>
<text>{{
result.blueArrows.length
@@ -42,9 +47,9 @@ defineProps({
</view>
<block v-if="roundResults.length < 3">
<view v-for="i in 3 - roundResults.length" :key="i">
<text>Round</text>
<image :src="RoundImages[`round${i}`]" mode="widthFix" />
<view>
<text></text>
<text>{{ i }}</text>
<text></text>
</view>
</view>
@@ -52,10 +57,7 @@ defineProps({
</view>
<view>
<view v-for="(result, index) in roundResults" :key="index">
<text
>{{ index > 4 ? "决金箭" : "Round" }}
{{ index > 4 ? `R${index - 4}` : index + 1 }}</text
>
<image :src="RoundImages[`round${index + 1}`]" mode="widthFix" />
<view>
<text>{{
result.redArrows.length
@@ -69,7 +71,7 @@ defineProps({
</view>
<block v-if="roundResults.length < 3">
<view v-for="i in 3 - roundResults.length" :key="i">
<text>Round</text>
<image :src="RoundImages[`round${i}`]" mode="widthFix" />
<view>
<text></text>
<text></text>
@@ -84,31 +86,25 @@ defineProps({
<style scoped>
.container {
width: 100%;
margin-top: 20px;
overflow: hidden;
margin-top: -40px;
}
.container > view:first-child {
.container > view:nth-child(2) {
position: relative;
display: flex;
justify-content: space-around;
align-items: center;
font-size: 13px;
}
.container > view:first-child > image:first-child {
.container > view:nth-child(2) > image:first-child {
position: absolute;
width: 100%;
top: -6px;
}
.container > view:first-child > text {
.container > view:nth-child(2) > text {
z-index: 1;
margin-top: 2px;
}
.container > view:first-child > text:nth-child(2) {
color: #364469;
}
.container > view:first-child > text:nth-child(3) {
color: #692735;
}
.players {
display: flex;
}
@@ -121,35 +117,42 @@ defineProps({
color: #fff;
padding-top: 5px;
}
.players > view:first-child {
background-color: #364469;
.players > view:first-child > view {
background: linear-gradient(270deg, #172a86 0%, #0006 100%);
}
.players > view:last-child {
background-color: #692735;
.players > view:last-child > view {
background: linear-gradient(270deg, #0006 0%, #6a1212 100%);
}
.players > view > view {
min-height: 28px;
width: 85%;
padding: 5px 20px;
min-height: 25px;
width: calc(100% - 40px);
padding: 2px 20px;
margin-bottom: 5px;
background-image: url("../static/row-bg.png");
background-size: 90% 100%;
background-repeat: no-repeat;
background-position: center;
display: flex;
justify-content: space-between;
align-items: center;
}
.players > view > view > text {
font-size: 14px;
.players > view > view > image:first-child {
width: 72px;
}
.players > view > view > view:last-child {
font-size: 14px;
padding-right: 20px;
font-size: 10px;
}
.players > view > view > view:last-child > text:first-child {
font-size: 20px;
font-size: 16px;
color: #fed847;
margin-right: 5px;
}
.guide-row {
display: flex;
justify-content: space-between;
align-items: flex-end;
padding: 0 5vw;
margin-bottom: -4px;
z-index: 2;
position: relative;
}
.guide-row > image {
width: 18%;
}
</style>