perf: 优化关卡展示逻辑

This commit is contained in:
richarjiang
2026-05-09 10:25:23 +08:00
parent 7757168402
commit 57c4f3d826

View File

@@ -313,7 +313,8 @@ export class PageWriteLevels extends BaseView {
if (levelName) { if (levelName) {
const label = levelName.getComponent(Label); const label = levelName.getComponent(Label);
if (label) { if (label) {
label.string = level ? `第${level.level}关` : `第${index + 1}关`; const answerText = level?.answer?.trim();
label.string = answerText || (level ? `第${level.level}关` : `第${index + 1}关`);
} }
} }