import { _decorator , Component , Node , Label } from 'cc' ; const { ccclass , property } = _decorator ; @ ccclass ( 'PropItem' ) export class PropItem extends Component { @ property ( { type : Label } ) public nameLbl : Label ; @ property ( { type : Label } ) public valueLbl : Label ; start ( ) { } public setData ( name , value ) { this . nameLbl . string = name ; this . updateValue ( value ) ; } public updateValue ( value ) { this . valueLbl . string = value . toString ( ) ; } }