
import { _decorator, Component, Node, UITransform, Label } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Main')
export class Main extends Component {

    @property(Node) private content: Node = null;
    @property(Label) private contentInfo: Label = null;

    private clickBtn1(): void {
        this.content.getComponent(UITransform).height = 1000;
        this.contentInfo.string = `content当前高度：1000`;
    }

    private clickBtn2(): void {
        this.content.getComponent(UITransform).height = 800;
        this.contentInfo.string = `content当前高度：800`;
    }
}
