From ccc5defb8924d04abe55301937d1650a51da593f Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 26 三月 2025 15:28:39 +0800
Subject: [PATCH] 仓库树状图添加Index属性,适配前端
---
rsf-admin/src/App.jsx | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/rsf-admin/src/App.jsx b/rsf-admin/src/App.jsx
index 2d6cde3..9efadba 100644
--- a/rsf-admin/src/App.jsx
+++ b/rsf-admin/src/App.jsx
@@ -28,19 +28,17 @@
DATA_PROVIDER_SPRING,
} from "./config/setting";
import ResourceContent from "./page/ResourceContent";
-import { getSystemInfo, getSystemDicts } from "@/api/auth";
+import { getSystemInfo, getSystemDicts, tenants } from "@/api/auth";
+import chineseMessages from 'ra-language-chinese';
const i18nProvider = polyglotI18nProvider(
(locale) => {
if (locale === "en") {
return import("./i18n/en").then((messages) => messages.default);
}
- // fallback
- return zhMessages;
+ return { ...chineseMessages, ...zhMessages };
},
- // default
- // 'en',
- resolveBrowserLocale("zh", { fullLocale: true }),
+ "zh",
[
{ locale: "en", name: "English" },
{ locale: "zh", name: "绠�浣撲腑鏂�" },
@@ -61,6 +59,9 @@
useEffect(() => {
getSystemInfo().then((data) => {
localStorage.setItem("system", JSON.stringify(data));
+ })
+ getSystemDicts().then(data => {
+ localStorage.setItem('sys_dicts', JSON.stringify(data));
})
}, []);
@@ -108,4 +109,4 @@
</StoreContextProvider>
);
-export default AppWrapper;
+export default AppWrapper;
\ No newline at end of file
--
Gitblit v1.9.1