| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- import { _decorator, Node, Label } from 'cc';
- import InfiniteCell from '../core/InfiniteList/InfiniteCell';
- import { BitmapFont } from '../core/ui/BitmapFont';
- const { ccclass, property } = _decorator;
- @ccclass('DayLoginItem')
- export class DayLoginItem extends InfiniteCell {
- @property({ type: BitmapFont })
- public dayLabel: BitmapFont = null;
- @property({ type: Node })
- public get: Node = null;
- @property({ type: Node })
- public over: Node = null;
- /**
- * 数据更新
- * @param data
- */
- UpdateContent(data: any) {
- if (data.day != "起点") {
- this.dayLabel.string = `${data.day}`;
- } else {
- this.dayLabel.string = "";
- }
- this.over.active = data.isOver;
- this.get.active = !data.isOver;
- // if (data.isCan) {
- // this.get.active = true;
- // } else {
- // this.get.active = false;
- // }
- // this.over.active = !this.get.active;
- // if (data.isOver) {
- // this.get.active = this.over.active = false;
- // }
- }
- }
|