From 07ad96602ea25e6a8d9f29b851afaa6aeb49d57a Mon Sep 17 00:00:00 2001 From: Luk Date: Sun, 4 Feb 2024 11:29:09 +0800 Subject: [PATCH] make `setBarTitles` also work for pad devices --- unitool.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unitool.js b/unitool.js index 7641afe..c9b94d9 100644 --- a/unitool.js +++ b/unitool.js @@ -89,7 +89,7 @@ export default { //// 设置窗口标题栏 document.title //// navibarTitle 也会被用于浏览器的标签标题,可用 document.title 去覆盖。必须放在 setNavigationBarTitle 之后。 //// 但这个方案,在电脑上,还是会显示 navibarTitle 在浏览器窗口顶栏,不知为何。 - if (wo.envar.clientInfo.deviceType === 'phone' && /MicroMessenger/i.test(globalThis.window?.navigator?.userAgent)) { + if (wo.envar.clientInfo.deviceType !== 'pc' && /MicroMessenger/i.test(globalThis.window?.navigator?.userAgent)) { //// 微信浏览器里,本身就显示了标题栏,和自有的导航栏形成功能重叠和混淆。 //// 设置标题栏为空或覆盖 document.title = windowTitle