123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2"], function (_export, _context) {
- "use strict";
- var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Component, Label, Sprite, SpriteFrame, UI_Head_Icon, ch, _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _crd, ccclass, property, UI_Rank_Item;
- function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
- function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
- function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
- function _reportPossibleCrUseOfUI_Head_Icon(extras) {
- _reporterNs.report("UI_Head_Icon", "../UI/UI_Head_Icon", _context.meta, extras);
- }
- function _reportPossibleCrUseOfch(extras) {
- _reporterNs.report("ch", "../../../ch/ch", _context.meta, extras);
- }
- return {
- setters: [function (_unresolved_) {
- _reporterNs = _unresolved_;
- }, function (_cc) {
- _cclegacy = _cc.cclegacy;
- __checkObsolete__ = _cc.__checkObsolete__;
- __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
- _decorator = _cc._decorator;
- Component = _cc.Component;
- Label = _cc.Label;
- Sprite = _cc.Sprite;
- SpriteFrame = _cc.SpriteFrame;
- }, function (_unresolved_2) {
- UI_Head_Icon = _unresolved_2.UI_Head_Icon;
- }, function (_unresolved_3) {
- ch = _unresolved_3.ch;
- }],
- execute: function () {
- _crd = true;
- _cclegacy._RF.push({}, "ac170vYiRpERZJoeSznhVhO", "UI_Rank_Item", undefined);
- __checkObsolete__(['_decorator', 'Component', 'Label', 'Node', 'Sprite', 'SpriteFrame']);
- ({
- ccclass,
- property
- } = _decorator);
- _export("UI_Rank_Item", UI_Rank_Item = (_dec = ccclass('UI_Rank_Item'), _dec2 = property(Sprite), _dec3 = property([SpriteFrame]), _dec4 = property(Sprite), _dec5 = property([SpriteFrame]), _dec6 = property(Label), _dec7 = property(_crd && UI_Head_Icon === void 0 ? (_reportPossibleCrUseOfUI_Head_Icon({
- error: Error()
- }), UI_Head_Icon) : UI_Head_Icon), _dec8 = property(Label), _dec9 = property(Label), _dec(_class = (_class2 = class UI_Rank_Item extends Component {
- constructor() {
- super(...arguments);
- _initializerDefineProperty(this, "Bg", _descriptor, this);
- _initializerDefineProperty(this, "Bgs", _descriptor2, this);
- _initializerDefineProperty(this, "Medal", _descriptor3, this);
- _initializerDefineProperty(this, "Medals", _descriptor4, this);
- _initializerDefineProperty(this, "Num", _descriptor5, this);
- _initializerDefineProperty(this, "Head_Icon", _descriptor6, this);
- _initializerDefineProperty(this, "Name", _descriptor7, this);
- _initializerDefineProperty(this, "Level", _descriptor8, this);
- }
- showInfo(index, type, data, me) {
- var _data$score;
- if (!data) {
- this.node.active = false;
- return;
- }
- this.node.active = true;
- if (me) {
- this.Bg.spriteFrame = this.Bgs[4];
- index <= 3 ? this.Medal.spriteFrame = this.Medals[index - 1] : this.Medal.spriteFrame = this.Medals[3];
- } else {
- index <= 3 ? this.Bg.spriteFrame = this.Bgs[index - 1] : this.Bg.spriteFrame = this.Bgs[3];
- index <= 3 ? this.Medal.spriteFrame = this.Medals[index - 1] : this.Medal.spriteFrame = this.Medals[3];
- }
- if (index > 3) {
- this.Medal.node.active = false;
- } else {
- this.Medal.node.active = true;
- }
- this.Num.string = index == 101 ? "未上榜" : index <= 3 ? '' : index.toString();
- this.Name.string = (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({
- error: Error()
- }), ch) : ch).sdk.getDefNickName(data);
- this.Level.string = ((_data$score = data.score) != null ? _data$score : 0) + "\u5173";
- console.log(data);
- this.Head_Icon.show(data.userId.toString(), data.head);
- }
- }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Bg", [_dec2], {
- configurable: true,
- enumerable: true,
- writable: true,
- initializer: function initializer() {
- return null;
- }
- }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Bgs", [_dec3], {
- configurable: true,
- enumerable: true,
- writable: true,
- initializer: function initializer() {
- return [];
- }
- }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "Medal", [_dec4], {
- configurable: true,
- enumerable: true,
- writable: true,
- initializer: function initializer() {
- return null;
- }
- }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "Medals", [_dec5], {
- configurable: true,
- enumerable: true,
- writable: true,
- initializer: function initializer() {
- return [];
- }
- }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "Num", [_dec6], {
- configurable: true,
- enumerable: true,
- writable: true,
- initializer: function initializer() {
- return null;
- }
- }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "Head_Icon", [_dec7], {
- configurable: true,
- enumerable: true,
- writable: true,
- initializer: function initializer() {
- return null;
- }
- }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "Name", [_dec8], {
- configurable: true,
- enumerable: true,
- writable: true,
- initializer: function initializer() {
- return null;
- }
- }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "Level", [_dec9], {
- configurable: true,
- enumerable: true,
- writable: true,
- initializer: function initializer() {
- return null;
- }
- })), _class2)) || _class));
- _cclegacy._RF.pop();
- _crd = false;
- }
- };
- });
- //# sourceMappingURL=e1147a79464be3722bfd2a8f7d71b0aa13cfba5c.js.map
|