make setBarTitles also work for pad devices

This commit is contained in:
Luk 2024-02-04 11:29:09 +08:00
parent dd10d0bb3a
commit 07ad96602e

View File

@ -89,7 +89,7 @@ export default {
//// 设置窗口标题栏 document.title //// 设置窗口标题栏 document.title
//// navibarTitle 也会被用于浏览器的标签标题,可用 document.title 去覆盖。必须放在 setNavigationBarTitle 之后。 //// navibarTitle 也会被用于浏览器的标签标题,可用 document.title 去覆盖。必须放在 setNavigationBarTitle 之后。
//// 但这个方案,在电脑上,还是会显示 navibarTitle 在浏览器窗口顶栏,不知为何。 //// 但这个方案,在电脑上,还是会显示 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 document.title = windowTitle