fix: 恢复 202608278 外层 nav-bar 结构(与当时可用版本一致)
对齐 flex:1 webview、nav-row 宽度与 padding-top 计算,非 cover 层方案。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- 顶栏在 web-view 外层(页面级),H5 只在下方 web-view 里 -->
|
||||||
<view class="yxg-page">
|
<view class="yxg-page">
|
||||||
<view class="yxg-nav-bar" :style="navBarStyle">
|
<view class="yxg-nav-bar" :style="navBarStyle">
|
||||||
<view class="yxg-nav-row" :style="navRowStyle">
|
<view class="yxg-nav-row" :style="navRowStyle">
|
||||||
<image
|
<image
|
||||||
class="yxg-nav-logo"
|
class="yxg-nav-logo"
|
||||||
:style="logoStyle"
|
|
||||||
:src="YXG_MP_LOGO_URL"
|
:src="YXG_MP_LOGO_URL"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
|
:style="logoStyle"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -62,6 +63,7 @@ const navRowStyle = `height:${navBarH}px;`
|
|||||||
const logoStyle = `width:${logoW}px;height:${logoH}px;`
|
const logoStyle = `width:${logoW}px;height:${logoH}px;`
|
||||||
const webviewStyle = `height:${webviewH}px;`
|
const webviewStyle = `height:${webviewH}px;`
|
||||||
|
|
||||||
|
/** web-view 已在导航下方,H5 只需极小顶距 */
|
||||||
const h5Url = computed(
|
const h5Url = computed(
|
||||||
() =>
|
() =>
|
||||||
`${YXG_H5_BASE}?mp=1&nh=1&sbh=4&v=${YXG_H5_VERSION}#wechat_redirect`,
|
`${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,
|
headH,
|
||||||
webviewH,
|
webviewH,
|
||||||
logoW,
|
logoW,
|
||||||
@@ -101,7 +103,6 @@ page {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background-color: #ffd1c7;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.yxg-nav-bar {
|
.yxg-nav-bar {
|
||||||
@@ -115,6 +116,7 @@ page {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.yxg-nav-logo {
|
.yxg-nav-logo {
|
||||||
@@ -122,7 +124,7 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.yxg-webview {
|
.yxg-webview {
|
||||||
flex-shrink: 0;
|
flex: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user