feat 优化设备电量

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Ironsp
2026-06-10 08:15:01 +08:00
parent 19252dd7cc
commit 17f7c0ad78
2 changed files with 6 additions and 5 deletions

View File

@@ -5,10 +5,6 @@
"ComputedRef": true,
"DirectiveBinding": true,
"EffectScope": true,
"ElLoading": true,
"ElMessage": true,
"ElMessageBox": true,
"ElNotification": true,
"ExtractDefaultPropTypes": true,
"ExtractPropTypes": true,
"ExtractPublicPropTypes": true,

View File

@@ -65,7 +65,12 @@
<el-tag v-else>{{ scope.row.status ?? '-' }}</el-tag>
</template> -->
</el-table-column>
<el-table-column label="电池电量" align="center" prop="batteryLevel" />
<el-table-column label="电池电量" align="center" prop="batteryLevel">
<template #default="scope">
<el-tag v-if="scope.row.batteryLevel">{{ scope.row.batteryLevel + '%' }}</el-tag>
<el-tag v-else> 暂未获取 </el-tag>
</template>
</el-table-column>
<el-table-column label="设备型号" align="center" prop="model" />
<el-table-column label="固件版本" align="center" prop="id" />
<el-table-column label="是否绘制区域" align="center" prop="isDrawArea">