提交 9ba045b7 编写于 作者: L liuxiaohang

fix(app): darkmode titleNView:false

上级 a0f6d4fa
...@@ -98,23 +98,24 @@ export function useWebviewThemeChange( ...@@ -98,23 +98,24 @@ export function useWebviewThemeChange(
) { ) {
if (__uniConfig.darkmode) { if (__uniConfig.darkmode) {
const fn = () => { const fn = () => {
const { const webviewStyle = getWebviewStyle()
animationAlphaBGColor, const style: typeof webviewStyle = {
background, animationAlphaBGColor: webviewStyle.animationAlphaBGColor,
backgroundColorBottom, background: webviewStyle.background,
backgroundColorTop, backgroundColorBottom: webviewStyle.backgroundColorBottom,
titleNView: { backgroundColor, titleColor } = {}, backgroundColorTop: webviewStyle.backgroundColorTop,
} = getWebviewStyle() }
webview?.setStyle({ var titleNView = webviewStyle.titleNView
animationAlphaBGColor, if (typeof titleNView !== 'undefined') {
background, style.titleNView =
backgroundColorBottom, typeof titleNView === 'object'
backgroundColorTop, ? {
titleNView: { backgroundColor: titleNView.backgroundColor,
backgroundColor, titleColor: titleNView.titleColor,
titleColor, }
}, : titleNView
}) }
webview && webview.setStyle(webviewStyle)
} }
onThemeChange(fn) onThemeChange(fn)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册