liyubing

feat:1)内链 页面,添加距顶部距底部间距

... ... @@ -104,7 +104,7 @@ export class ContentDTO implements BaseDTO {
//底部导航栏 id(用于频道跳转)
bottomNavId: string = '';
// 链接类型: 0:无链接;1:内链(文章);2:外链
openType: string = '';
openType: string = '1';
extra: string = ''
sameContentList:ContentDTO[] = []
sameContentListJson:string = ""
... ...
... ... @@ -9,6 +9,8 @@ const TAG = 'DefaultWebPage'
@Entry
@Component
struct DefaultWebPage {
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
webviewControl: BridgeWebViewControl = new BridgeWebViewControl()
scroller: Scroller = new Scroller();
action: Action = {} as Action
... ... @@ -27,7 +29,7 @@ struct DefaultWebPage {
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
Row() {
Button({type: ButtonType.Normal}) {
Button({ type: ButtonType.Normal }) {
Image($r("app.media.back_icon_black"))
.width(20).height(25)
}.height(44).width(44)
... ... @@ -35,13 +37,17 @@ struct DefaultWebPage {
.onClick(() => {
router.back()
})
Blank()
}.width("100%").height(44)
.alignItems(VerticalAlign.Center)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
}
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.height(CommonConstants.FULL_HEIGHT).padding({
top: px2vp(this.topSafeHeight),
bottom: px2vp(this.bottomSafeHeight)
})
}
aboutToAppear() {
... ...