Files
shoot-miniprograms/src/components/BowPower.vue
2025-06-15 20:55:34 +08:00

29 lines
464 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: #b9b9b9;
font-size: 13px;
}
.container > image {
width: 22px;
margin-right: 5px;
}
</style>