This commit is contained in:
Baobhan Sith
2025-04-26 00:01:14 +08:00
parent 2199986a97
commit 41fa93e6e8
2 changed files with 43 additions and 26 deletions
+10 -4
View File
@@ -12,8 +12,8 @@ import './style.css';
import '@fortawesome/fontawesome-free/css/all.min.css';
// 导入 splitpanes CSS
import 'splitpanes/dist/splitpanes.css';
// 导入 vue-recaptcha (用于 v2)
import VueRecaptchaPlugin from 'vue-recaptcha';
// 恢复导入 reCAPTCHA v3
import { VueReCaptcha } from 'vue-recaptcha-v3';
const pinia = createPinia(); // 创建 Pinia 实例
pinia.use(piniaPluginPersistedstate); // 使用持久化插件
@@ -24,8 +24,14 @@ app.use(pinia); // 使用配置好的 Pinia 实例
// 注意:在状态初始化完成前,暂时不 use(router)
app.use(i18n); // 使用 i18n
// 注册 vue-recaptcha 插件,传递一个空选项对象
app.use(VueRecaptchaPlugin, {});
// 恢复初始化 reCAPTCHA v3
// 重要提示:请将 'YOUR_RECAPTCHA_V3_SITE_KEY' 替换为您从 Google reCAPTCHA 获取的实际 Site Key
app.use(VueReCaptcha, {
siteKey: 'YOUR_RECAPTCHA_V3_SITE_KEY', // <-- 在此处替换您的 Site Key
loaderOptions: {
autoHideBadge: true // 可选:自动隐藏 reCAPTCHA 徽章
}
});
// --- 应用初始化逻辑 ---
// 使用 async IIFE 来允许顶层 await