10-鸿蒙4.0学习之组件的生命周期
import router from '@ohos.router'
@Entry
@Component
struct LifeCycle1 {
@State message: string = 'Hello World'
@State isShow: boolean = false
build() {
Row() {
Column({
space: 20 }) {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Button('跳转界面')
.onClick(() => {
router.pushUrl({
url