import { EquipmentLinesData } from "./CharacterPanelData" ; import { Item } from "../../../../ItemList/Item" ; import { PrefabUrl } from "../../../../Manager/PrefabUrl" ; import { EquipmentData , ItemData } from "../../../../Common/JsonData/JsonData" ; import { Debug } from "../../../../Common/Debug" ; const { ccclass , property } = cc . _decorator ; @ ccclass export class Lines extends Item < EquipmentLinesData > { private _data : EquipmentLinesData ; @ property ( cc . Label ) public describe : cc . Label ; getData ( ) { return this . _data ; } showByData ( ) { this . describe . string = this . _data . attribute + "+" + this . _data . amount + "  (" + this . _data . min + "-" + this . _data . max + ")" ; this . describe . node . color = new cc . Color ( ) . fromHEX ( this . _data . color ) ; } bindData ( currentIndex , data ) { if ( data == null ) { this . reset ( currentIndex ) ; return ; } this . _data = data ; this . showByData ( ) ; } reset ( currentIndex ) { } select ( selected ) { Debug . log ( "select:" + selected ) ; } getClickButton ( ) { return this . node . getComponent ( cc . Button ) ; } }