Showing
16 changed files
with
142 additions
and
85 deletions
| @@ -63,7 +63,6 @@ export struct AppointmentListUI { | @@ -63,7 +63,6 @@ export struct AppointmentListUI { | ||
| 63 | .width("100%") | 63 | .width("100%") |
| 64 | .height("100%") | 64 | .height("100%") |
| 65 | .backgroundColor($r('app.color.color_F9F9F9')) | 65 | .backgroundColor($r('app.color.color_F9F9F9')) |
| 66 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 67 | CustomPullToRefresh({ | 66 | CustomPullToRefresh({ |
| 68 | alldata:this.data, | 67 | alldata:this.data, |
| 69 | scroller:this.scroller, | 68 | scroller:this.scroller, |
| @@ -120,12 +120,11 @@ export struct FollowFirstTabsComponent{ | @@ -120,12 +120,11 @@ export struct FollowFirstTabsComponent{ | ||
| 120 | this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER) | 120 | this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER) |
| 121 | }) | 121 | }) |
| 122 | .width('100%') | 122 | .width('100%') |
| 123 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 124 | .layoutWeight(1) | 123 | .layoutWeight(1) |
| 125 | .loop(false) | 124 | .loop(false) |
| 126 | .indicator(false) | 125 | .indicator(false) |
| 127 | .effectMode(EdgeEffect.None) | 126 | .effectMode(EdgeEffect.None) |
| 128 | - }.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | 127 | + } |
| 129 | } | 128 | } |
| 130 | }.width('100%') | 129 | }.width('100%') |
| 131 | .height("100%") | 130 | .height("100%") |
| @@ -101,7 +101,6 @@ export struct FollowListDetailUI { | @@ -101,7 +101,6 @@ export struct FollowListDetailUI { | ||
| 101 | .margin({bottom:"40lpx"}) | 101 | .margin({bottom:"40lpx"}) |
| 102 | } | 102 | } |
| 103 | } | 103 | } |
| 104 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 105 | .edgeEffect(EdgeEffect.None) | 104 | .edgeEffect(EdgeEffect.None) |
| 106 | .cachedCount(5) | 105 | .cachedCount(5) |
| 107 | .padding({ left: '31lpx', right: '31lpx' }) | 106 | .padding({ left: '31lpx', right: '31lpx' }) |
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowSecondTabsComponent.ets
| @@ -27,7 +27,6 @@ export struct FollowSecondTabsComponent{ | @@ -27,7 +27,6 @@ export struct FollowSecondTabsComponent{ | ||
| 27 | .width("100%") | 27 | .width("100%") |
| 28 | .height("100%") | 28 | .height("100%") |
| 29 | .backgroundColor($r('app.color.color_transparent')) | 29 | .backgroundColor($r('app.color.color_transparent')) |
| 30 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 31 | 30 | ||
| 32 | FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id,type:1}) | 31 | FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id,type:1}) |
| 33 | .height("100%") | 32 | .height("100%") |
| @@ -40,7 +39,6 @@ export struct FollowSecondTabsComponent{ | @@ -40,7 +39,6 @@ export struct FollowSecondTabsComponent{ | ||
| 40 | .width("100%") | 39 | .width("100%") |
| 41 | .height("100%") | 40 | .height("100%") |
| 42 | .backgroundColor($r('app.color.color_transparent')) | 41 | .backgroundColor($r('app.color.color_transparent')) |
| 43 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 44 | 42 | ||
| 45 | this.FollowSecondUI() | 43 | this.FollowSecondUI() |
| 46 | }.width("100%") | 44 | }.width("100%") |
| @@ -50,7 +48,6 @@ export struct FollowSecondTabsComponent{ | @@ -50,7 +48,6 @@ export struct FollowSecondTabsComponent{ | ||
| 50 | } | 48 | } |
| 51 | .width('100%') | 49 | .width('100%') |
| 52 | .layoutWeight(1) | 50 | .layoutWeight(1) |
| 53 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 54 | } | 51 | } |
| 55 | 52 | ||
| 56 | @Builder FollowSecondUI(){ | 53 | @Builder FollowSecondUI(){ |
| @@ -89,7 +86,6 @@ export struct FollowSecondTabsComponent{ | @@ -89,7 +86,6 @@ export struct FollowSecondTabsComponent{ | ||
| 89 | .effectMode(EdgeEffect.None) | 86 | .effectMode(EdgeEffect.None) |
| 90 | .height('100%') | 87 | .height('100%') |
| 91 | .layoutWeight(1) | 88 | .layoutWeight(1) |
| 92 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 93 | }.width('100%') | 89 | }.width('100%') |
| 94 | } | 90 | } |
| 95 | 91 |
| @@ -122,7 +122,6 @@ export struct FollowThirdTabsComponent{ | @@ -122,7 +122,6 @@ export struct FollowThirdTabsComponent{ | ||
| 122 | }) | 122 | }) |
| 123 | .width('100%') | 123 | .width('100%') |
| 124 | .layoutWeight(1) | 124 | .layoutWeight(1) |
| 125 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 126 | } | 125 | } |
| 127 | } | 126 | } |
| 128 | 127 |
| 1 | -import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index' | 1 | +import { DateTimeUtils } from 'wdKit/Index' |
| 2 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' | 2 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' |
| 3 | import { Remark, WDMessageCenterMessageType } from '../../../model/InteractMessageModel' | 3 | import { Remark, WDMessageCenterMessageType } from '../../../model/InteractMessageModel' |
| 4 | import MinePageDatasModel from '../../../model/MinePageDatasModel' | 4 | import MinePageDatasModel from '../../../model/MinePageDatasModel' |
| @@ -7,7 +7,6 @@ import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh' | @@ -7,7 +7,6 @@ import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh' | ||
| 7 | import { CustomTitleUI } from '../../reusable/CustomTitleUI' | 7 | import { CustomTitleUI } from '../../reusable/CustomTitleUI' |
| 8 | import { MessageListItemUI } from './MessageListItemUI' | 8 | import { MessageListItemUI } from './MessageListItemUI' |
| 9 | import {TrackingButton,TrackConstants}from 'wdTracking/Index' | 9 | import {TrackingButton,TrackConstants}from 'wdTracking/Index' |
| 10 | -import TrackingPageBrowseUtils from '../../../utils/TrackingPageBrowseUtils' | ||
| 11 | 10 | ||
| 12 | const TAG = "MessageListUI" | 11 | const TAG = "MessageListUI" |
| 13 | 12 |
| @@ -57,33 +57,40 @@ export struct SubscribeMessageComponent{ | @@ -57,33 +57,40 @@ export struct SubscribeMessageComponent{ | ||
| 57 | } | 57 | } |
| 58 | } | 58 | } |
| 59 | } else { | 59 | } else { |
| 60 | - CustomPullToRefresh({ | ||
| 61 | - alldata:this.data, | ||
| 62 | - scroller:this.scroller, | ||
| 63 | - customList:()=>{ | ||
| 64 | - this.ListLayout() | ||
| 65 | - }, | ||
| 66 | - onRefresh:(resolve)=>{ | ||
| 67 | - this.curPageNum = 1; | ||
| 68 | - this.hasMore = true | ||
| 69 | - this.isGetRequest = false | ||
| 70 | - this.data.clear() | ||
| 71 | - if (!this.isLoading) { | ||
| 72 | - this.getNewPageData() | ||
| 73 | - } | ||
| 74 | - if(resolve) resolve('刷新成功') | ||
| 75 | - }, | ||
| 76 | - onLoadMore:(resolve)=> { | ||
| 77 | - if (!this.isLoading) { | ||
| 78 | - //加载分页数据 | ||
| 79 | - this.getNewPageData() | 60 | + Stack(){ |
| 61 | + Row() | ||
| 62 | + .width("100%") | ||
| 63 | + .height("100%") | ||
| 64 | + .backgroundColor($r('app.color.color_F9F9F9')) | ||
| 65 | + | ||
| 66 | + CustomPullToRefresh({ | ||
| 67 | + alldata:this.data, | ||
| 68 | + scroller:this.scroller, | ||
| 69 | + customList:()=>{ | ||
| 70 | + this.ListLayout() | ||
| 71 | + }, | ||
| 72 | + onRefresh:(resolve)=>{ | ||
| 73 | + this.curPageNum = 1; | ||
| 74 | + this.hasMore = true | ||
| 75 | + this.isGetRequest = false | ||
| 76 | + this.data.clear() | ||
| 77 | + if (!this.isLoading) { | ||
| 78 | + this.getNewPageData() | ||
| 79 | + } | ||
| 80 | + if(resolve) resolve('刷新成功') | ||
| 81 | + }, | ||
| 82 | + onLoadMore:(resolve)=> { | ||
| 83 | + if (!this.isLoading) { | ||
| 84 | + //加载分页数据 | ||
| 85 | + this.getNewPageData() | ||
| 86 | + } | ||
| 80 | } | 87 | } |
| 81 | - } | ||
| 82 | - }) | ||
| 83 | - .width('100%') | 88 | + }) |
| 89 | + .width('100%') | ||
| 90 | + } | ||
| 84 | } | 91 | } |
| 85 | } | 92 | } |
| 86 | - .backgroundColor($r('app.color.color_F9F9F9')) | 93 | + .backgroundColor($r('app.color.color_transparent')) |
| 87 | .height('100%') | 94 | .height('100%') |
| 88 | .width('100%') | 95 | .width('100%') |
| 89 | } | 96 | } |
| @@ -9,6 +9,9 @@ const TAG = "AppointmentListPage" | @@ -9,6 +9,9 @@ const TAG = "AppointmentListPage" | ||
| 9 | struct AppointmentListPage { | 9 | struct AppointmentListPage { |
| 10 | pageShowTime:number = 0; | 10 | pageShowTime:number = 0; |
| 11 | pageHideTime:number = 0; | 11 | pageHideTime:number = 0; |
| 12 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 13 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 14 | + | ||
| 12 | 15 | ||
| 13 | onPageShow() { | 16 | onPageShow() { |
| 14 | this.pageShowTime = DateTimeUtils.getTimeStamp() | 17 | this.pageShowTime = DateTimeUtils.getTimeStamp() |
| @@ -23,7 +26,12 @@ struct AppointmentListPage { | @@ -23,7 +26,12 @@ struct AppointmentListPage { | ||
| 23 | 26 | ||
| 24 | build() { | 27 | build() { |
| 25 | Column(){ | 28 | Column(){ |
| 26 | - AppointmentListUI() | ||
| 27 | - } | 29 | + Column(){ |
| 30 | + AppointmentListUI() | ||
| 31 | + } | ||
| 32 | + }.width("100%") | ||
| 33 | + .height("100%") | ||
| 34 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 35 | + | ||
| 28 | } | 36 | } |
| 29 | } | 37 | } |
| @@ -11,6 +11,8 @@ struct FollowListPage { | @@ -11,6 +11,8 @@ struct FollowListPage { | ||
| 11 | @State curIndex: string = '0'; | 11 | @State curIndex: string = '0'; |
| 12 | pageShowTime:number = 0; | 12 | pageShowTime:number = 0; |
| 13 | pageHideTime:number = 0; | 13 | pageHideTime:number = 0; |
| 14 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 15 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 14 | 16 | ||
| 15 | onPageShow() { | 17 | onPageShow() { |
| 16 | this.curIndex = this.params?.['index']; | 18 | this.curIndex = this.params?.['index']; |
| @@ -25,12 +27,16 @@ struct FollowListPage { | @@ -25,12 +27,16 @@ struct FollowListPage { | ||
| 25 | } | 27 | } |
| 26 | 28 | ||
| 27 | build() { | 29 | build() { |
| 28 | - Column() { | ||
| 29 | - //Tab 详情 | ||
| 30 | - FollowFirstTabsComponent({changeIndex:Number(this.curIndex)}) | ||
| 31 | - } | ||
| 32 | - .backgroundColor($r('app.color.white')) | ||
| 33 | - .height('100%') | ||
| 34 | - .width('100%') | 30 | + Column(){ |
| 31 | + Column() { | ||
| 32 | + //Tab 详情 | ||
| 33 | + FollowFirstTabsComponent({changeIndex:Number(this.curIndex)}) | ||
| 34 | + } | ||
| 35 | + .backgroundColor($r('app.color.white')) | ||
| 36 | + .height('100%') | ||
| 37 | + .width('100%') | ||
| 38 | + }.width("100%") | ||
| 39 | + .height("100%") | ||
| 40 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 35 | } | 41 | } |
| 36 | } | 42 | } |
| @@ -19,7 +19,6 @@ const TAG = 'MinePageComponent'; | @@ -19,7 +19,6 @@ const TAG = 'MinePageComponent'; | ||
| 19 | */ | 19 | */ |
| 20 | @Component | 20 | @Component |
| 21 | export struct MinePageComponent { | 21 | export struct MinePageComponent { |
| 22 | - private topRectHeight: string = AppStorage.get<number>('topSafeHeight') + 'px'; | ||
| 23 | //是否是创作者 | 22 | //是否是创作者 |
| 24 | @State isCreator:boolean = false | 23 | @State isCreator:boolean = false |
| 25 | @State isLogin:boolean = false //默认 false 测试放开 | 24 | @State isLogin:boolean = false //默认 false 测试放开 |
| @@ -63,6 +62,8 @@ export struct MinePageComponent { | @@ -63,6 +62,8 @@ export struct MinePageComponent { | ||
| 63 | @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; | 62 | @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; |
| 64 | private breakpointSystem = new BreakpointSystem(); | 63 | private breakpointSystem = new BreakpointSystem(); |
| 65 | @State percent:number = 1 | 64 | @State percent:number = 1 |
| 65 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 66 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 66 | 67 | ||
| 67 | currentChanged(){ | 68 | currentChanged(){ |
| 68 | if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){ | 69 | if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){ |
| @@ -154,22 +155,25 @@ export struct MinePageComponent { | @@ -154,22 +155,25 @@ export struct MinePageComponent { | ||
| 154 | } | 155 | } |
| 155 | 156 | ||
| 156 | build() { | 157 | build() { |
| 157 | - Scroll(this.scroller){ | ||
| 158 | - Stack(){ | ||
| 159 | - Image($r('app.media.mine_head_bg')) | ||
| 160 | - .width('100%') | ||
| 161 | - .height(`${657 * this.percent}lpx`) | ||
| 162 | - .objectFit(ImageFit.Auto) | ||
| 163 | - this.MinePageUI() | 158 | + Column(){ |
| 159 | + Scroll(this.scroller){ | ||
| 160 | + Stack(){ | ||
| 161 | + Image($r('app.media.mine_head_bg')) | ||
| 162 | + .width('100%') | ||
| 163 | + .height(`${657 * this.percent}lpx`) | ||
| 164 | + .objectFit(ImageFit.Auto) | ||
| 165 | + this.MinePageUI() | ||
| 166 | + } | ||
| 167 | + .alignContent(Alignment.Top) | ||
| 164 | } | 168 | } |
| 165 | - .alignContent(Alignment.Top) | ||
| 166 | - } | ||
| 167 | - .setFullWidthAndHeight() | ||
| 168 | - .backgroundColor($r('app.color.color_F9F9F9')) | ||
| 169 | - .scrollable(ScrollDirection.Vertical) | ||
| 170 | - .scrollBar(BarState.Off) | ||
| 171 | - // 预留状态栏、导航栏高度 | ||
| 172 | - .margin({ top: this.topRectHeight}) | 169 | + .setFullWidthAndHeight() |
| 170 | + .backgroundColor($r('app.color.color_F9F9F9')) | ||
| 171 | + .scrollable(ScrollDirection.Vertical) | ||
| 172 | + .scrollBar(BarState.Off) | ||
| 173 | + | ||
| 174 | + }.width("100%") | ||
| 175 | + .height("100%") | ||
| 176 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 173 | } | 177 | } |
| 174 | 178 | ||
| 175 | 179 |
| @@ -22,6 +22,8 @@ export struct PrivacySettingPage { | @@ -22,6 +22,8 @@ export struct PrivacySettingPage { | ||
| 22 | @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; | 22 | @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; |
| 23 | private breakpointSystem = new BreakpointSystem(); | 23 | private breakpointSystem = new BreakpointSystem(); |
| 24 | @State percent:number = 1 | 24 | @State percent:number = 1 |
| 25 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 26 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 25 | 27 | ||
| 26 | currentChanged(){ | 28 | currentChanged(){ |
| 27 | if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){ | 29 | if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){ |
| @@ -76,13 +78,17 @@ export struct PrivacySettingPage { | @@ -76,13 +78,17 @@ export struct PrivacySettingPage { | ||
| 76 | 78 | ||
| 77 | build() { | 79 | build() { |
| 78 | Column(){ | 80 | Column(){ |
| 79 | - TitleBackComponent({title:"隐私设置"}) | ||
| 80 | - | ||
| 81 | - //滑动区域 | ||
| 82 | - this.PrivacySettingComponentsUI() | ||
| 83 | - }.backgroundColor('#F8F8F8') | ||
| 84 | - .width("100%") | 81 | + Column(){ |
| 82 | + TitleBackComponent({title:"隐私设置"}) | ||
| 83 | + | ||
| 84 | + //滑动区域 | ||
| 85 | + this.PrivacySettingComponentsUI() | ||
| 86 | + }.backgroundColor('#F8F8F8') | ||
| 87 | + .width("100%") | ||
| 88 | + .height("100%") | ||
| 89 | + }.width("100%") | ||
| 85 | .height("100%") | 90 | .height("100%") |
| 91 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 86 | 92 | ||
| 87 | } | 93 | } |
| 88 | 94 |
| @@ -7,6 +7,8 @@ import { AboutPageUI } from '../setting/AboutPageUI'; | @@ -7,6 +7,8 @@ import { AboutPageUI } from '../setting/AboutPageUI'; | ||
| 7 | struct SettingAboutPage { | 7 | struct SettingAboutPage { |
| 8 | pageShowTime:number = 0; | 8 | pageShowTime:number = 0; |
| 9 | pageHideTime:number = 0; | 9 | pageHideTime:number = 0; |
| 10 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 11 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 10 | 12 | ||
| 11 | onPageShow() { | 13 | onPageShow() { |
| 12 | this.pageShowTime = DateTimeUtils.getTimeStamp() | 14 | this.pageShowTime = DateTimeUtils.getTimeStamp() |
| @@ -22,7 +24,12 @@ struct SettingAboutPage { | @@ -22,7 +24,12 @@ struct SettingAboutPage { | ||
| 22 | 24 | ||
| 23 | build() { | 25 | build() { |
| 24 | Column(){ | 26 | Column(){ |
| 25 | - AboutPageUI() | ||
| 26 | - }.backgroundColor($r('app.color.white')) | 27 | + Column(){ |
| 28 | + AboutPageUI() | ||
| 29 | + }.backgroundColor($r('app.color.white')) | ||
| 30 | + }.width("100%") | ||
| 31 | + .height("100%") | ||
| 32 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 33 | + | ||
| 27 | } | 34 | } |
| 28 | } | 35 | } |
| @@ -16,6 +16,8 @@ struct SettingPage { | @@ -16,6 +16,8 @@ struct SettingPage { | ||
| 16 | 16 | ||
| 17 | pageShowSettingTime:number = 0; | 17 | pageShowSettingTime:number = 0; |
| 18 | pageHideSettingTime:number = 0; | 18 | pageHideSettingTime:number = 0; |
| 19 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 20 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 19 | 21 | ||
| 20 | 22 | ||
| 21 | onPageShow() { | 23 | onPageShow() { |
| @@ -44,14 +46,19 @@ struct SettingPage { | @@ -44,14 +46,19 @@ struct SettingPage { | ||
| 44 | } | 46 | } |
| 45 | 47 | ||
| 46 | build() { | 48 | build() { |
| 47 | - Column() { | ||
| 48 | - if (this.pageType == 'mainSetting') { | ||
| 49 | - MineSettingComponent() | ||
| 50 | - } else { | ||
| 51 | - AccountAndSecurityLayout({enterActivityTime:this.enterActivityTime}) | ||
| 52 | - } | ||
| 53 | - }.setFullWidth() | ||
| 54 | - .backgroundColor($r("app.color.white")) | 49 | + Column(){ |
| 50 | + Column() { | ||
| 51 | + if (this.pageType == 'mainSetting') { | ||
| 52 | + MineSettingComponent() | ||
| 53 | + } else { | ||
| 54 | + AccountAndSecurityLayout({enterActivityTime:this.enterActivityTime}) | ||
| 55 | + } | ||
| 56 | + }.setFullWidth() | ||
| 57 | + .backgroundColor($r("app.color.white")) | ||
| 58 | + }.width("100%") | ||
| 59 | + .height("100%") | ||
| 60 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 61 | + | ||
| 55 | } | 62 | } |
| 56 | 63 | ||
| 57 | // 私有方法 | 64 | // 私有方法 |
| @@ -4,6 +4,8 @@ import TrackingPageBrowseUtils from '../utils/TrackingPageBrowseUtils' | @@ -4,6 +4,8 @@ import TrackingPageBrowseUtils from '../utils/TrackingPageBrowseUtils' | ||
| 4 | @Entry | 4 | @Entry |
| 5 | @Component | 5 | @Component |
| 6 | struct MineMessagePage { | 6 | struct MineMessagePage { |
| 7 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 8 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 7 | 9 | ||
| 8 | onPageShow(): void { | 10 | onPageShow(): void { |
| 9 | TrackingPageBrowseUtils.TrackingPageBrowseExposureStart() | 11 | TrackingPageBrowseUtils.TrackingPageBrowseExposureStart() |
| @@ -15,7 +17,12 @@ struct MineMessagePage { | @@ -15,7 +17,12 @@ struct MineMessagePage { | ||
| 15 | 17 | ||
| 16 | build() { | 18 | build() { |
| 17 | Column(){ | 19 | Column(){ |
| 18 | - MessageListUI() | ||
| 19 | - } | 20 | + Column(){ |
| 21 | + MessageListUI() | ||
| 22 | + } | ||
| 23 | + }.width("100%") | ||
| 24 | + .height("100%") | ||
| 25 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 26 | + | ||
| 20 | } | 27 | } |
| 21 | } | 28 | } |
| @@ -10,6 +10,8 @@ struct SearchPage { | @@ -10,6 +10,8 @@ struct SearchPage { | ||
| 10 | @State fromTabName: string = 'NEWS'; | 10 | @State fromTabName: string = 'NEWS'; |
| 11 | pageShowTime:number = 0; | 11 | pageShowTime:number = 0; |
| 12 | pageHideTime:number = 0; | 12 | pageHideTime:number = 0; |
| 13 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 14 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 13 | 15 | ||
| 14 | onPageShow() { | 16 | onPageShow() { |
| 15 | this.fromTabName = this.params?.['tabName']; | 17 | this.fromTabName = this.params?.['tabName']; |
| @@ -25,9 +27,13 @@ struct SearchPage { | @@ -25,9 +27,13 @@ struct SearchPage { | ||
| 25 | 27 | ||
| 26 | build() { | 28 | build() { |
| 27 | Column(){ | 29 | Column(){ |
| 28 | - SearchComponent({fromTabName:$fromTabName}) | ||
| 29 | - }.height('100%') | ||
| 30 | - .width('100%') | ||
| 31 | - .backgroundColor($r('app.color.white')) | 30 | + Column(){ |
| 31 | + SearchComponent({fromTabName:$fromTabName}) | ||
| 32 | + }.height('100%') | ||
| 33 | + .width('100%') | ||
| 34 | + .backgroundColor($r('app.color.white')) | ||
| 35 | + }.width("100%") | ||
| 36 | + .height("100%") | ||
| 37 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 32 | } | 38 | } |
| 33 | } | 39 | } |
| @@ -5,11 +5,19 @@ const TAG = "SubscribeMessagePage" | @@ -5,11 +5,19 @@ const TAG = "SubscribeMessagePage" | ||
| 5 | @Entry | 5 | @Entry |
| 6 | @Component | 6 | @Component |
| 7 | struct SubscribeMessagePage { | 7 | struct SubscribeMessagePage { |
| 8 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 9 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 10 | + | ||
| 8 | 11 | ||
| 9 | build() { | 12 | build() { |
| 10 | Column(){ | 13 | Column(){ |
| 11 | - SubscribeMessageComponent() | ||
| 12 | - }.height("100%") | ||
| 13 | - .width("100%") | 14 | + Column(){ |
| 15 | + SubscribeMessageComponent() | ||
| 16 | + }.height("100%") | ||
| 17 | + .width("100%") | ||
| 18 | + }.width("100%") | ||
| 19 | + .height("100%") | ||
| 20 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 21 | + | ||
| 14 | } | 22 | } |
| 15 | } | 23 | } |
-
Please register or login to post a comment