feat: 基本信息
This commit is contained in:
@@ -1,35 +1,26 @@
|
||||
import type { TabsProps } from 'antd';
|
||||
import { Tabs } from 'antd';
|
||||
import React from 'react';
|
||||
import { OrderStatusLabels } from '@/constants/trade';
|
||||
import styles from './index.module.less';
|
||||
import OrderListItem from './list';
|
||||
|
||||
const onChange = (key: string) => {
|
||||
console.log(key);
|
||||
};
|
||||
|
||||
const status: string[] = [
|
||||
'所有订单',
|
||||
'等待付款',
|
||||
'等待确定',
|
||||
'等待服务',
|
||||
'等待验收',
|
||||
'等待评价',
|
||||
'已完成',
|
||||
'已取消',
|
||||
'已退款',
|
||||
];
|
||||
// const onChange = (key: string) => {
|
||||
// console.log(key);
|
||||
// };
|
||||
|
||||
const OrderList: React.FC = () => {
|
||||
const items: TabsProps['items'] = status.map((item, index) => ({
|
||||
key: `${index + 1}`,
|
||||
label: item,
|
||||
children: <OrderListItem />,
|
||||
}));
|
||||
const items: TabsProps['items'] = Object.entries(OrderStatusLabels).map(
|
||||
([value, list]) => ({
|
||||
key: value,
|
||||
label: list.label,
|
||||
children: <OrderListItem orderStatus={Number(value)} />,
|
||||
}),
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={`${styles['trade-order']} "page-container" `}>
|
||||
<Tabs defaultActiveKey="1" items={items} onChange={onChange} />
|
||||
<Tabs defaultActiveKey="1" items={items} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user