美文网首页ArkTS/ArkUI实战
鸿蒙ArkTS/ArkUI电商实战-闪屏页

鸿蒙ArkTS/ArkUI电商实战-闪屏页

作者: ISwiftUI | 来源:发表于2024-04-11 10:11 被阅读0次

    鸿蒙ArkTS/ArkUI电商实战系列

    本章内容

    应用启动闪屏展示广告、欢迎图,倒计时

    效果图:


    效果图

    相关源码:
    SplashPage.ets

    import hilog from '@ohos.hilog'
    import { CountDownView } from '../component/CountDownView'
    
    @Entry
    @Component
    struct SplashPage {
    
      build() {
        Flex({ direction: FlexDirection.Column}) {
          Stack({alignContent: Alignment.TopEnd}) {
            Column() {
              CountDownView({onFinish: () => {
                this.onCountDownFinish()
              }})
                .width(50)
                .height(50)
                .margin({top: 15, right: 15})
            }
    
            Column({}) {
              Text('闪屏页').onClick(() => {
                hilog.debug(0xFF00, 'SplashPage', "闪屏页")
              })
            }
            .width('100%')
            .height('100%')
            .justifyContent(FlexAlign.Center)
            .alignItems(HorizontalAlign.Center)
          }
          .width('100%')
          .height('100%')
        }
        .width('100%')
        .height('100%')
        .backgroundColor(0x70DBDB)
      }
    
      onCountDownFinish = () => {
    
      }
    }
    

    CountDownView.ets

    相关文章

      网友评论

        本文标题:鸿蒙ArkTS/ArkUI电商实战-闪屏页

        本文链接:https://www.haomeiwen.com/subject/dibcxjtx.html