LiLongLong 5 months ago
parent
commit
fe914720e3
  1. 8
      src/components/Header.tsx
  2. 2
      src/pages/measure/components/MeasureAction.tsx

8
src/components/Header.tsx

@ -152,8 +152,10 @@ export default function Header() {
return ( return (
<> <>
{contextHolder} {contextHolder}
<div className="bg-[--bgColor] h-full flex items-center">
<section className="ml-auto rounded-md h-9 mr-4 flex items-center bg-white gap-2 pl-4">
<div className="bg-[--bgColor] h-full flex justify-end items-center">
{deviceInfo.isConnected && (
<>
<section className=" rounded-md h-9 mr-4 flex items-center bg-white gap-2 pl-4">
<span className="w-[94px]">{deviceInfo.temperature.toFixed(1)} </span> <span className="w-[94px]">{deviceInfo.temperature.toFixed(1)} </span>
<span className="w-[120px]">X轴倾斜{deviceInfo.inclinatorX}</span> <span className="w-[120px]">X轴倾斜{deviceInfo.inclinatorX}</span>
<span className="w-[120px]">Y轴倾斜{deviceInfo.inclinatorY}</span> <span className="w-[120px]">Y轴倾斜{deviceInfo.inclinatorY}</span>
@ -166,6 +168,8 @@ export default function Header() {
/> />
<p className="text-primary text-xs">{deviceInfo.power.toFixed()}%</p> <p className="text-primary text-xs">{deviceInfo.power.toFixed()}%</p>
</section> </section>
</>
)}
{/* <section className="bg-white rounded-md h-9 w-10 flex justify-center items-center mr-3"> {/* <section className="bg-white rounded-md h-9 w-10 flex justify-center items-center mr-3">
<img src={icon_usb} className="w-6" alt="icon" /> <img src={icon_usb} className="w-6" alt="icon" />
</section> */} </section> */}

2
src/pages/measure/components/MeasureAction.tsx

@ -96,7 +96,7 @@ export default function MeasureAction() {
// 开始/重新测量按钮点击事件 // 开始/重新测量按钮点击事件
const onStart = () => { const onStart = () => {
if (startBtnText === "新测量") { if (startBtnText === "新测量") {
navigate("../newMeasure");
navigate("../config");
return; return;
} }
// 重置测量相关状态 // 重置测量相关状态

Loading…
Cancel
Save