diff --git a/src/views/chassis/Chassis.vue b/src/views/chassis/Chassis.vue index 509fc51..5304ece 100644 --- a/src/views/chassis/Chassis.vue +++ b/src/views/chassis/Chassis.vue @@ -156,7 +156,7 @@ const paramList = reactive([ const statusItems = [ { label: '位置', value: `${robotStore.position.x},${robotStore.position.y}` }, { label: '航向', value: robotStore.position.angle }, - { label: '电量', value: `${robotStore.battery * 100} %`, ok: true }, + { label: '电量', value: `${robotStore.battery.percentage * 100} %`, ok: true }, ] function formatVal(p) { diff --git a/src/views/chassis/MapCanvas.vue b/src/views/chassis/MapCanvas.vue index 697fc6f..c80245e 100644 --- a/src/views/chassis/MapCanvas.vue +++ b/src/views/chassis/MapCanvas.vue @@ -363,7 +363,6 @@ const bindEvent = () => { }, { passive: false }); // passive:false 允许 preventDefault } - const updateTooltipDisplay = (hitResult) => { const tooltipEl = document.getElementById('tooltip'); if (!hitResult) { @@ -378,6 +377,7 @@ const updateTooltipDisplay = (hitResult) => { title = `${robot.name}`; details = `