This commit is contained in:
kron
2025-05-16 15:56:54 +08:00
parent 34c9dd00e2
commit 779b3395db
35 changed files with 1003 additions and 40 deletions

View File

@@ -7,9 +7,12 @@ const props = defineProps({
},
total: {
type: Number,
default: 0,
default: 90,
},
});
let barColor = "#fed847";
if (props.tips.includes("红队")) barColor = "#FF6060";
if (props.tips.includes("蓝队")) barColor = "#5FADFF";
const remain = ref(0);
onMounted(() => {
remain.value = props.total;
@@ -31,7 +34,13 @@ onMounted(() => {
</button>
</view>
<view>
<view :style="{ width: `${((total - remain) / total) * 100}%` }" />
<view
:style="{
width: `${((total - remain) / total) * 100}%`,
backgroundColor: barColor,
right: tips.includes('红队') ? 0 : 'unset',
}"
/>
<text>剩余{{ remain }}</text>
</view>
</view>
@@ -73,7 +82,6 @@ onMounted(() => {
.container > view:last-child > view {
position: absolute;
height: 20px;
background-color: #fed847;
border-radius: 20px;
z-index: -1;
}