style: 字体调整

This commit is contained in:
zhanghao 2026-08-05 15:11:31 +08:00
parent d6c72eb0f0
commit 10c9e576e3
2 changed files with 4 additions and 4 deletions

View File

@ -156,7 +156,7 @@ const paramList = reactive([
const statusItems = [ const statusItems = [
{ label: '位置', value: `${robotStore.position.x},${robotStore.position.y}` }, { label: '位置', value: `${robotStore.position.x},${robotStore.position.y}` },
{ label: '航向', value: robotStore.position.angle }, { label: '航向', value: robotStore.position.angle },
{ label: '电量', value: `${robotStore.battery * 100} %`, ok: true }, { label: '电量', value: `${robotStore.battery.percentage * 100} %`, ok: true },
] ]
function formatVal(p) { function formatVal(p) {

View File

@ -363,7 +363,6 @@ const bindEvent = () => {
}, { passive: false }); // passive:false preventDefault }, { passive: false }); // passive:false preventDefault
} }
const updateTooltipDisplay = (hitResult) => { const updateTooltipDisplay = (hitResult) => {
const tooltipEl = document.getElementById('tooltip'); const tooltipEl = document.getElementById('tooltip');
if (!hitResult) { if (!hitResult) {
@ -378,6 +377,7 @@ const updateTooltipDisplay = (hitResult) => {
title = `${robot.name}`; title = `${robot.name}`;
details = `<div class="tooltip-detail">位置: (${robot.x.toFixed(3)}, ${robot.y.toFixed(3)})</div> details = `<div class="tooltip-detail">位置: (${robot.x.toFixed(3)}, ${robot.y.toFixed(3)})</div>
<div class="tooltip-detail">朝向: ${(robot.angle * 180 / Math.PI).toFixed(1)}°</div> <div class="tooltip-detail">朝向: ${(robot.angle * 180 / Math.PI).toFixed(1)}°</div>
<div class="tooltip-detail">电量: ${(robotStore.battery.percentage* 100).toFixed(1)}%</div>
<div class="tooltip-detail">ID: ${robot.id}</div>`; <div class="tooltip-detail">ID: ${robot.id}</div>`;
} }
tooltipEl.innerHTML = `<div class="tooltip-title">${title}</div>${details}`; tooltipEl.innerHTML = `<div class="tooltip-title">${title}</div>${details}`;
@ -524,7 +524,7 @@ onUnmounted(() => {
.tooltip-title { .tooltip-title {
font-weight: 700; font-weight: 700;
font-size: 11px; font-size: 14px;
margin-bottom: 5px; margin-bottom: 5px;
color: $color-canvas-tooltip-title; color: $color-canvas-tooltip-title;
} }
@ -532,7 +532,7 @@ onUnmounted(() => {
:deep(.tooltip-detail) { :deep(.tooltip-detail) {
color: $color-text-tooltip; color: $color-text-tooltip;
padding: 2px 0; padding: 2px 0;
font-size: 9px; font-size: 12px;
word-break: break-all; word-break: break-all;
} }
} }