fix: replace page shorthand labels in review detail
This commit is contained in:
@@ -121,6 +121,11 @@ function getFieldBboxHighlight(point: ReviewPoint, key: string, page?: number):
|
||||
};
|
||||
}
|
||||
|
||||
function formatPageLabel(page?: number): string {
|
||||
if (!page || !Number.isFinite(page) || page <= 0) return '未定位';
|
||||
return `第${page}页`;
|
||||
}
|
||||
|
||||
function ExtractedFieldsPanel({
|
||||
reviewPoints,
|
||||
onFieldClick,
|
||||
@@ -224,10 +229,10 @@ function ExtractedFieldsPanel({
|
||||
handleFieldNavigate(f.pointId, f.page, f.highlightValue, f.bboxHighlight);
|
||||
}}
|
||||
>
|
||||
p.{f.page}
|
||||
{formatPageLabel(f.page)}
|
||||
</button>
|
||||
) : (
|
||||
<div className="mt-0.5 text-[10px] text-slate-300">-</div>
|
||||
<div className="mt-0.5 text-[10px] text-slate-300">未定位</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -89,6 +89,11 @@ function getLeauditBboxHighlight(reviewPoint: ReviewPoint, fieldKey: string, pag
|
||||
};
|
||||
}
|
||||
|
||||
function formatPageLabel(page?: number): string {
|
||||
if (!page || !Number.isFinite(page) || page <= 0) return '未定位';
|
||||
return `第${page}页`;
|
||||
}
|
||||
|
||||
// ── Tooltip 系统 ──
|
||||
let activeTooltip = { show: false, content: null as React.ReactNode, position: { top: 0, left: 0 }, ready: false };
|
||||
function TooltipPortal() {
|
||||
@@ -708,7 +713,9 @@ function LeauditReviewPointDetailCard({ reviewPoint, onReviewPointSelect, onStat
|
||||
{enterpriseButton && enterpriseButton}
|
||||
</div>
|
||||
<div className="flex items-center gap-2 shrink-0">
|
||||
{page && <span className="text-[10.5px] text-slate-400 shrink-0">P{page}</span>}
|
||||
<span className={`text-[10.5px] shrink-0 ${page ? 'text-slate-400' : 'text-slate-300'}`}>
|
||||
{formatPageLabel(page)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user