mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
fix: 部分pad设备横版和竖屏反过来
This commit is contained in:
parent
4ff1cf68fc
commit
d06d1c177c
6
resources/assets/js/functions/common.js
vendored
6
resources/assets/js/functions/common.js
vendored
@ -552,14 +552,14 @@ const localforage = require("localforage");
|
||||
* @returns {string}
|
||||
*/
|
||||
screenOrientation() {
|
||||
try {
|
||||
/*try {
|
||||
if (typeof window.screen.orientation === "object") {
|
||||
return $A.strExists(window.screen.orientation.type, 'portrait') ? 'portrait' : 'landscape'
|
||||
}
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
return $A(window).width() > $A(window).height() ? "landscape" : "portrait"
|
||||
}*/ // 注释原因:有些设备宽和高对调了
|
||||
return $A(window).width() - $A(window).height() > 50 ? "landscape" : "portrait"
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user