fix: 优化了一点信号显示
This commit is contained in:
parent
f140274c92
commit
d938aa41ac
@ -1,24 +1,10 @@
|
|||||||
import { GPSData, SignalData } from '../mock';
|
|
||||||
import { SignalDataType } from '../model';
|
|
||||||
import SignalDisplayComponent from './compontents/SignalDisplay';
|
import SignalDisplayComponent from './compontents/SignalDisplay';
|
||||||
|
|
||||||
@Entry
|
@Entry
|
||||||
@Component
|
@Component
|
||||||
struct Index {
|
struct Index {
|
||||||
@State sjxhColum: Array<SignalDataType> = SignalData;
|
|
||||||
@State GPSColum: Array<SignalDataType> = GPSData
|
|
||||||
@State ratio: number = 850 / 960
|
|
||||||
@State gpsActive: number = 1
|
|
||||||
@State active: number = 0
|
|
||||||
@State msg: string = ''
|
|
||||||
@State @Watch('outClick') outFlag: boolean = false;
|
|
||||||
@State url: string = ''
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
Column() {
|
Column() {
|
||||||
// signDisplayCom({
|
|
||||||
// showBack: true
|
|
||||||
// })
|
|
||||||
SignalDisplayComponent()
|
SignalDisplayComponent()
|
||||||
}
|
}
|
||||||
.width('100%')
|
.width('100%')
|
||||||
@ -26,7 +12,4 @@ struct Index {
|
|||||||
.backgroundImage($r('app.media.bg'))
|
.backgroundImage($r('app.media.bg'))
|
||||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||||
}
|
}
|
||||||
|
|
||||||
outClick() {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -10,7 +10,6 @@ export default struct SignalDisplayComponent {
|
|||||||
@State GPSColum: Array<SignalDataType> = GPSData
|
@State GPSColum: Array<SignalDataType> = GPSData
|
||||||
|
|
||||||
aboutToAppear(): void {
|
aboutToAppear(): void {
|
||||||
|
|
||||||
DifferentialAndSignal.onMsg((data: string) => {
|
DifferentialAndSignal.onMsg((data: string) => {
|
||||||
const result: WorkerBackMessage = JSON.parse(data)
|
const result: WorkerBackMessage = JSON.parse(data)
|
||||||
if (result.type === "centerUdpData") {
|
if (result.type === "centerUdpData") {
|
||||||
@ -152,7 +151,6 @@ struct GPSComponent {
|
|||||||
label: "固件版本",
|
label: "固件版本",
|
||||||
value: this.data[54] || "-"
|
value: this.data[54] || "-"
|
||||||
})
|
})
|
||||||
|
|
||||||
blockComponent({
|
blockComponent({
|
||||||
label: "方向盘类型",
|
label: "方向盘类型",
|
||||||
value: this.data[50] || "-"
|
value: this.data[50] || "-"
|
||||||
@ -177,7 +175,6 @@ struct GPSComponent {
|
|||||||
label: "本机IP",
|
label: "本机IP",
|
||||||
value: this.ip
|
value: this.ip
|
||||||
})
|
})
|
||||||
|
|
||||||
blockComponent({
|
blockComponent({
|
||||||
label: "接口心跳",
|
label: "接口心跳",
|
||||||
value: this.data[52] || "-"
|
value: this.data[52] || "-"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user