提交 9ab80cba 编写于 作者: D DCloud_LXH

fix(app): webview Preference is given to the page background color

上级 fd8842da
...@@ -4,7 +4,7 @@ export function initBackgroundColor( ...@@ -4,7 +4,7 @@ export function initBackgroundColor(
webviewStyle: PlusWebviewWebviewStyles, webviewStyle: PlusWebviewWebviewStyles,
routeMeta: UniApp.PageRouteMeta routeMeta: UniApp.PageRouteMeta
) { ) {
const { backgroundColor } = routeMeta let { backgroundColor } = routeMeta
if (!backgroundColor) { if (!backgroundColor) {
return return
} }
...@@ -13,6 +13,8 @@ export function initBackgroundColor( ...@@ -13,6 +13,8 @@ export function initBackgroundColor(
} }
if (!webviewStyle.background) { if (!webviewStyle.background) {
webviewStyle.background = backgroundColor webviewStyle.background = backgroundColor
} else {
backgroundColor = webviewStyle.background
} }
if (!webviewStyle.backgroundColorTop) { if (!webviewStyle.backgroundColorTop) {
webviewStyle.backgroundColorTop = backgroundColor webviewStyle.backgroundColorTop = backgroundColor
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册