From f10fbbd3052d32a348cd961feb5f194b8261fd6f Mon Sep 17 00:00:00 2001 From: ryandadeng Date: Fri, 25 Jan 2019 20:03:13 +1100 Subject: [PATCH] fixed readme --- README.md | 102 +++++++++++++++++++++++------------------------------- 1 file changed, 43 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index 6f7210b..56d3a7b 100644 --- a/README.md +++ b/README.md @@ -364,17 +364,20 @@ The file will be created under js/components/googlerecaptchav3/GoogleReCaptchaV3 ### Step 2 Import vue component and Register reCAPTCHA v3 SiteKey +#### A BIG thanks to [@Fluxlicious](https://github.com/Fluxlicious) who improved the vue component. + The Blade way is no longer useful if you use Vue, so we need to manage to assign site key by ourselves. The component supports props below: -Supported: siteKey, elementId, inline and action, check the original file to see the details. +Supported: siteKey, id, inline and action, check the original file to see the details. ````vue - - + + ```` @@ -386,58 +389,52 @@ There are two ways you can bind site key to the component. ````vue + ```` ### or Add site key directly into GoogleReCaptchaV3 component @@ -447,28 +444,15 @@ Alternatively, I believe most of cases your site key will never be changed, so y For instance, open published file and find code below: ````vue .... - props: { - siteKey: { - type: String, - required: true - }, - ..... - }, + siteKey: { + type: String, + required: false, // set to true if you don't want to store the siteKey in this component + default: 'Your Site Key Here' // set siteKey here if you want to store it in this component + }, .... ```` -Remove it from prop and add it in data(): - -````vue - data() { - return { - siteKey: "YOUR_KEY_HERE", - .... - } - }, -```` - ## Advanced Usage