2018-02-25 16:05:31 +08:00
|
|
|
## omi-tap
|
|
|
|
|
2018-04-27 15:24:25 +08:00
|
|
|
Support tap event in your [Omi](https://github.com/AlloyTeam/omi) project.
|
2018-02-25 16:05:31 +08:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
|
|
|
``` js
|
|
|
|
npm install omi-tap
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```js
|
|
|
|
import 'omi-tap';
|
|
|
|
|
|
|
|
class App extends Component {
|
|
|
|
tapHandler(evt) {
|
|
|
|
alert('Hello Omi + Parcel!')
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<h1 omi-tap tap={this.tapHandler}>Hello Omi + Parcel 📦 🚀</h1>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Omi.render(new App(),"#container");
|
|
|
|
```
|
|
|
|
|
|
|
|
# Debug The Project
|
|
|
|
|
|
|
|
```
|
|
|
|
yarn global add parcel-bundler
|
|
|
|
```
|
|
|
|
or:
|
|
|
|
```
|
|
|
|
npm install -g parcel-bundler
|
|
|
|
```
|
|
|
|
|
|
|
|
then:
|
|
|
|
```
|
|
|
|
npm start
|
|
|
|
```
|
|
|
|
or
|
|
|
|
```
|
|
|
|
parcel example/index.html --open
|
|
|
|
```
|
|
|
|
|
|
|
|
# License
|
|
|
|
This content is released under the [MIT](http://opensource.org/licenses/MIT) License.
|