fix: 优化信号显示界面

This commit is contained in:
wangzhongjie 2025-08-28 17:25:13 +08:00
parent 2321052cc1
commit beb6ba1b60
2 changed files with 14 additions and 3 deletions

View File

@ -32,7 +32,10 @@ export default struct CoordinateComponent {
}.width("100%") }.width("100%")
} }
.width("100%") .width("100%")
.height(this.isItHorizontal ? 220 : "100%") .height(this.isItHorizontal ? 280 : "100%")
.backgroundColor("#1A1A1A") .backgroundColor("#1A1A1A")
.margin({
bottom: 20
})
} }
} }

View File

@ -20,7 +20,7 @@ export default struct SignalDisplayComponent {
@Prop active: number = 0 @Prop active: number = 0
// 原始数据 // 原始数据
@State rawData: string = "$GPS,,,,,,,,,,,,,,,,,,,,,,,,,,,,," @State rawData: string = "$GPS,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
@State heightNum: number = 1130 @State heightNum: number = 1200
aboutToAppear(): void { aboutToAppear(): void {
DifferentialAndSignal.onMsg(this.getMsg) DifferentialAndSignal.onMsg(this.getMsg)
@ -85,6 +85,12 @@ export default struct SignalDisplayComponent {
this.signArr[93] = str2 + str1 + str0 this.signArr[93] = str2 + str1 + str0
} }
this.GPSColum[10].value = this.signArr[93] this.GPSColum[10].value = this.signArr[93]
this.vehicleSignal = JSON.parse(JSON.stringify((this.vehicleSignal)))
this.signArr = JSON.parse(JSON.stringify((this.signArr)))
this.GPSColum = JSON.parse(JSON.stringify((this.GPSColum)))
// this.vehicleSignal = this.vehicleSignal.slice()
// this.signArr = this.signArr.slice()
// this.GPSColum = this.GPSColum.slice()
} }
build() { build() {
@ -104,7 +110,9 @@ export default struct SignalDisplayComponent {
CoordinateComponent({ CoordinateComponent({
data: this.GPSColum data: this.GPSColum
}) })
}.height(this.heightNum) }.height(this.heightNum).padding({
bottom: 20
})
} else if (this.active === 1) { } else if (this.active === 1) {
// 原始数据 // 原始数据
Column() { Column() {