Feat: 增加按钮并且修改路由,实现页面跳转

This commit is contained in:
2025-12-19 17:15:41 +08:00
parent a5d7c70ce5
commit c08e628b38
3 changed files with 53 additions and 1 deletions
+29
View File
@@ -0,0 +1,29 @@
@Entry
@Component
struct Second {
@State message: string = '万物互联';
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Button() {
Text('Back')
.fontSize(30)
.fontWeight(FontWeight.Bold)
}
.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.width('40%')
.height('5%')
}
.width('100%')
}
.height('100%')
}
}