1.0.9 • Published 5 years ago
mobile-touch v1.0.9
Makes the mobile web App closer to native App
中文文档: README-CN
The introduction of mobile-touch, if the device is a mobile device, can make the whole page scroll closer to native and support Typescript
Zero configuration, tiny, less than 1kb (Gzip)
Install
npm i mobile-touch --save
Feature
Touch:
- Double-clicking the screen will not scale
- Finger kneading won't zoom in on the screen
Scroll:
- When the scroll area receives the scroll gesture, it can respond quickly and solve the problem of no response when switching overflow
- Block all scrolling. Scrolling will not show the background of the browser
Keyboard:
- When the iOS keyboard appears, click the blank area to automatically close the keyboard
- Automatically adjust the scroll area when the iOS keyboard appears
API
There is no necessary API, just need to import the library, if there is a need to scroll list, add a separate mobile-touch property
import 'mobile-touch'
export default ()=>{
return <div mobile-touch="true" className="page">
<SomeComponents>
</div>
}