Showing
1 changed file
with
8 additions
and
8 deletions
| @@ -61,6 +61,7 @@ export struct ImageAndTextPageComponent { | @@ -61,6 +61,7 @@ export struct ImageAndTextPageComponent { | ||
| 61 | @State likeNum: number = 0 | 61 | @State likeNum: number = 0 |
| 62 | @State reachEndIncreament: number = 0 | 62 | @State reachEndIncreament: number = 0 |
| 63 | @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | 63 | @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 |
| 64 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 64 | @State isScrollTop: boolean = true | 65 | @State isScrollTop: boolean = true |
| 65 | @State offsetY: number = 0 | 66 | @State offsetY: number = 0 |
| 66 | pageShowTime:number = 0; | 67 | pageShowTime:number = 0; |
| @@ -88,7 +89,7 @@ export struct ImageAndTextPageComponent { | @@ -88,7 +89,7 @@ export struct ImageAndTextPageComponent { | ||
| 88 | action: this.action, | 89 | action: this.action, |
| 89 | isPageEnd: $isPageEnd | 90 | isPageEnd: $isPageEnd |
| 90 | }) | 91 | }) |
| 91 | - .padding({ top: 15, bottom: 10 }) | 92 | + .padding({ bottom: 10 }) |
| 92 | Column() { | 93 | Column() { |
| 93 | // 点赞 | 94 | // 点赞 |
| 94 | if (this.contentDetailData?.openLikes && this.contentDetailData?.likesStyle !== 4) { | 95 | if (this.contentDetailData?.openLikes && this.contentDetailData?.likesStyle !== 4) { |
| @@ -159,8 +160,8 @@ export struct ImageAndTextPageComponent { | @@ -159,8 +160,8 @@ export struct ImageAndTextPageComponent { | ||
| 159 | } | 160 | } |
| 160 | .id('imgTextContainer') | 161 | .id('imgTextContainer') |
| 161 | } | 162 | } |
| 163 | + .padding({bottom: 44}) | ||
| 162 | .width(CommonConstants.FULL_WIDTH) | 164 | .width(CommonConstants.FULL_WIDTH) |
| 163 | - .height(CommonConstants.FULL_HEIGHT) | ||
| 164 | .scrollBar(BarState.Off) | 165 | .scrollBar(BarState.Off) |
| 165 | .align(Alignment.Top) | 166 | .align(Alignment.Top) |
| 166 | .onReachEnd(() => { | 167 | .onReachEnd(() => { |
| @@ -174,10 +175,10 @@ export struct ImageAndTextPageComponent { | @@ -174,10 +175,10 @@ export struct ImageAndTextPageComponent { | ||
| 174 | retry: () => { | 175 | retry: () => { |
| 175 | this.getDetail() | 176 | this.getDetail() |
| 176 | } | 177 | } |
| 177 | - }).padding({ bottom: 200 }) | 178 | + }).padding({ bottom: 44 }) |
| 178 | } else { | 179 | } else { |
| 179 | if (!this.isPageEnd) { | 180 | if (!this.isPageEnd) { |
| 180 | - detailedSkeleton().padding({ bottom: this.bottomSafeHeight }) | 181 | + detailedSkeleton().padding({ bottom: 44 }) |
| 181 | } | 182 | } |
| 182 | } | 183 | } |
| 183 | // 底部交互区 | 184 | // 底部交互区 |
| @@ -206,12 +207,10 @@ export struct ImageAndTextPageComponent { | @@ -206,12 +207,10 @@ export struct ImageAndTextPageComponent { | ||
| 206 | this.isScrollTop = !this.isScrollTop | 207 | this.isScrollTop = !this.isScrollTop |
| 207 | } | 208 | } |
| 208 | }) | 209 | }) |
| 209 | - .position({ y: '100%' }) | ||
| 210 | } | 210 | } |
| 211 | + .margin({top: `${this.topSafeHeight}px`, bottom: `${this.bottomSafeHeight}px`}) | ||
| 211 | .width(CommonConstants.FULL_WIDTH) | 212 | .width(CommonConstants.FULL_WIDTH) |
| 212 | - .height(CommonConstants.FULL_HEIGHT) | ||
| 213 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 214 | - .padding({ top: 38 }) | 213 | + // .height(CommonConstants.FULL_HEIGHT) |
| 215 | 214 | ||
| 216 | // 发布时间 | 215 | // 发布时间 |
| 217 | Column() { | 216 | Column() { |
| @@ -242,6 +241,7 @@ export struct ImageAndTextPageComponent { | @@ -242,6 +241,7 @@ export struct ImageAndTextPageComponent { | ||
| 242 | .backgroundColor(Color.White) | 241 | .backgroundColor(Color.White) |
| 243 | }.backgroundColor(Color.White) | 242 | }.backgroundColor(Color.White) |
| 244 | } | 243 | } |
| 244 | + .margin({top: `${this.topSafeHeight}px`, bottom: `${this.bottomSafeHeight}px`}) | ||
| 245 | .width(CommonConstants.FULL_WIDTH) | 245 | .width(CommonConstants.FULL_WIDTH) |
| 246 | .height(CommonConstants.FULL_HEIGHT) | 246 | .height(CommonConstants.FULL_HEIGHT) |
| 247 | .backgroundColor(Color.White) | 247 | .backgroundColor(Color.White) |
-
Please register or login to post a comment