SettingPage.ets
742 Bytes
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
import ArrayList from '@ohos.util.ArrayList'
import { MineSettingComponent } from 'wdComponent';
import { AccountAndSecurityLayout } from 'wdComponent';
import router from '@ohos.router';
@Entry
@Component
struct SettingPage {
@State message: string = 'Hello World 02'
@State pageType: string = '';
@State params:any = router.getParams();
onPageShow() {
this.pageType = this.params.pageType;
// this.pageType = 'mainSetting';// 获取info属性的值
}
build() {
Column() {
if (this.pageType == 'mainSetting') {
MineSettingComponent()
} else {
AccountAndSecurityLayout()
}
}.setFullWidth()
}
// 私有方法
@Styles setFullWidth(){
.width('100%')
}
}
/*
* */