refactor: 重构项目结构并优化代码
- 删除无用的文件和错误日志 - 创建统一的 imports 模块集中管理依赖 - 重构组件使用新的 imports 方式 - 修复文档路径大小写问题 - 优化类型定义和接口导出 - 更新依赖版本 - 改进错误处理和API配置 - 统一组件导出方式
This commit is contained in:
@@ -1,12 +1,27 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Table, Input, Button, Select, DatePicker, message, Card, Typography } from 'antd';
|
||||
import { SearchOutlined, PlusOutlined, EditOutlined, DeleteOutlined, EyeOutlined } from '@ant-design/icons';
|
||||
import {
|
||||
useState,
|
||||
useEffect,
|
||||
Table,
|
||||
Input,
|
||||
Button,
|
||||
Select,
|
||||
DatePicker,
|
||||
message,
|
||||
Card,
|
||||
Typography,
|
||||
SearchOutlined,
|
||||
PlusOutlined,
|
||||
EditOutlined,
|
||||
DeleteOutlined,
|
||||
EyeOutlined,
|
||||
Option,
|
||||
Title,
|
||||
Text,
|
||||
FC,
|
||||
} from '@/imports';
|
||||
import { merchantDataSource, Merchant } from '@/services/merchantDataSource';
|
||||
|
||||
const { Option } = Select;
|
||||
const { Title, Text } = Typography;
|
||||
|
||||
const MerchantManage: React.FC = () => {
|
||||
const MerchantManage: FC = () => {
|
||||
const [merchants, setMerchants] = useState<Merchant[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [searchText, setSearchText] = useState('');
|
||||
|
||||
@@ -1,13 +1,27 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Table, Input, Button, Select, DatePicker, message, Card, Typography, Tag } from 'antd';
|
||||
import { SearchOutlined, EyeOutlined, ReloadOutlined } from '@ant-design/icons';
|
||||
import {
|
||||
useState,
|
||||
useEffect,
|
||||
Table,
|
||||
Input,
|
||||
Button,
|
||||
Select,
|
||||
DatePicker,
|
||||
message,
|
||||
Card,
|
||||
Typography,
|
||||
Tag,
|
||||
SearchOutlined,
|
||||
EyeOutlined,
|
||||
ReloadOutlined,
|
||||
Option,
|
||||
Title,
|
||||
Text,
|
||||
RangePicker,
|
||||
FC,
|
||||
} from '@/imports';
|
||||
import { merchantDataSource, MerchantOrder } from '@/services/merchantDataSource';
|
||||
|
||||
const { Option } = Select;
|
||||
const { Title, Text } = Typography;
|
||||
const { RangePicker } = DatePicker;
|
||||
|
||||
const MerchantOrderManage: React.FC = () => {
|
||||
const MerchantOrderManage: FC = () => {
|
||||
const [orders, setOrders] = useState<MerchantOrder[]>([]);
|
||||
const [merchants, setMerchants] = useState<{ id: string; companyName: string }[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
@@ -1,14 +1,31 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Table, Input, Button, Select, DatePicker, message, Card, Typography, Tag, Modal, Form } from 'antd';
|
||||
import { SearchOutlined, EyeOutlined, DownloadOutlined, ReloadOutlined } from '@ant-design/icons';
|
||||
import {
|
||||
useState,
|
||||
useEffect,
|
||||
Table,
|
||||
Input,
|
||||
Button,
|
||||
Select,
|
||||
DatePicker,
|
||||
message,
|
||||
Card,
|
||||
Typography,
|
||||
Tag,
|
||||
Modal,
|
||||
Form,
|
||||
SearchOutlined,
|
||||
EyeOutlined,
|
||||
DownloadOutlined,
|
||||
ReloadOutlined,
|
||||
Option,
|
||||
Title,
|
||||
Text,
|
||||
RangePicker,
|
||||
Item,
|
||||
FC,
|
||||
} from '@/imports';
|
||||
import { merchantDataSource, Merchant, MerchantSettlement } from '@/services/merchantDataSource';
|
||||
|
||||
const { Option } = Select;
|
||||
const { Title, Text } = Typography;
|
||||
const { RangePicker } = DatePicker;
|
||||
const { Item } = Form;
|
||||
|
||||
const MerchantSettlementManage: React.FC = () => {
|
||||
const MerchantSettlementManage: FC = () => {
|
||||
const [settlements, setSettlements] = useState<MerchantSettlement[]>([]);
|
||||
const [merchants, setMerchants] = useState<{ id: string; companyName: string }[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
@@ -1,13 +1,29 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Table, Input, Button, Select, message, Card, Typography, Form, Modal } from 'antd';
|
||||
import { SearchOutlined, PlusOutlined, EditOutlined, DeleteOutlined, EyeOutlined } from '@ant-design/icons';
|
||||
import {
|
||||
useState,
|
||||
useEffect,
|
||||
Table,
|
||||
Input,
|
||||
Button,
|
||||
Select,
|
||||
message,
|
||||
Card,
|
||||
Typography,
|
||||
Form,
|
||||
Modal,
|
||||
SearchOutlined,
|
||||
PlusOutlined,
|
||||
EditOutlined,
|
||||
DeleteOutlined,
|
||||
EyeOutlined,
|
||||
Option,
|
||||
Title,
|
||||
Text,
|
||||
Item,
|
||||
FC,
|
||||
} from '@/imports';
|
||||
import { merchantDataSource, MerchantShop, Merchant } from '@/services/merchantDataSource';
|
||||
|
||||
const { Option } = Select;
|
||||
const { Title, Text } = Typography;
|
||||
const { Item } = Form;
|
||||
|
||||
const MerchantShopManage: React.FC = () => {
|
||||
const MerchantShopManage: FC = () => {
|
||||
const [shops, setShops] = useState<MerchantShop[]>([]);
|
||||
const [merchants, setMerchants] = useState<{ id: string; companyName: string }[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import React from 'react';
|
||||
import { Card, Typography, Row, Col, Button } from 'antd';
|
||||
import { PlusOutlined } from '@ant-design/icons';
|
||||
import { Card, Typography, Row, Col, Button, PlusOutlined, Title, Text, FC } from '@/imports';
|
||||
|
||||
const { Title, Text } = Typography;
|
||||
|
||||
const MerchantManagement: React.FC = () => {
|
||||
const MerchantManagement: FC = () => {
|
||||
return (
|
||||
<div>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 24 }}>
|
||||
|
||||
Reference in New Issue
Block a user