const SvcItem = require("nx.fx.sv.expand.item") cc.Class({ extends: SvcItem, properties: { iname:{ default:null, type:cc.Label }, btn_tag:{ default:null, type:cc.Node }, focus:{ default:null, type:cc.Node }, msg_desc:{ default:null, type:cc.Node }, msg_box:{ default:null, type:cc.RichText } }, // LIFE-CYCLE CALLBACKS: // onLoad () {}, start () { }, rebind: function( _idx, _data, _key ) { this._super( _idx, _data, _key ); // 刷新 this.setData(this.mdata) }, setData(data){ if(nx.dt.objEmpty(data)){ return false; } this.data = data; this.iname.string = data.name; }, touchOpen(){ this.btn_tag.scaleY = -this.btn_tag.scaleY; this.msg_box.string = StringUtil.parse(this.data.desc); this.msg_desc.active = !this.msg_desc.active; } });