ImageAndTextDetailPage.ets 1.07 KB
import { Action } from 'wdBean';
import { ImageAndTextPageComponent } from 'wdComponent'
import { Logger } from 'wdKit'
import router from '@ohos.router';

const TAG = 'ImageAndTextDetailPage';

@Entry
@Component
struct ImageAndTextDetailPage {
  action: Action = {} as Action

  build() {
    Column() {
      ImageAndTextPageComponent({action: this.action})
    }
  }

  pageTransition(){
    // 定义页面进入时的效果,从右边侧滑入
    PageTransitionEnter({ type: RouteType.None, duration: 300 })
      .slide(SlideEffect.Right)
    // 定义页面退出时的效果,向右边侧滑出
    PageTransitionExit({ type: RouteType.None, duration: 300 })
      .slide(SlideEffect.Right)
  }


  aboutToAppear() {
    Logger.info(TAG, 'aboutToAppear');
    let action: Action = router.getParams() as Action
    this.action = action
  }

  aboutToDisappear() {
    Logger.info(TAG, 'aboutToDisappear');
  }

  onPageShow() {
    Logger.info(TAG, 'onPageShow');
  }

  onPageHide() {
    Logger.info(TAG, 'onPageHide');
  }

  onBackPress() {
    Logger.info(TAG, 'onBackPress');
  }
}