Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
17 changed files
with
74 additions
and
15 deletions
| @@ -281,6 +281,8 @@ struct createImg { | @@ -281,6 +281,8 @@ struct createImg { | ||
| 281 | .backgroundColor(0xf5f5f5) | 281 | .backgroundColor(0xf5f5f5) |
| 282 | .aspectRatio(1) | 282 | .aspectRatio(1) |
| 283 | .borderRadius(this.caclImageRadius(index)) | 283 | .borderRadius(this.caclImageRadius(index)) |
| 284 | + .width('100%') | ||
| 285 | + .autoResize(true) | ||
| 284 | if (this.getPicType(item.weight, item.height) !== 3) { | 286 | if (this.getPicType(item.weight, item.height) !== 3) { |
| 285 | Flex({ direction: FlexDirection.Row }) { | 287 | Flex({ direction: FlexDirection.Row }) { |
| 286 | Image($r('app.media.icon_long_pic')) | 288 | Image($r('app.media.icon_long_pic')) |
| @@ -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,6 +57,12 @@ export struct SubscribeMessageComponent{ | @@ -57,6 +57,12 @@ export struct SubscribeMessageComponent{ | ||
| 57 | } | 57 | } |
| 58 | } | 58 | } |
| 59 | } else { | 59 | } else { |
| 60 | + Stack(){ | ||
| 61 | + Row() | ||
| 62 | + .width("100%") | ||
| 63 | + .height("100%") | ||
| 64 | + .backgroundColor($r('app.color.color_F9F9F9')) | ||
| 65 | + | ||
| 60 | CustomPullToRefresh({ | 66 | CustomPullToRefresh({ |
| 61 | alldata:this.data, | 67 | alldata:this.data, |
| 62 | scroller:this.scroller, | 68 | scroller:this.scroller, |
| @@ -83,7 +89,8 @@ export struct SubscribeMessageComponent{ | @@ -83,7 +89,8 @@ export struct SubscribeMessageComponent{ | ||
| 83 | .width('100%') | 89 | .width('100%') |
| 84 | } | 90 | } |
| 85 | } | 91 | } |
| 86 | - .backgroundColor($r('app.color.color_F9F9F9')) | 92 | + } |
| 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(){ |
| 29 | + Column(){ | ||
| 26 | AppointmentListUI() | 30 | AppointmentListUI() |
| 27 | } | 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,6 +27,7 @@ struct FollowListPage { | @@ -25,6 +27,7 @@ struct FollowListPage { | ||
| 25 | } | 27 | } |
| 26 | 28 | ||
| 27 | build() { | 29 | build() { |
| 30 | + Column(){ | ||
| 28 | Column() { | 31 | Column() { |
| 29 | //Tab 详情 | 32 | //Tab 详情 |
| 30 | FollowFirstTabsComponent({changeIndex:Number(this.curIndex)}) | 33 | FollowFirstTabsComponent({changeIndex:Number(this.curIndex)}) |
| @@ -32,5 +35,8 @@ struct FollowListPage { | @@ -32,5 +35,8 @@ struct FollowListPage { | ||
| 32 | .backgroundColor($r('app.color.white')) | 35 | .backgroundColor($r('app.color.white')) |
| 33 | .height('100%') | 36 | .height('100%') |
| 34 | .width('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,6 +155,7 @@ export struct MinePageComponent { | @@ -154,6 +155,7 @@ export struct MinePageComponent { | ||
| 154 | } | 155 | } |
| 155 | 156 | ||
| 156 | build() { | 157 | build() { |
| 158 | + Column(){ | ||
| 157 | Scroll(this.scroller){ | 159 | Scroll(this.scroller){ |
| 158 | Stack(){ | 160 | Stack(){ |
| 159 | Image($r('app.media.mine_head_bg')) | 161 | Image($r('app.media.mine_head_bg')) |
| @@ -168,8 +170,10 @@ export struct MinePageComponent { | @@ -168,8 +170,10 @@ export struct MinePageComponent { | ||
| 168 | .backgroundColor($r('app.color.color_F9F9F9')) | 170 | .backgroundColor($r('app.color.color_F9F9F9')) |
| 169 | .scrollable(ScrollDirection.Vertical) | 171 | .scrollable(ScrollDirection.Vertical) |
| 170 | .scrollBar(BarState.Off) | 172 | .scrollBar(BarState.Off) |
| 171 | - // 预留状态栏、导航栏高度 | ||
| 172 | - .margin({ top: this.topRectHeight}) | 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,6 +78,7 @@ export struct PrivacySettingPage { | @@ -76,6 +78,7 @@ export struct PrivacySettingPage { | ||
| 76 | 78 | ||
| 77 | build() { | 79 | build() { |
| 78 | Column(){ | 80 | Column(){ |
| 81 | + Column(){ | ||
| 79 | TitleBackComponent({title:"隐私设置"}) | 82 | TitleBackComponent({title:"隐私设置"}) |
| 80 | 83 | ||
| 81 | //滑动区域 | 84 | //滑动区域 |
| @@ -83,6 +86,9 @@ export struct PrivacySettingPage { | @@ -83,6 +86,9 @@ export struct PrivacySettingPage { | ||
| 83 | }.backgroundColor('#F8F8F8') | 86 | }.backgroundColor('#F8F8F8') |
| 84 | .width("100%") | 87 | .width("100%") |
| 85 | .height("100%") | 88 | .height("100%") |
| 89 | + }.width("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(){ |
| 27 | + Column(){ | ||
| 25 | AboutPageUI() | 28 | AboutPageUI() |
| 26 | }.backgroundColor($r('app.color.white')) | 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,6 +46,7 @@ struct SettingPage { | @@ -44,6 +46,7 @@ struct SettingPage { | ||
| 44 | } | 46 | } |
| 45 | 47 | ||
| 46 | build() { | 48 | build() { |
| 49 | + Column(){ | ||
| 47 | Column() { | 50 | Column() { |
| 48 | if (this.pageType == 'mainSetting') { | 51 | if (this.pageType == 'mainSetting') { |
| 49 | MineSettingComponent() | 52 | MineSettingComponent() |
| @@ -52,6 +55,10 @@ struct SettingPage { | @@ -52,6 +55,10 @@ struct SettingPage { | ||
| 52 | } | 55 | } |
| 53 | }.setFullWidth() | 56 | }.setFullWidth() |
| 54 | .backgroundColor($r("app.color.white")) | 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(){ |
| 20 | + Column(){ | ||
| 18 | MessageListUI() | 21 | MessageListUI() |
| 19 | } | 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(){ |
| 30 | + Column(){ | ||
| 28 | SearchComponent({fromTabName:$fromTabName}) | 31 | SearchComponent({fromTabName:$fromTabName}) |
| 29 | }.height('100%') | 32 | }.height('100%') |
| 30 | .width('100%') | 33 | .width('100%') |
| 31 | .backgroundColor($r('app.color.white')) | 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(){ |
| 14 | + Column(){ | ||
| 11 | SubscribeMessageComponent() | 15 | SubscribeMessageComponent() |
| 12 | }.height("100%") | 16 | }.height("100%") |
| 13 | .width("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