feat: 首页加载速度优化

This commit is contained in:
CaIon
2024-03-23 20:22:00 +08:00
parent 06c86397e1
commit 58f2cf3a79
6 changed files with 22 additions and 21 deletions

View File

@@ -1,4 +1,6 @@
import React, {useEffect, useRef, useState} from 'react';
import { initVChartSemiTheme } from '@visactor/vchart-semi-theme';
import {Button, Col, Form, Layout, Row, Spin} from "@douyinfe/semi-ui";
import VChart from '@visactor/vchart';
import {API, isAdmin, showError, timestamp2string, timestamp2string1} from "../../helpers";
@@ -292,6 +294,9 @@ const Detail = (props) => {
// formRef.current.formApi.setValue('start_timestamp', st);
// }
if (!initialized.current) {
initVChartSemiTheme({
isWatchingThemeSwitch: true,
});
initialized.current = true;
initChart();
}