gpt4 book ai didi

javascript - react 谷歌recaptcha : Setting window attributes in React-Redux

转载 作者:行者123 更新时间:2023-12-03 14:31:55 24 4
gpt4 key购买 nike

我正在尝试在我的应用程序中动态设置验证码语言。查看此处的文档 https://github.com/dozoisch/react-google-recaptcha

In order to translate the reCaptcha widget, you should create a global variable configuring the desired language. If you don't provide it, reCaptcha will pick up the user's interface language.

  window.recaptchaOptions = {
lang: 'fr'
}

如果我在根 app.js 文件中设置全局 window.recaptchaOptions 对象,则此方法有效

我试图解决的问题是在创建商店后在index.js 中设置window.recaptchaOptions。

调查请求,看起来只有当我在根应用程序中设置全局 window.recaptchaOptions 时,才会引入 google recaptcha__fr 脚本。这不允许我访问商店。

有什么想法可以解决这个问题,以便我可以在创建商店后在index.js中设置window.recaptchaOptions?

谢谢

最佳答案

我在这里提出了一个问题 https://github.com/dozoisch/react-google-recaptcha/issues/67

PR 即将合并。

关于javascript - react 谷歌recaptcha : Setting window attributes in React-Redux,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47933212/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com