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

@ccclass('Test')
export class Test extends Component {
    @property(Label)
    lbl0: Label = null;
    @property(Label)
    lbl1: Label = null;
    @property(Label)
    lbl2: Label = null;

    refreshView(): void {
        this.lbl0.string = "一二三四五六七八九十阿斯顿法国红酒看来鬼地方高浮雕高低杠的"
        this.lbl1.string = "12345一二三四五六七八九十阿斯顿法国红酒看来鬼地方高浮雕高低杠的"
        this.lbl2.string = "12345一二三四五六七八九十阿斯顿法国红酒看来鬼地方高浮雕高低杠的"
    }

    refreshSize(): void {
        this.getComponent(UITransform).setContentSize(this.getComponent(UITransform).contentSize.x == 200 ? 500 : 200, 651);
    }
}


