setScrollLock
Start from API_LEVEL
2.0
. Please refer to API_LEVEL.
Set the current page scrolling position to be locked, i.e. the screen position will not change with the gesture swipe. After calling this API to perform the unlock operation, the page scrolling mode will be set to free scrolling mode.
Type
function setScrollLock(option: Option): void
Parameters
Option
Property | Type | Required | DefaultValue | Description | API_LEVEL |
---|---|---|---|---|---|
lock | boolean | N | true | Whether to lock the current page scroll position | 2.0 |
Example
import { setScrollLock } from '@zos/page'
setScrollLock({
lock: true,
})