diff --git a/packages/webpack-uni-pages-loader/lib/platforms/h5.js b/packages/webpack-uni-pages-loader/lib/platforms/h5.js index 8037667181a2a8c426fc667bd3a0e81337b6976c..73c5a47a30e5caf8bd7a2eb749cdf26489592799 100644 --- a/packages/webpack-uni-pages-loader/lib/platforms/h5.js +++ b/packages/webpack-uni-pages-loader/lib/platforms/h5.js @@ -93,9 +93,9 @@ const getPageComponents = function (inputDir, pagesJson) { let windowTop = 44 let pageStyle = Object.assign({}, globalStyle, props) - if (pageStyle.navigationStyle === 'custom' || (props.titleNView && props.titleNView.type === - 'transparent')) { - windowTop = 0 + if (pageStyle.navigationStyle === 'custom' || !pageStyle.titleNView || pageStyle.titleNView.type === + 'transparent' || pageStyle.titleNView.type === 'float') { + windowTop = 0 } // 删除 app-plus 平台配置