omi/plugins/omi-touch
dntzhang f44e958041 update omi-touch 2017-03-07 09:05:57 +08:00
..
example/touch omi-touch v0.1.0 2017-02-14 13:08:04 +08:00
README.md omi-touch v0.1.0 2017-02-14 13:06:26 +08:00
omi-touch.js update omi-touch 2017-03-07 09:05:57 +08:00
omi-touch.png omi-touch v0.1.0 2017-02-14 13:06:26 +08:00
package.json update omi-touch 2017-03-07 09:05:57 +08:00
webpack.config.js omi-touch v0.1.0 2017-02-14 12:54:54 +08:00

README.md

omi-touch

Omi的AlloyTouch插件Omi项目的触摸运动解决方案支持触摸滚动、旋转、翻页、选择等等


Demo

omi-touch

http://alloyteam.github.io/omi/plugins/omi-touch/example/touch/

通过npm安装

npm install omi-touch

使用

import Omi from 'omi';
import OmiTouch from '../../omi-touch.js';

OmiTouch.init();

class App extends Omi.Component {
    constructor(data) {
        super(data);
    }

    render() {
        return  `
        <div class="main">
            <div  omi-touch class="touchArea" motionRef="scroller" min="-1750" max="0" >
                        <ul ref="scroller">
                            <li>Hello, Omi-Touch!</li>
                            <li>AlloyTouch</li>
                            <li>Transformjs</li>
                            <li>AlloyFinger</li>
                            <li>Omi</li>
                            ...
                            ...
                            <li> row 24</li>
                            <li style="border-bottom: none;"> row 25</li>
                        </ul>
                    </div>
        </div>
        `;
    }
}

Omi.render(new App(),"#container");

License

This content is released under the MIT License.