c3e1fc3a-21fc-4185-9b54-095990c4972c.js
2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"use strict";
cc._RF.push(module, 'c3e1fw6IfxBhZtUCVmQxJcs', 'MessageEntryItem');
// script/game/ui/view/impl/MessageEntryItem.ts
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MessageEntryItemImpl = void 0;
const CCDummyObjects_1 = require("../../../../common/CCDummyObjects");
const ListItemImpl_1 = require("../../baseview/impl/ListItemImpl");
const ResUtils_1 = require("../../../../common/utils/ResUtils");
const { ccclass, property } = cc._decorator;
let MessageEntryItemImpl = /** @class */ (() => {
let MessageEntryItemImpl = class MessageEntryItemImpl extends ListItemImpl_1.ListItemImpl {
constructor() {
super(...arguments);
this.titleLabel = CCDummyObjects_1.DummyLabel;
this.lastMsgLabel = CCDummyObjects_1.DummyRichText;
this.iconSprite = CCDummyObjects_1.DummySprite;
}
onLoad() {
this.bindProp("title", this.titleLabel, "string");
this.bindProp("lastMsg", this.lastMsgLabel, "string");
this.bindProp("redDot", this.node.getChildByName("RedDot"), "active");
this.bindProp("icons", async (value) => {
if (value.length == 1) {
this.iconSprite.spriteFrame = await ResUtils_1.ResUtils.loadRes(value[0], cc.SpriteFrame);
}
});
}
};
__decorate([
property({ type: cc.Label })
], MessageEntryItemImpl.prototype, "titleLabel", void 0);
__decorate([
property({ type: cc.RichText })
], MessageEntryItemImpl.prototype, "lastMsgLabel", void 0);
__decorate([
property(cc.Sprite)
], MessageEntryItemImpl.prototype, "iconSprite", void 0);
MessageEntryItemImpl = __decorate([
ccclass
], MessageEntryItemImpl);
return MessageEntryItemImpl;
})();
exports.MessageEntryItemImpl = MessageEntryItemImpl;
cc._RF.pop();