omi/plugins/omi-touch
当耐特 25467b9ec9
Update index.html
2018-05-28 10:00:07 +08:00
..
example/simple Update index.html 2018-05-28 10:00:07 +08:00
.babelrc omi 3.0 2018-05-03 10:46:34 +08:00
README.md Update README.md 2018-05-28 09:59:37 +08:00
demo.png omix 2018-02-25 16:05:31 +08:00
index.js omi 3.0 2018-05-03 10:46:34 +08:00
package-lock.json omi 3.0 2018-05-03 10:46:34 +08:00
package.json omi 3.0 2018-05-03 10:46:34 +08:00
webpack.config.js omi 3.0 2018-05-03 10:46:34 +08:00

README.md

omi-touch

AlloyTouch / Omi integration. Smooth scrolling, rotation, pull to refresh, page transition and any motion for your Omi project.


Demo

https://tencent.github.io/omi/plugins/omi-touch/example/simple/

Install

npm i omi-touch

Usage

import {render, Component} from 'omi'
import  OmiTouch from 'omi-touch'

class App extends Component {
    constructor(data) {
        super(data)
        
        this.touchChange = this.touchChange.bind(this)
    }

    touchChange(value){
        console.log(this)
        console.log(value)
    }
   
    render() {
        return <div class="main">
        <OmiTouch  min={-1750} max={0} change={this.touchChange}>

            <div class="touchArea" >
                        <ul >
                            <li>Hello, Omi-Touch!</li>
                            <li>AlloyTouch</li>x
                            <li>AlloyFinger</li>
                            <li>Omi</li>
							  ...
							  ...
							  ...
                            <li style="border-bottom: none;"> row 25</li>
                        </ul>
                    </div>

        </OmiTouch>
        </div>
    }

}

render(<App />,"#container")

License

This content is released under the MIT License.