55 lines
1.1 KiB
JavaScript
55 lines
1.1 KiB
JavaScript
"use strict";
|
|
cc._RF.push(module, 'db8c0+Lk3NM6aauvi8cU2lH', 'cmp.stronger.item.problem');
|
|
// Scripts/mod/stronger/cmp/cmp.stronger.item.problem.js
|
|
|
|
"use strict";
|
|
|
|
var 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: function start() {},
|
|
rebind: function rebind(_idx, _data, _key) {
|
|
this._super(_idx, _data, _key);
|
|
|
|
// 刷新
|
|
this.setData(this.mdata);
|
|
},
|
|
setData: function setData(data) {
|
|
if (nx.dt.objEmpty(data)) {
|
|
return false;
|
|
}
|
|
this.data = data;
|
|
this.iname.string = data.name;
|
|
},
|
|
touchOpen: function 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;
|
|
}
|
|
});
|
|
|
|
cc._RF.pop(); |