未验证 提交 afc56c40 编写于 作者: O openharmony_ci 提交者: Gitee

!23256 【轻量级 PR】:update zh-cn/application-dev/quick-start/start-with-ets-stage.md.

Merge pull request !23256 from 葛亚芳/N/A
......@@ -2,7 +2,7 @@
> **说明:**
>
>
> 为确保运行效果,本文以使用**DevEco Studio 4.0 Beta2**版本为例,点击[此处](../../release-notes/OpenHarmony-v4.0-beta2.md#配套关系)获取下载链接。
## 创建ArkTS工程
......@@ -302,7 +302,13 @@
.height('5%')
// 跳转按钮绑定onClick事件,点击时跳转到第二页
.onClick(() => {
router.pushUrl({ url: 'pages/Second' })
console.info(`Succeeded in clicking the 'Next' button.`)
// 跳转到第二页
router.pushUrl({ url: 'pages/Second' }).then(() => {
console.info('Succeeded in jumping to the second page.')
}).catch((err) => {
console.error(`Failed to jump to the second page.Code is ${err.code}, message is ${err.message}`)
})
})
}
.width('100%')
......@@ -346,7 +352,14 @@
.height('5%')
// 返回按钮绑定onClick事件,点击按钮时返回到第一页
.onClick(() => {
router.back()
console.info(`Succeeded in clicking the 'Back' button.`)
try {
// 返回第一页
router.back()
console.info('Succeeded in returning to the first page.')
} catch (err) {
console.error(`Failed to return to the first page.Code is ${err.code}, message is ${err.message}`)
}
})
}
.width('100%')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册