fix: 恢复 202608278 外层 nav-bar 结构(与当时可用版本一致)

对齐 flex:1 webview、nav-row 宽度与 padding-top 计算,非 cover 层方案。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-25 03:29:43 +08:00
co-authored by Cursor
parent 5667b9f49b
commit 445e20d562
+6 -4
View File
@@ -1,12 +1,13 @@
<template>
<!-- 顶栏在 web-view 外层页面级H5 只在下方 web-view -->
<view class="yxg-page">
<view class="yxg-nav-bar" :style="navBarStyle">
<view class="yxg-nav-row" :style="navRowStyle">
<image
class="yxg-nav-logo"
:style="logoStyle"
:src="YXG_MP_LOGO_URL"
mode="aspectFit"
:style="logoStyle"
/>
</view>
</view>
@@ -62,6 +63,7 @@ const navRowStyle = `height:${navBarH}px;`
const logoStyle = `width:${logoW}px;height:${logoH}px;`
const webviewStyle = `height:${webviewH}px;`
/** web-view 已在导航下方,H5 只需极小顶距 */
const h5Url = computed(
() =>
`${YXG_H5_BASE}?mp=1&nh=1&sbh=4&v=${YXG_H5_VERSION}#wechat_redirect`,
@@ -80,7 +82,7 @@ function onWebError(e) {
})
}
console.log('[yxg-magic] nav-bar + web-view', {
console.log('[yxg-magic] outer nav + webview', {
headH,
webviewH,
logoW,
@@ -101,7 +103,6 @@ page {
height: 100%;
display: flex;
flex-direction: column;
background-color: #ffd1c7;
}
.yxg-nav-bar {
@@ -115,6 +116,7 @@ page {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}
.yxg-nav-logo {
@@ -122,7 +124,7 @@ page {
}
.yxg-webview {
flex-shrink: 0;
flex: 1;
width: 100%;
}
</style>