From e0c13bba628f16079aa9b7d5b158d5dc241ac8e0 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Fri, 11 Oct 2019 11:41:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BA=AFnvue=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E4=B8=8B=E8=8E=B7=E5=8F=96windowHeight=E4=B8=8D?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webview/parser/title-nview-parser.js | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/platforms/app-plus/service/framework/webview/parser/title-nview-parser.js b/src/platforms/app-plus/service/framework/webview/parser/title-nview-parser.js index e68fc94d41..21e41f006e 100644 --- a/src/platforms/app-plus/service/framework/webview/parser/title-nview-parser.js +++ b/src/platforms/app-plus/service/framework/webview/parser/title-nview-parser.js @@ -15,13 +15,32 @@ export function parseTitleNView (routeOptions) { ) ) { return false + } + + const titleImage = windowOptions.titleImage || '' + const transparentTitle = windowOptions.transparentTitle || 'none' + const titleNViewTypeList = { + 'none': 'default', + 'auto': 'transparent', + 'always': 'float' } const ret = { autoBackButton: !routeOptions.meta.isQuit, - backgroundColor: windowOptions.navigationBarBackgroundColor || '#000000', - titleText: windowOptions.navigationBarTitleText || '', - titleColor: windowOptions.navigationBarTextStyle === 'black' ? '#000000' : '#ffffff' + titleText: titleImage === '' ? windowOptions.navigationBarTitleText || '' : '', + titleColor: windowOptions.navigationBarTextStyle === 'black' ? '#000000' : '#ffffff', + type: titleNViewTypeList[transparentTitle], + backgroundColor: transparentTitle !== 'always' ? windowOptions.navigationBarBackgroundColor || '#000000' : 'rgba(0,0,0,0)', + tags: titleImage === '' ? [] : [{ + 'tag': 'img', + 'src': titleImage, + 'position': { + 'left': 'auto', + 'top': 'auto', + 'width': 'auto', + 'height': '26px' + } + }] } routeOptions.meta.statusBarStyle = windowOptions.navigationBarTextStyle === 'black' ? 'dark' : 'light' -- GitLab