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

@@ -0,0 +1,32 @@
import { _decorator, Node, Button } from 'cc';
import { BaseView } from 'db://assets/scripts/core/BaseView';
import { ViewManager } from 'db://assets/scripts/core/ViewManager';
const { ccclass, property } = _decorator;
@ccclass('PagePKData')
export class PagePKData extends BaseView {
@property({ type: Node, tooltip: '返回按钮' })
backBtn: Node | null = null;
onViewLoad(): void {
if (this.backBtn) {
this.backBtn.on(Button.EventType.CLICK, this._onBackClick, this);
}
}
onViewShow(): void {
}
onViewHide(): void {
}
private _onBackClick(): void {
ViewManager.instance.back();
}
onViewDestroy(): void {
if (this.backBtn) {
this.backBtn.off(Button.EventType.CLICK, this._onBackClick, this);
}
}
}