Skip to content

Commit

Permalink
doc: fix document
Browse files Browse the repository at this point in the history
  • Loading branch information
DanSnow committed Dec 5, 2021
1 parent be55d7f commit fb04498
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,36 @@ Include `vue-recaptcha` in your app.
</template>
<script>
import VueRecaptcha from 'vue-recaptcha';
import { VueRecaptcha } from 'vue-recaptcha';
export default {
...
components: { VueRecaptcha }
};
</script>
```

### Manually call challenge ###

```vue
<template>
<vue-recaptcha ref="recaptcha" sitekey="Your key here" />
</template>
<script>
import { VueRecaptcha } from 'vue-recaptcha';
export default {
components: { VueRecaptcha }
methods: {
onEvent() {
// when you need a reCAPTCHA challenge
this.$refs.recaptcha.execute();
}
}
};
</script>
```

### Bind Challenge to Button ###
```vue
<template>
Expand All @@ -98,15 +120,15 @@ Include `vue-recaptcha` in your app.
</template>
<script>
import VueRecaptcha from 'vue-recaptcha';
import { VueRecaptcha } from 'vue-recaptcha';
export default {
...
components: { VueRecaptcha }
};
</script>
```

**Notice:** You could only place one element as `vue-recaptcha` child.
**Notice:** You could only place ONE element as `vue-recaptcha` child.

For more information, please reference to [example](example)

Expand Down

0 comments on commit fb04498

Please sign in to comment.