import { _decorator , Component , Node } from 'cc' ; const { ccclass , property } = _decorator ; @ ccclass ( 'UIPanel' ) export class UIPanel extends Component { public show ( ... args ) { this . node . active = true ; this . onShow ( ... args ) ; } protected onShow ( ... args ) { } public hide ( ) { this . node . active = false ; } }