ImageAndTextDetailPage.ets
1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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');
}
}