2024-01-18 18:58:07 +08:00
|
|
|
import { _decorator, Component, Node } from 'cc';
|
|
|
|
import JNLayerBase from '../../../../extensions/ngame/assets/ngame/ui/base/JNLayerBase';
|
2024-01-19 02:42:37 +08:00
|
|
|
import JNScrollView from '../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollView';
|
|
|
|
import ResourceData from '../../data/ResourceData';
|
2024-01-18 18:58:07 +08:00
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
|
|
//背包页面
|
|
|
|
@ccclass('PacksackView')
|
|
|
|
export class PacksackView extends JNLayerBase {
|
|
|
|
|
2024-01-19 02:42:37 +08:00
|
|
|
//背包
|
|
|
|
@property(JNScrollView)
|
|
|
|
views:JNScrollView;
|
|
|
|
|
2024-01-18 18:58:07 +08:00
|
|
|
onJNLoad(data?: any): void {
|
2024-01-19 02:42:37 +08:00
|
|
|
super.onJNLoad(data);
|
|
|
|
this.onUpdateView();
|
2024-01-18 18:58:07 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//更新页面
|
|
|
|
onUpdateView(){
|
2024-01-19 02:42:37 +08:00
|
|
|
|
|
|
|
this.views.refreshData(ResourceData.getIns().getIds());
|
2024-01-18 18:58:07 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|