Showing
23 changed files
with
86 additions
and
34 deletions
| 1 | import { CompStyle } from 'wdConstant'; | 1 | import { CompStyle } from 'wdConstant'; |
| 2 | import { CompDTO, ContentDTO } from 'wdBean'; | 2 | import { CompDTO, ContentDTO } from 'wdBean'; |
| 3 | import { Card2Component } from './cardview/Card2Component'; | 3 | import { Card2Component } from './cardview/Card2Component'; |
| 4 | -import { Card3Component } from './cardview/Card3Component'; | 4 | +// import { Card3Component } from './cardview/Card3Component'; |
| 5 | import { Card4Component } from './cardview/Card4Component'; | 5 | import { Card4Component } from './cardview/Card4Component'; |
| 6 | import { Card5Component } from './cardview/Card5Component'; | 6 | import { Card5Component } from './cardview/Card5Component'; |
| 7 | import { Card6Component } from './cardview/Card6Component'; | 7 | import { Card6Component } from './cardview/Card6Component'; |
| @@ -60,8 +60,6 @@ export struct CardParser { | @@ -60,8 +60,6 @@ export struct CardParser { | ||
| 60 | } else { | 60 | } else { |
| 61 | if (contentDTO.appStyle === CompStyle.Card_02) { | 61 | if (contentDTO.appStyle === CompStyle.Card_02) { |
| 62 | Card2Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) | 62 | Card2Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) |
| 63 | - } else if (contentDTO.appStyle === CompStyle.Card_03) { | ||
| 64 | - Card3Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) | ||
| 65 | } else if (contentDTO.appStyle === CompStyle.Card_04) { | 63 | } else if (contentDTO.appStyle === CompStyle.Card_04) { |
| 66 | Card4Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) | 64 | Card4Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) |
| 67 | } else if (contentDTO.appStyle === CompStyle.Card_05) { | 65 | } else if (contentDTO.appStyle === CompStyle.Card_05) { |
| @@ -4,6 +4,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | @@ -4,6 +4,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | ||
| 4 | import PageModel from '../viewmodel/PageModel'; | 4 | import PageModel from '../viewmodel/PageModel'; |
| 5 | import { CardParser } from './CardParser'; | 5 | import { CardParser } from './CardParser'; |
| 6 | import { Card2Component } from './cardview/Card2Component'; | 6 | import { Card2Component } from './cardview/Card2Component'; |
| 7 | +import { Card3Component } from './cardview/Card3Component'; | ||
| 7 | import { Card9Component } from './cardview/Card9Component'; | 8 | import { Card9Component } from './cardview/Card9Component'; |
| 8 | import { Card6Component } from './cardview/Card6Component'; | 9 | import { Card6Component } from './cardview/Card6Component'; |
| 9 | import { Card5Component } from './cardview/Card5Component'; | 10 | import { Card5Component } from './cardview/Card5Component'; |
| @@ -72,7 +73,7 @@ export struct CompParser { | @@ -72,7 +73,7 @@ export struct CompParser { | ||
| 72 | 73 | ||
| 73 | build() { | 74 | build() { |
| 74 | Column() { | 75 | Column() { |
| 75 | - // Text(JSON.stringify(this.compDTO.compStyle)) | 76 | + //Text(JSON.stringify(this.compDTO.compStyle)) |
| 76 | this.componentBuilder(); | 77 | this.componentBuilder(); |
| 77 | } | 78 | } |
| 78 | } | 79 | } |
| @@ -142,11 +143,13 @@ export struct CompParser { | @@ -142,11 +143,13 @@ export struct CompParser { | ||
| 142 | //时间链卡 | 143 | //时间链卡 |
| 143 | Card9Component({ compDTO: this.compDTO, contentDTO:this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | 144 | Card9Component({ compDTO: this.compDTO, contentDTO:this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) |
| 144 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 145 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 145 | - } else if(this.compDTO.compStyle === CompStyle | ||
| 146 | - .Card_13){ | 146 | + } else if(this.compDTO.compStyle === CompStyle.Card_13){ |
| 147 | Card6Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | 147 | Card6Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) |
| 148 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 148 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 149 | - } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { | 149 | + } else if(this.compDTO.compStyle === CompStyle.Card_03){ |
| 150 | + Card3Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | ||
| 151 | + Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | ||
| 152 | + }else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { | ||
| 150 | ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 153 | ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 151 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 154 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 152 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { | 155 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { |
| @@ -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 |
| @@ -70,7 +70,6 @@ struct PeopleShipHomePage { | @@ -70,7 +70,6 @@ struct PeopleShipHomePage { | ||
| 70 | .objectRepeat(ImageRepeat.NoRepeat) | 70 | .objectRepeat(ImageRepeat.NoRepeat) |
| 71 | .backgroundColor(Color.White) | 71 | .backgroundColor(Color.White) |
| 72 | .visibility(this.isLoading ? Visibility.None : Visibility.Visible) | 72 | .visibility(this.isLoading ? Visibility.None : Visibility.Visible) |
| 73 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 74 | 73 | ||
| 75 | Row() | 74 | Row() |
| 76 | .height(px2vp(this.topSafeHeight)) | 75 | .height(px2vp(this.topSafeHeight)) |
| @@ -78,7 +77,6 @@ struct PeopleShipHomePage { | @@ -78,7 +77,6 @@ struct PeopleShipHomePage { | ||
| 78 | .backgroundColor($r('app.color.white')) | 77 | .backgroundColor($r('app.color.white')) |
| 79 | .visibility(this.topOpacity > 0 ? Visibility.Visible : Visibility.None) | 78 | .visibility(this.topOpacity > 0 ? Visibility.Visible : Visibility.None) |
| 80 | .opacity(this.topOpacity ) | 79 | .opacity(this.topOpacity ) |
| 81 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 82 | } | 80 | } |
| 83 | 81 | ||
| 84 | Column(){ | 82 | Column(){ |
| @@ -141,10 +139,10 @@ struct PeopleShipHomePage { | @@ -141,10 +139,10 @@ struct PeopleShipHomePage { | ||
| 141 | }) | 139 | }) |
| 142 | } | 140 | } |
| 143 | } | 141 | } |
| 144 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 145 | .alignItems(HorizontalAlign.Start) | 142 | .alignItems(HorizontalAlign.Start) |
| 146 | .justifyContent(FlexAlign.Start) | 143 | .justifyContent(FlexAlign.Start) |
| 147 | .width('100%') | 144 | .width('100%') |
| 145 | + .margin({top:px2vp(this.topSafeHeight)}) | ||
| 148 | } | 146 | } |
| 149 | .width('100%') | 147 | .width('100%') |
| 150 | }else{ | 148 | }else{ |
| @@ -165,7 +163,6 @@ struct PeopleShipHomePage { | @@ -165,7 +163,6 @@ struct PeopleShipHomePage { | ||
| 165 | } | 163 | } |
| 166 | 164 | ||
| 167 | aboutToAppear() { | 165 | aboutToAppear() { |
| 168 | - WindowModel.shared.setWindowLayoutFullScreen(false) | ||
| 169 | this.getData() | 166 | this.getData() |
| 170 | } | 167 | } |
| 171 | 168 |
| @@ -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 | // 私有方法 |
| @@ -38,6 +38,7 @@ struct MineHomePage { | @@ -38,6 +38,7 @@ struct MineHomePage { | ||
| 38 | @State isCommentEnter:string = ""; | 38 | @State isCommentEnter:string = ""; |
| 39 | @State isConnectNetwork : boolean = NetworkUtil.isNetConnected() | 39 | @State isConnectNetwork : boolean = NetworkUtil.isNetConnected() |
| 40 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | 40 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 |
| 41 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 41 | pageShowTime:number = 0; | 42 | pageShowTime:number = 0; |
| 42 | pageHideTime:number = 0; | 43 | pageHideTime:number = 0; |
| 43 | 44 | ||
| @@ -69,7 +70,6 @@ struct MineHomePage { | @@ -69,7 +70,6 @@ struct MineHomePage { | ||
| 69 | .width('100%') | 70 | .width('100%') |
| 70 | .height('355lpx') | 71 | .height('355lpx') |
| 71 | .objectFit(ImageFit.Cover) | 72 | .objectFit(ImageFit.Cover) |
| 72 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 73 | 73 | ||
| 74 | Row() | 74 | Row() |
| 75 | .height(px2vp(this.topSafeHeight)) | 75 | .height(px2vp(this.topSafeHeight)) |
| @@ -77,7 +77,6 @@ struct MineHomePage { | @@ -77,7 +77,6 @@ struct MineHomePage { | ||
| 77 | .backgroundColor($r('app.color.white')) | 77 | .backgroundColor($r('app.color.white')) |
| 78 | .visibility(this.tileOpacity > 0 ? 0 : 1) | 78 | .visibility(this.tileOpacity > 0 ? 0 : 1) |
| 79 | .opacity(this.tileOpacity ) | 79 | .opacity(this.tileOpacity ) |
| 80 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 81 | } | 80 | } |
| 82 | 81 | ||
| 83 | Column(){ | 82 | Column(){ |
| @@ -287,8 +286,10 @@ struct MineHomePage { | @@ -287,8 +286,10 @@ struct MineHomePage { | ||
| 287 | .scrollBar(BarState.Off) | 286 | .scrollBar(BarState.Off) |
| 288 | .width('100%') | 287 | .width('100%') |
| 289 | .layoutWeight(1) | 288 | .layoutWeight(1) |
| 290 | - }.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | 289 | + } |
| 290 | + .margin({top:px2vp(this.topSafeHeight)}) | ||
| 291 | }.width('100%') | 291 | }.width('100%') |
| 292 | + .padding({bottom:px2vp(this.bottomSafeHeight)}) | ||
| 292 | .layoutWeight(1) | 293 | .layoutWeight(1) |
| 293 | }else{ | 294 | }else{ |
| 294 | Column(){ | 295 | Column(){ |
| @@ -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 | } |
| @@ -140,7 +140,6 @@ export struct MultiPictureListPage { | @@ -140,7 +140,6 @@ export struct MultiPictureListPage { | ||
| 140 | .id('e_picture_container') | 140 | .id('e_picture_container') |
| 141 | // 设置顶部绘制延伸到状态栏 | 141 | // 设置顶部绘制延伸到状态栏 |
| 142 | // 设置底部绘制延伸到导航条 | 142 | // 设置底部绘制延伸到导航条 |
| 143 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 144 | } | 143 | } |
| 145 | 144 | ||
| 146 | /** | 145 | /** |
| @@ -70,7 +70,6 @@ struct OtherNormalUserHomePage { | @@ -70,7 +70,6 @@ struct OtherNormalUserHomePage { | ||
| 70 | .width('100%') | 70 | .width('100%') |
| 71 | .height('355lpx') | 71 | .height('355lpx') |
| 72 | .objectFit(ImageFit.Cover) | 72 | .objectFit(ImageFit.Cover) |
| 73 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 74 | 73 | ||
| 75 | Row() | 74 | Row() |
| 76 | .height(px2vp(this.topSafeHeight)) | 75 | .height(px2vp(this.topSafeHeight)) |
| @@ -78,7 +77,6 @@ struct OtherNormalUserHomePage { | @@ -78,7 +77,6 @@ struct OtherNormalUserHomePage { | ||
| 78 | .backgroundColor($r('app.color.white')) | 77 | .backgroundColor($r('app.color.white')) |
| 79 | .visibility(this.tileOpacity > 0 ? 0 : 1) | 78 | .visibility(this.tileOpacity > 0 ? 0 : 1) |
| 80 | .opacity(this.tileOpacity ) | 79 | .opacity(this.tileOpacity ) |
| 81 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 82 | } | 80 | } |
| 83 | 81 | ||
| 84 | Column(){ | 82 | Column(){ |
| @@ -254,7 +252,7 @@ struct OtherNormalUserHomePage { | @@ -254,7 +252,7 @@ struct OtherNormalUserHomePage { | ||
| 254 | .scrollBar(BarState.Off) | 252 | .scrollBar(BarState.Off) |
| 255 | .width('100%') | 253 | .width('100%') |
| 256 | .layoutWeight(1) | 254 | .layoutWeight(1) |
| 257 | - }.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | 255 | + } |
| 258 | }.width('100%') | 256 | }.width('100%') |
| 259 | .layoutWeight(1) | 257 | .layoutWeight(1) |
| 260 | }else{ | 258 | }else{ |
| @@ -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 | } |
| @@ -68,7 +68,6 @@ struct VisitorCommentPage { | @@ -68,7 +68,6 @@ struct VisitorCommentPage { | ||
| 68 | .width("100%") | 68 | .width("100%") |
| 69 | .height("100%") | 69 | .height("100%") |
| 70 | .backgroundColor($r('app.color.white')) | 70 | .backgroundColor($r('app.color.white')) |
| 71 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 72 | CustomPullToRefresh({ | 71 | CustomPullToRefresh({ |
| 73 | alldata:this.data, | 72 | alldata:this.data, |
| 74 | scroller:this.scroller, | 73 | scroller:this.scroller, |
-
Please register or login to post a comment