Giter Site home page Giter Site logo

Comments (4)

SergeyNeroda avatar SergeyNeroda commented on June 27, 2024

Help me)

from vue-recaptcha-v3.

SergeyNeroda avatar SergeyNeroda commented on June 27, 2024

Object.defineProperty(exports, "__esModule", { value: true });
exports.useReCaptcha = exports.VueReCaptcha = void 0;
var recaptcha_v3_1 = webpack_require(/*! recaptcha-v3 / "./node_modules/recaptcha-v3/dist/ReCaptcha.js");
var vue_1 = webpack_require(/
! vue */ "./node_modules/vue/dist/vue.common.js");
var VueReCaptchaInjectKey = Symbol('VueReCaptchaInjectKey');
var globalConfig = {
loadedWaiters: [],
error: null
};
exports.VueReCaptcha = {
install: function (app, options) {
var isLoaded = vue_1.ref(false);
var instance = vue_1.ref(undefined);
app.config.globalProperties.$recaptchaLoaded = recaptchaLoaded(isLoaded);
initializeReCaptcha(options).then(function (wrapper) {
isLoaded.value = true;
instance.value = wrapper;
app.config.globalProperties.$recaptcha = recaptcha(instance);
app.config.globalProperties.$recaptchaInstance = instance;
globalConfig.loadedWaiters.forEach(function (v) { return v.resolve(true); });
}).catch(function (error) {
globalConfig.error = error;
globalConfig.loadedWaiters.forEach(function (v) { return v.reject(error); });
});
app.provide(VueReCaptchaInjectKey, {
instance: instance,
isLoaded: isLoaded,
executeRecaptcha: recaptcha(instance),
recaptchaLoaded: recaptchaLoaded(isLoaded)
});
}
};

from vue-recaptcha-v3.

WipeAir avatar WipeAir commented on June 27, 2024

Looks like you're using Vue 2.*. The latest version of this library is for Vue 3.
See here

from vue-recaptcha-v3.

SergeyNeroda avatar SergeyNeroda commented on June 27, 2024

Thanks

from vue-recaptcha-v3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.