Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yumaochao
2024-04-24 17:52:54 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9733b4f92a8396ebd3051825bde003a161203247
9733b4f9
1 parent
2aa3bb17
fix: somebug
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
66 deletions
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveEmptyComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveEmptyComponent.ets
View file @
9733b4f
...
...
@@ -46,38 +46,12 @@ export struct LiveEmptyComponent {
private timer: number = -1
retry: () => void = () => {
}
createTimer() {
if (this.emptyType === 8) {
this.timer = setInterval(() => {
this.timeNum--;
if (this.timeNum === 0) {
clearInterval(this.timer);
}
}, 1000);
}
}
destroyTimer() {
if (this.emptyType === 8) {
clearInterval(this.timer);
}
}
onPageShow(): void {
this.createTimer()
}
aboutToAppear(): void {
this.createTimer()
}
onPageHide(): void {
this.destroyTimer()
}
aboutToDisappear() {
this.destroyTimer()
}
build() {
...
...
@@ -98,7 +72,7 @@ export struct LiveEmptyComponent {
// .width('this.EMPTY_IMAGE_WIDTH')
// .height(this.EMPTY_IMAGE_HEIGHT)
Text(this.
emptyType !== 8 ? this.buildNoDataTip() : `${this.buildNoDataTip()}(${this.timeNum}s)`
)
Text(this.
buildNoDataTip()
)
.fontSize($r('app.float.font_size_14'))
.fontColor('#FF999999')
.fontWeight(FontWeight.Normal)
...
...
@@ -107,43 +81,7 @@ export struct LiveEmptyComponent {
.onClick((event: ClickEvent) => {
Logger.info(TAG, `noProgrammeData onClick event?.source: ${event.source}`);
})
if (this.isShowButton()) {
if (this.emptyType !== 15) {
Button('点击重试')
.type(ButtonType.Normal)
.width(80)
.height(28)
.backgroundColor('#fffffff')
.fontColor('#FF666666')
.border({ width: 1 })
.borderColor('#FFEDEDED')
.borderRadius(4)
.fontSize($r('app.float.font_size_12'))
.margin({ top: 16 })
.padding(0)
.onClick(() => {
this.retry()
})
} else {
Button('点击重试')
.type(ButtonType.Normal)
.width(80)
.height(28)
.backgroundColor(Color.Black)
.fontColor('#FFCCCCCC')
.border({ width: 1 })
.borderColor('#4DFFFFFF')
.borderRadius(4)
.fontSize($r('app.float.font_size_12'))
.margin({ top: 16 })
.padding(0)
.onClick(() => {
this.retry()
})
}
}
}
}
.justifyContent(FlexAlign.Center)
.width(this.emptyWidth)
.height(this.emptyHeight)
...
...
Please
register
or
login
to post a comment