feat: 支持 PK 数据以及详情页面

This commit is contained in:
richarjiang
2026-04-07 21:07:35 +08:00
parent e05a6a1f8c
commit 0ecb572ba8
13 changed files with 4313 additions and 164 deletions

View File

@@ -21,6 +21,9 @@ export class main extends Component {
@property({ type: Prefab, tooltip: '预览试卷页面预制体' })
pagePreviewLevelsPrefab: Prefab | null = null;
@property({ type: Prefab, tooltip: '挑战数据页面预制体' })
pagePKDataPrefab: Prefab | null = null;
@property({ type: Prefab, tooltip: 'Toast 预制体' })
toastPrefab: Prefab | null = null;
@@ -72,6 +75,14 @@ export class main extends Component {
});
}
if (this.pagePKDataPrefab) {
ViewManager.instance.register('PagePKData', {
prefab: this.pagePKDataPrefab,
cache: true,
zIndex: 3
});
}
// 初始化 Toast 管理器
if (this.toastPrefab) {
ToastManager.instance.init(this.toastPrefab, this.node);