mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
28
JisolGameCocos/assets/script/ui/Dungeon/DungeonShowItem.ts
Normal file
28
JisolGameCocos/assets/script/ui/Dungeon/DungeonShowItem.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import JNScrollViewItem from '../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollViewItem';
|
||||
import { TB } from '../../config/data/schema';
|
||||
import { Label } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('DungeonShowItem')
|
||||
export class DungeonShowItem extends JNScrollViewItem<TB.TbGSysDungeon> {
|
||||
|
||||
//副本名称
|
||||
@property(Label)
|
||||
title:Label;
|
||||
|
||||
onInit(){
|
||||
|
||||
this.onUpdateView();
|
||||
|
||||
}
|
||||
|
||||
onUpdateView(){
|
||||
|
||||
this.title.string = this.data.name;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "337e32c7-5580-4897-925b-19deb6621d34",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
27
JisolGameCocos/assets/script/ui/Dungeon/DungeonView.ts
Normal file
27
JisolGameCocos/assets/script/ui/Dungeon/DungeonView.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { JNGLayerBase } from '../../components/JNComponent';
|
||||
import { TD } from '../../App';
|
||||
import JNScrollView from '../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollView';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('DungeonView')
|
||||
export class DungeonView extends JNGLayerBase {
|
||||
|
||||
@property(JNScrollView)
|
||||
views:JNScrollView
|
||||
|
||||
onJNLoad(data?: any): void {
|
||||
super.onJNLoad(data);
|
||||
this.onUpdateView();
|
||||
}
|
||||
|
||||
onUpdateView(){
|
||||
|
||||
//显示全部副本
|
||||
this.views.refreshData(TD.TbGSysDungeon.getDataList());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "aa8b9c47-a4d4-49bb-a26e-2b78a7f60d0b",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
Reference in New Issue
Block a user