Files
shoot-miniprograms/src/components/BowPower.vue
2025-08-13 16:44:25 +08:00

29 lines
466 B
Vue

<script setup>
defineProps({
power: {
type: Number,
default: 0,
},
});
</script>
<template>
<view class="container" :style="{ opacity: power > 0 ? 1 : 0 }">
<image src="../static/b-power.png" mode="widthFix" />
<view>电量{{ power }}%</view>
</view>
</template>
<style scoped>
.container {
display: flex;
align-items: center;
color: #ffffffa8;
font-size: 13px;
}
.container > image {
width: 20px;
margin-right: 5px;
}
</style>