1
0
forked from dyf/dyf-vue-ui

控制面板,优化电量显示百分比

This commit is contained in:
fengerli
2025-09-22 18:01:41 +08:00
parent d632ba514c
commit 872d7d1c14

View File

@ -118,7 +118,7 @@
'battery-yellow': Number(scope.row.battery) >= 20 && Number(scope.row.battery) < 80, 'battery-yellow': Number(scope.row.battery) >= 20 && Number(scope.row.battery) < 80,
'battery-green': Number(scope.row.battery) >= 80 && Number(scope.row.battery) <= 100 'battery-green': Number(scope.row.battery) >= 80 && Number(scope.row.battery) <= 100
}"> }">
{{ scope.row.battery }}% {{ scope.row.battery || '0'}}%
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -306,7 +306,6 @@ const handleControl = (row: any) => {
const detailPageUrl = row.detailPageUrl; const detailPageUrl = row.detailPageUrl;
const basePath = detailPageUrl.replace(/\/index$/, ''); const basePath = detailPageUrl.replace(/\/index$/, '');
const dynamicPath = `/${basePath}/${deviceId}`; const dynamicPath = `/${basePath}/${deviceId}`;
debugger;
router.push(dynamicPath); // 跳转路由 router.push(dynamicPath); // 跳转路由
}; };