28 lines
583 B
Vue
28 lines
583 B
Vue
<script setup>
|
|
import useStore from "@/store";
|
|
import { storeToRefs } from "pinia";
|
|
|
|
const store = useStore();
|
|
const { deviceBattery: power } = storeToRefs(store);
|
|
</script>
|
|
|
|
<template>
|
|
<view class="container">
|
|
<image src="https://static.shelingxingqiu.com/shootmini/static/b-power.png" mode="widthFix" />
|
|
<view>{{ power === null ? "电量--" : `电量${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>
|