0.0.2 • Published 3 years ago

@mls7788/capacitor-plugin-screen-orientation v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

@mls/capacitor-plugin-screen-orientation

手机应用横屏,手写签字

Install

npm install @mls/capacitor-plugin-screen-orientation
npx cap sync

API

orientation()

orientation() => Promise<{ type: OrientationType; }>

返回当前横屏、竖屏类型。

Returns: Promise<{ type: any; }>


lock(...)

lock(opts: { orientation: OrientationLockType; }) => Promise<void>

按照传入屏幕方向锁定。

ParamTypeDescription
opts{ orientation: any; }屏幕方向类型。

unlock()

unlock() => Promise<void>

取消当前屏幕锁定。


addListener('screenOrientationChange', ...)

addListener(eventName: 'screenOrientationChange', listenerFunc: (orientation: { type: OrientationType; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

监听屏幕方向改变。

ParamTypeDescription
eventName'screenOrientationChange'事件名字
listenerFunc(orientation: { type: any; }) => void事件执行方法

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


removeAllListeners()

removeAllListeners() => Promise<void>

移除所有事件监听。


Interfaces

PluginListenerHandle

PropType
remove() => Promise<void>
0.0.2

3 years ago