var gameConfig = require("gameConfig") cc.Class({ extends: cc.Component, properties: { nd_tableview: { default: null, type: cc.Node }, }, // LIFE-CYCLE CALLBACKS: // onLoad () {}, start() { this.onface() }, onclose() { this.node.destroy() }, refresh(v) { this.nd_tableview.getComponent("tableView").initTableView(v.length, { array: v, target: this, }); }, onface() { var base = cc.playerData.head_list this.refresh(base) }, onkuang() { var base = cc.playerData.head_frame_list this.refresh(base) }, onhero() { var base = [] for (var i = 0; i < cc.playerData.hero_list.length; i++) { base.push(cc.playerData.hero_list[i].hero_id) } this.refresh(base) }, // update (dt) {}, });