fix: 部分pad设备横版和竖屏反过来

This commit is contained in:
kuaifan 2023-12-14 15:18:02 +08:00
parent 4ff1cf68fc
commit d06d1c177c

View File

@ -552,14 +552,14 @@ const localforage = require("localforage");
* @returns {string} * @returns {string}
*/ */
screenOrientation() { screenOrientation() {
try { /*try {
if (typeof window.screen.orientation === "object") { if (typeof window.screen.orientation === "object") {
return $A.strExists(window.screen.orientation.type, 'portrait') ? 'portrait' : 'landscape' return $A.strExists(window.screen.orientation.type, 'portrait') ? 'portrait' : 'landscape'
} }
} catch (e) { } catch (e) {
// //
} }*/ // 注释原因有些设备宽和高对调了
return $A(window).width() > $A(window).height() ? "landscape" : "portrait" return $A(window).width() - $A(window).height() > 50 ? "landscape" : "portrait"
}, },
/** /**