优化:比价记录用户信息支持点击

将比价记录列表中的手机号和用户名改为蓝色用户详情链接,并阻止点击链接时误触发行详情。
This commit is contained in:
linkeyu
2026-07-26 20:36:03 +08:00
parent 694944cb5e
commit e99c79b4d4
+8 -3
View File
@@ -8,6 +8,7 @@ import {
} from 'antd';
import type { ColumnsType } from 'antd/es/table';
import dayjs, { type Dayjs } from 'dayjs';
import Link from 'next/link';
import { api, errMsg } from '@/lib/api';
import { formatWallTime, yuan } from '@/lib/format';
import type {
@@ -237,10 +238,14 @@ export default function ComparisonRecordsPage() {
key: 'user',
width: 140,
render: (_, r) => (
<div>
<Link
href={`/users/${r.user_id}`}
onClick={(event) => event.stopPropagation()}
style={{ display: 'inline-block', color: '#1677ff' }}
>
<div>{r.phone || `#${r.user_id}`}</div>
{r.nickname && <div style={{ color: '#999', fontSize: 12 }}>{r.nickname}</div>}
</div>
{r.nickname && <div style={{ fontSize: 12 }}>{r.nickname}</div>}
</Link>
),
},
{ title: '状态', dataIndex: 'status', width: 72, render: (s: string) => <Tag color={STATUS_COLOR[s]}>{STATUS_LABEL[s] || s}</Tag> },