diff --git a/biome.json b/biome.json
index 24487d51..e7d474b2 100644
--- a/biome.json
+++ b/biome.json
@@ -30,7 +30,8 @@
},
"a11y": {
"noStaticElementInteractions": "off",
- "useValidAnchor": "off"
+ "useValidAnchor": "off",
+ "useKeyWithClickEvents": "off"
}
}
},
diff --git a/package.json b/package.json
index 4e2918c6..1f69c76f 100644
--- a/package.json
+++ b/package.json
@@ -43,7 +43,11 @@
"classnames": "^2.5.1",
"dayjs": "^1.11.13",
"react": "^19.1.0",
- "react-dom": "^19.1.0"
+ "react-dom": "^19.1.0",
+ "@ant-design/plots": "^2.6.0",
+ "@antv/l7-react": "^2.4.3",
+ "@antv/l7": "^2.22.7",
+ "numeral": "^2.0.6"
},
"devDependencies": {
"@ant-design/pro-cli": "^3.3.0",
@@ -104,4 +108,4 @@
"create-umi"
]
}
-}
+}
\ No newline at end of file
diff --git a/src/global.style.ts b/src/global.style.ts
index d037918a..193148ff 100644
--- a/src/global.style.ts
+++ b/src/global.style.ts
@@ -1,6 +1,6 @@
import { createStyles } from 'antd-style';
-const useStyles = createStyles(({}) => {
+const useStyles = createStyles(() => {
return {
colorWeak: {
filter: 'invert(80%)',
diff --git a/src/pages/account/center/_mock.ts b/src/pages/account/center/_mock.ts
index 43f203a4..a2fa9b6c 100644
--- a/src/pages/account/center/_mock.ts
+++ b/src/pages/account/center/_mock.ts
@@ -180,8 +180,8 @@ function fakeList(count: number): ListItemDataType[] {
percent: Math.ceil(Math.random() * 50) + 50,
logo: avatars[i % 8],
href: 'https://ant.design',
- updatedAt: new Date(new Date().getTime() - 1000 * 60 * 60 * 2 * i).getTime(),
- createdAt: new Date(new Date().getTime() - 1000 * 60 * 60 * 2 * i).getTime(),
+ updatedAt: new Date(Date.now()- 1000 * 60 * 60 * 2 * i).getTime(),
+ createdAt: new Date(Date.now()- 1000 * 60 * 60 * 2 * i).getTime(),
subDescription: desc[i % 5],
description:
'在中台产品的研发过程中,会出现不同的设计规范和实现方式,但其中往往存在很多类似的页面和组件,这些类似的组件会被抽离成一套标准规范。',
@@ -229,7 +229,7 @@ function getFakeList(req: Request, res: Response) {
}
// 获取用户信息
-function getCurrentUser(req: Request, res: Response) {
+function getCurrentUser(_req: Request, res: Response) {
return res.json({
data: currentUseDetail,
});
diff --git a/src/pages/account/center/index.tsx b/src/pages/account/center/index.tsx
index 0b99fe67..d73c1c01 100644
--- a/src/pages/account/center/index.tsx
+++ b/src/pages/account/center/index.tsx
@@ -223,8 +223,7 @@ const Center: React.FC = () => {
团队
- {currentUser.notice &&
- currentUser.notice.map((item) => (
+ {currentUser.notice?.map((item) => (
diff --git a/src/pages/account/settings/_mock.ts b/src/pages/account/settings/_mock.ts
index 66e6e25d..e0ab541d 100644
--- a/src/pages/account/settings/_mock.ts
+++ b/src/pages/account/settings/_mock.ts
@@ -15,7 +15,7 @@ function getCity(req: Request, res: Response) {
});
}
-function getCurrentUse(req: Request, res: Response) {
+function getCurrentUse(_req: Request, res: Response) {
return res.json({
data: {
name: 'Serati Ma',
diff --git a/src/pages/account/settings/components/base.tsx b/src/pages/account/settings/components/base.tsx
index 37448e94..8e02506e 100644
--- a/src/pages/account/settings/components/base.tsx
+++ b/src/pages/account/settings/components/base.tsx
@@ -13,7 +13,7 @@ import React from 'react';
import { queryCity, queryCurrent, queryProvince } from '../service';
import useStyles from './index.style';
-const validatorPhone = (rule: any, value: string[], callback: (message?: string) => void) => {
+const validatorPhone = (_rule: any, value: string[], callback: (message?: string) => void) => {
if (!value[0]) {
callback('Please input your area code!');
}
diff --git a/src/pages/account/settings/components/security.tsx b/src/pages/account/settings/components/security.tsx
index a66f78a5..3a1507d8 100644
--- a/src/pages/account/settings/components/security.tsx
+++ b/src/pages/account/settings/components/security.tsx
@@ -45,8 +45,7 @@ const SecurityView: React.FC = () => {
const data = getData();
return (
- <>
- >
+ >
itemLayout="horizontal"
dataSource={data}
renderItem={(item) => (
@@ -55,7 +54,6 @@ const SecurityView: React.FC = () => {
)}
/>
- >
);
};
diff --git a/src/pages/account/settings/index.tsx b/src/pages/account/settings/index.tsx
index 84a7e491..72874883 100644
--- a/src/pages/account/settings/index.tsx
+++ b/src/pages/account/settings/index.tsx
@@ -51,7 +51,7 @@ const Settings: React.FC = () => {
return () => {
window.removeEventListener('resize', resize);
};
- }, [dom.current]);
+ }, [resize]);
const getMenu = () => {
return Object.keys(menuMap).map((item) => ({ key: item, label: menuMap[item] }));
};
diff --git a/src/pages/dashboard/analysis/_mock.ts b/src/pages/dashboard/analysis/_mock.ts
index 787e2f22..ffd294ae 100644
--- a/src/pages/dashboard/analysis/_mock.ts
+++ b/src/pages/dashboard/analysis/_mock.ts
@@ -4,7 +4,7 @@ import type { AnalysisData, DataItem, RadarData } from './data.d';
// mock data
const visitData: DataItem[] = [];
-const beginDay = new Date().getTime();
+const beginDay = Date.now();
const fakeY = [7, 5, 4, 2, 4, 7, 5, 6, 5, 9, 6, 3, 1, 5, 3, 6, 5];
for (let i = 0; i < fakeY.length; i += 1) {
@@ -126,7 +126,7 @@ for (let i = 0; i < 10; i += 1) {
}
const offlineChartData = [];
for (let i = 0; i < 20; i += 1) {
- const date = dayjs(new Date().getTime() + 1000 * 60 * 30 * i).format('HH:mm');
+ const date = dayjs(Date.now()+ 1000 * 60 * 30 * i).format('HH:mm');
offlineChartData.push({
date,
type: '客流量',
diff --git a/src/pages/dashboard/analysis/components/Charts/ChartCard/index.tsx b/src/pages/dashboard/analysis/components/Charts/ChartCard/index.tsx
index 95d30d2f..f527c0e4 100644
--- a/src/pages/dashboard/analysis/components/Charts/ChartCard/index.tsx
+++ b/src/pages/dashboard/analysis/components/Charts/ChartCard/index.tsx
@@ -22,7 +22,7 @@ const ChartCard: React.FC = (props) => {
if (!total && total !== 0) {
return null;
}
- let totalDom;
+ let totalDom: React.ReactNode | null = null;
switch (typeof total) {
case 'undefined':
totalDom = null;
@@ -63,7 +63,7 @@ const ChartCard: React.FC = (props) => {
height: contentHeight || 'auto',
}}
>
- {children}
+ {children}
)}
{footer && (
@@ -81,20 +81,15 @@ const ChartCard: React.FC = (props) => {
const {
loading = false,
- contentHeight,
- title,
- avatar,
- action,
- total,
- footer,
- children,
...rest
} = props;
return (
diff --git a/src/pages/dashboard/analysis/components/Charts/WaterWave/index.tsx b/src/pages/dashboard/analysis/components/Charts/WaterWave/index.tsx
index 3a976180..ed4bae7d 100644
--- a/src/pages/dashboard/analysis/components/Charts/WaterWave/index.tsx
+++ b/src/pages/dashboard/analysis/components/Charts/WaterWave/index.tsx
@@ -185,7 +185,9 @@ class WaterWave extends Component {
return (
(this.root = n)}
+ ref={(n) => {
+ this.root = n;
+ }}
style={{
transform: `scale(${radio})`,
}}
@@ -199,7 +201,9 @@ class WaterWave extends Component
{
>