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>
|
||||
|
||||
Reference in New Issue
Block a user