1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- var List = require("List");
- import SoundMgr from "../base/SoundMgr";
- cc.Class({
- extends: cc.Component,
- properties: {
- recordList: List,
- },
- // LIFE-CYCLE CALLBACKS:
- // onLoad () {},
- start () {
- },
- onEnable(){
- this.showRecord();
- },
- showRecord(){
- this.itemData = [];
- for(let i=0; i < 10; i++){
- this.itemData.push(i);
- }
- this.recordList.numItems = this.itemData.length;
- },
- listRender(item, idx){
- item.active = true;
- item.getChildByName('lab').getComponent(cc.Label).string = '123';
- item.getChildByName('labTime').getComponent(cc.Label).string = '456';
- item.getChildByName('end').active = true;
- item.getChildByName('ing').active = false;
- },
- onClose(){
- this.node.active = false;
- }
- });
|