import { _decorator, Component, Label, Node, Sprite } from 'cc';
import { quarter_rank_item_data } from '../../data';
import { tools } from '../../tools';
const { ccclass, property } = _decorator;

@ccclass('quarter_rank_kuang_item')
export class quarter_rank_kuang_item extends Component {
    @property(Node) img_icon:Node = null
    @property(Node) lab_name:Node = null
    
    initView(data:quarter_rank_item_data) {
        tools.loadRemoteImg(data.icon, (d)=>{
            this.img_icon.getComponent(Sprite).spriteFrame = d.sf
        })
        this.lab_name.getComponent(Label).string = data.name
        
    }
}

