perf: 接入预览页面

This commit is contained in:
richarjiang
2026-04-06 15:43:48 +08:00
parent de674148b9
commit c7f52ab032
8 changed files with 3271 additions and 21 deletions

View File

@@ -18,6 +18,9 @@ export class main extends Component {
@property({ type: Prefab, tooltip: '写关卡页面预制体' })
pageWriteLevelsPrefab: Prefab | null = null;
@property({ type: Prefab, tooltip: '预览试卷页面预制体' })
pagePreviewLevelsPrefab: Prefab | null = null;
@property({ type: Prefab, tooltip: 'Toast 预制体' })
toastPrefab: Prefab | null = null;
@@ -61,6 +64,14 @@ export class main extends Component {
});
}
if (this.pagePreviewLevelsPrefab) {
ViewManager.instance.register('PagePreviewLevels', {
prefab: this.pagePreviewLevelsPrefab,
cache: true,
zIndex: 3
});
}
// 初始化 Toast 管理器
if (this.toastPrefab) {
ToastManager.instance.init(this.toastPrefab, this.node);