Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
huangshuwei authored Aug 18, 2017
1 parent 094fba1 commit b7a8acf
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,22 @@ npm i vue-click-helper -D
```

# Basic Usage

```html
<template>
<div v-click-helper="clickHelper">click me</div>
</template>

```

```javascript
import Vue from 'vue'
import vueClickHelper from 'vue-click-helper'

Vue.directive('click-helper', vueClickHelper)

export default{

directives: {
'click-helper': vueClickHelper
},
methods:{

clickHelper(e,isDoubleClick){
Expand All @@ -38,17 +46,16 @@ export default{
}
```

```html
<div v-click-helper="clickHelper">click me</div>
```

# Advanced

If you want to set, execute double click within 290 milliseconds,just:

```html
<div v-click-helper:290="clickHelper">click me</div>
<template>
<div v-click-helper:290="clickHelper">click me</div>
</template>
```

# License
http://www.opensource.org/licenses/mit-license.php
http://www.opensource.org/licenses/mit-license.php

0 comments on commit b7a8acf

Please sign in to comment.