From 0c14b8e20322439bddc9ffbefa85342fc2178d91 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Mon, 27 Apr 2020 15:47:11 +0800 Subject: [PATCH] feat(app-plus): backgroundColor=>(background,backgroundColorTop) --- .../framework/webview/parser/webview-style-parser.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/platforms/app-plus/service/framework/webview/parser/webview-style-parser.js b/src/platforms/app-plus/service/framework/webview/parser/webview-style-parser.js index c9520f6f..74d5cb2f 100644 --- a/src/platforms/app-plus/service/framework/webview/parser/webview-style-parser.js +++ b/src/platforms/app-plus/service/framework/webview/parser/webview-style-parser.js @@ -42,6 +42,16 @@ export function parseWebviewStyle (id, path, routeOptions = {}) { } }) + const backgroundColor = routeOptions.window.backgroundColor + if (backgroundColor) { + if (!webviewStyle.background) { + webviewStyle.background = backgroundColor + } + if (!webviewStyle.backgroundColorTop) { + webviewStyle.backgroundColorTop = backgroundColor + } + } + const titleNView = parseTitleNView(routeOptions) if (titleNView) { if ( -- GitLab