UNPKG
@xg4/device
Version:
latest (0.3.2)
0.3.2
0.3.1
0.3.0
0.2.0
0.1.1
0.1.0
0.0.3
0.0.2
0.0.1
Device detection (phone, tablet, desktop, os)
github.com/xg4/device
xg4/device
@xg4/device
/
dist
/
types
/
orientation.d.ts
13 lines
(12 loc)
•
314 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
export
default
class
Orientation
{
readonly
type:
"landscape"
|
"portrait"
;
listen
(cb?: (
event
: Event,
type
:
'landscape'
|
'portrait'
) =>
void
):
void
;
/** *
@description
竖屏状态 */
isPortrait
():
boolean
;
/** *
@description
横屏状态 */
isLandscape
():
boolean
; }