diff --git a/web/src/components/dashboard/ChartsPanel.jsx b/web/src/components/dashboard/ChartsPanel.jsx
index 26a43b63..595e2e02 100644
--- a/web/src/components/dashboard/ChartsPanel.jsx
+++ b/web/src/components/dashboard/ChartsPanel.jsx
@@ -17,7 +17,7 @@ along with this program. If not, see .
For commercial licensing, please contact support@quantumnous.com
*/
-import React, { Suspense } from 'react';
+import React from 'react';
import { Card, Tabs, TabPane } from '@douyinfe/semi-ui';
import { PieChart } from 'lucide-react';
import {
@@ -25,9 +25,7 @@ import {
IconPulse,
IconPieChart2Stroked
} from '@douyinfe/semi-icons';
-const LazyVChart = React.lazy(() =>
- import('@visactor/react-vchart').then(m => ({ default: m.VChart }))
-);
+import { VChart } from '@visactor/react-vchart';
const ChartsPanel = ({
activeChartTab,
@@ -88,36 +86,28 @@ const ChartsPanel = ({
>
{activeChartTab === '1' && (
-
-
-
+
)}
{activeChartTab === '2' && (
-
-
-
+
)}
{activeChartTab === '3' && (
-
-
-
+
)}
{activeChartTab === '4' && (
-
-
-
+
)}
diff --git a/web/src/components/dashboard/StatsCards.jsx b/web/src/components/dashboard/StatsCards.jsx
index cfbcdea3..ae614eb5 100644
--- a/web/src/components/dashboard/StatsCards.jsx
+++ b/web/src/components/dashboard/StatsCards.jsx
@@ -17,12 +17,9 @@ along with this program. If not, see .
For commercial licensing, please contact support@quantumnous.com
*/
-import React, { Suspense } from 'react';
+import React from 'react';
import { Card, Avatar, Skeleton } from '@douyinfe/semi-ui';
-
-const LazyVChart = React.lazy(() =>
- import('@visactor/react-vchart').then(m => ({ default: m.VChart }))
-);
+import { VChart } from '@visactor/react-vchart';
const StatsCards = ({
groupedStatsData,
@@ -77,12 +74,10 @@ const StatsCards = ({
{(loading || (item.trendData && item.trendData.length > 0)) && (
-
-
-
+
)}
diff --git a/web/src/components/settings/personal/cards/AccountManagement.js b/web/src/components/settings/personal/cards/AccountManagement.js
index 59f53cb8..b2c9017e 100644
--- a/web/src/components/settings/personal/cards/AccountManagement.js
+++ b/web/src/components/settings/personal/cards/AccountManagement.js
@@ -71,7 +71,7 @@ const AccountManagement = ({
-
+
{/* 账户绑定 Tab */}
{() => (
-
+
{/* 通知配置 Tab */}
{
+ const theme = useTheme();
const getUsername = () => {
if (userState.user) {
@@ -42,7 +44,16 @@ const UserInfoHeader = ({ t, userState }) => {
};
return (
-
+
{/* 装饰性背景元素 */}
@@ -50,13 +61,12 @@ const UserInfoHeader = ({ t, userState }) => {
-
+
{getAvatarText()}
@@ -103,7 +113,7 @@ const UserInfoHeader = ({ t, userState }) => {
{/* 右上角统计信息(Semi UI 卡片) */}
-
+
diff --git a/web/src/hooks/dashboard/useDashboardCharts.js b/web/src/hooks/dashboard/useDashboardCharts.js
index ec99f3aa..a5ce0b19 100644
--- a/web/src/hooks/dashboard/useDashboardCharts.js
+++ b/web/src/hooks/dashboard/useDashboardCharts.js
@@ -18,6 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
*/
import { useState, useCallback, useEffect } from 'react';
+import { initVChartSemiTheme } from '@visactor/vchart-semi-theme';
import {
modelColorMap,
renderNumber,
@@ -417,19 +418,9 @@ export const useDashboardCharts = (
// ========== 初始化图表主题 ==========
useEffect(() => {
- // 动态加载 visactor 主题,避免首页首屏加载
- let canceled = false;
- (async () => {
- try {
- const mod = await import('@visactor/vchart-semi-theme');
- if (!canceled && mod?.initVChartSemiTheme) {
- mod.initVChartSemiTheme({ isWatchingThemeSwitch: true });
- }
- } catch (e) {
- // 忽略加载失败,图表页再尝试
- }
- })();
- return () => { canceled = true; };
+ initVChartSemiTheme({
+ isWatchingThemeSwitch: true,
+ });
}, []);
return {