HarmonyOSBaseLibs/src/main/ets/view/LoadingView.ets
2024-09-02 18:22:38 +08:00

30 行
653 B
Plaintext

@Preview
@Component
export struct LoadingView {
@Link isLoading: boolean
@Builder
doNothingBuilder() {
}
@BuilderParam customBuilderParam: () => void = this.doNothingBuilder
build() {
Stack() {
this.customBuilderParam()
Column() {
LoadingProgress()
.color(Color.White)
.width(80).height(80)
Text('努力加载中..')
.fontSize(16)
.fontColor(Color.White)
}
.visibility(this.isLoading ? Visibility.Visible : Visibility.None)
.width('100%')
.height('100%')
.backgroundColor('#40000000')
.justifyContent(FlexAlign.Center)
}
}
}