refactor: 重构项目结构并优化代码
- 删除无用的文件和错误日志 - 创建统一的 imports 模块集中管理依赖 - 重构组件使用新的 imports 方式 - 修复文档路径大小写问题 - 优化类型定义和接口导出 - 更新依赖版本 - 改进错误处理和API配置 - 统一组件导出方式
This commit is contained in:
@@ -1,12 +1,37 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Card, DatePicker, Select, Spin, Statistic, Row, Col, Tabs, Button, Table, Tag, Space, Typography } from 'antd';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { Line, Column, Pie, Area, DualAxes } from '@ant-design/plots';
|
||||
import { ReloadOutlined, ExportOutlined, DollarOutlined, ShoppingCartOutlined, TeamOutlined, RiseOutlined } from '@ant-design/icons';
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
const { Option } = Select;
|
||||
const { Title, Text } = Typography;
|
||||
import {
|
||||
useState,
|
||||
useEffect,
|
||||
useParams,
|
||||
Card,
|
||||
DatePicker,
|
||||
Select,
|
||||
Spin,
|
||||
Statistic,
|
||||
Row,
|
||||
Col,
|
||||
Tabs,
|
||||
Button,
|
||||
Table,
|
||||
Tag,
|
||||
Space,
|
||||
Typography,
|
||||
Line,
|
||||
Column,
|
||||
Pie,
|
||||
Area,
|
||||
DualAxes,
|
||||
ReloadOutlined,
|
||||
ExportOutlined,
|
||||
DollarOutlined,
|
||||
ShoppingCartOutlined,
|
||||
TeamOutlined,
|
||||
RiseOutlined,
|
||||
RangePicker,
|
||||
Option,
|
||||
Title,
|
||||
Text,
|
||||
FC,
|
||||
} from '@/imports';
|
||||
|
||||
interface SalesData {
|
||||
date: string;
|
||||
@@ -83,7 +108,7 @@ const DEVICE_DATA = [
|
||||
{ device: '平板', value: 5, color: '#faad14' },
|
||||
];
|
||||
|
||||
const IndependentSiteAnalytics: React.FC = () => {
|
||||
const IndependentSiteAnalytics: FC = () => {
|
||||
const { id } = useParams<{ id: string }>();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [dateRange, setDateRange] = useState<any>(null);
|
||||
|
||||
Reference in New Issue
Block a user