diff --git a/src/render/components/DigitalFlop.vue b/src/render/components/DigitalFlop.vue
index 2bf95ea..0b041cc 100644
--- a/src/render/components/DigitalFlop.vue
+++ b/src/render/components/DigitalFlop.vue
@@ -6,7 +6,7 @@
\ No newline at end of file
diff --git a/src/render/components/DigitalFlopContainer.vue b/src/render/components/DigitalFlopContainer.vue
index eebc59a..38c07cc 100644
--- a/src/render/components/DigitalFlopContainer.vue
+++ b/src/render/components/DigitalFlopContainer.vue
@@ -11,7 +11,6 @@
:style="item.style"
:ref="item.key + 'Digital'"
/>
-
{{ item.unit }}
@@ -25,33 +24,27 @@ const digitalFlopData = reactive([
{
title: '日 期',
value: '',
- style: 'color: #4d99fc',
- unit : ''
+ style: 'color: #4d99fc'
}, {
title: '时 间',
value: '',
- style: 'color: #f46827',
- unit : ''
+ style: 'color: #f46827'
}, {
title: '经 度',
value: '',
- style: 'color: #40faee',
- unit : ''
+ style: 'color: #40faee'
}, {
title: '纬 度',
value: '',
- style: 'color: #4d99fc',
- unit : ''
+ style: 'color: #4d99fc'
}, {
title: '海 拔',
- value: null,
- style: 'color: #f46827',
- unit : ''
+ value: '',
+ style: 'color: #f46827'
}, {
title: '定位卫星数目',
- value: 0,
- style: 'color: #40faee',
- unit : ''
+ value: '',
+ style: 'color: #40faee'
}
])
@@ -72,7 +65,7 @@ const update = (
// 海拔
digitalFlopData[4].value = `${alt} 米`
// 定位卫星数目
- digitalFlopData[5].value = numSat
+ digitalFlopData[5].value = numSat.toString()
}
defineExpose({ update })
diff --git a/src/render/components/WaterLevel.vue b/src/render/components/WaterLevel.vue
index fbc7575..b15f7ce 100644
--- a/src/render/components/WaterLevel.vue
+++ b/src/render/components/WaterLevel.vue
@@ -29,13 +29,15 @@ const option = reactive({
},
label: {
formatter: function({ value }) {
- return value
+ return parseInt(value)
}
},
data: [60, 0.5, 0.4, 0.3]
}]
})
-const update = console.log
+const update = (alt: number) => {
+ option.series[0].data[0] = alt
+}
defineExpose({ update })
\ No newline at end of file
diff --git a/src/render/page/DataMonitorPage.vue b/src/render/page/DataMonitorPage.vue
index 599db2b..7813fa6 100644
--- a/src/render/page/DataMonitorPage.vue
+++ b/src/render/page/DataMonitorPage.vue
@@ -51,7 +51,7 @@ const update = (nmeaStr: string) => {
digitalFlopContainer.value.update(dateTime, longitude, latitude, alt, numSat)
clock.value.update(dateTime)
compass.value.update(variation, variationPole)
- // waterLevel.value.update(alt)
+ waterLevel.value.update(alt)
// map.value.update(lon, lonPole, lat, latPole)
}