perf: 支持易盾RCDN部署

This commit is contained in:
xiaojunnuo
2025-03-09 01:08:57 +08:00
parent 746d3c97c3
commit 065713cdb6
6 changed files with 30 additions and 15 deletions
+8 -2
View File
@@ -11,10 +11,16 @@ import "./styles/antd/index.css";
import { useTitle } from "@vueuse/core";
import { setupI18n } from "/@/vben/locales";
export async function setupVben(app: any, { loadMessages }: any) {
export async function setupVben(app: any, { loadMessages, router }: any) {
await setupI18n(app, { loadMessages });
const store = await initStores(app, { namespace: "fs" });
watchEffect(() => {
if (preferences.app.dynamicTitle) {
const routeTitle = router.currentRoute.value.title;
const pageTitle = routeTitle || "" + preferences.app.name;
useTitle(pageTitle);
}
});
return { store };
}