| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- const { ccclass, property } = cc._decorator;
- /**
- * 红包码列表
- * @author 薛鸿潇
- */
- @ccclass
- export default class RedBagCode extends cc.Component {
- @property({ type: cc.ScrollView, displayName: '滚动视图' })
- private scroll_view: cc.ScrollView = null!;
- @property({ displayName: 'lbl暂无提现', type: cc.Label })
- private lbl_none: cc.Label = null;
- // onLoad () {}
- start() {
- this.initList();
- }
-
- /**
- * 初始化滚动列表
- */
- private initList() {
- let list_data = gData.cashNormal.getListDataHavCode();
- this.scroll_view.node.emit('srollview-init', list_data)
- this.initNoneItem(list_data);
- }
- /**
- * 初始化无条目时的提示
- */
- private initNoneItem(list_data) {
- const count = list_data.length;
- if (count) {
- this.lbl_none.node.active = false;
- } else {
- this.lbl_none.node.active = true;
- }
- }
- }
|