摘要:
生命周期函数 import router from '@ohos.router' @Entry @Component struct Index { // 页面的生命周期 -- 5个 (如果是组件,则只有前2个;如果是页面则有5个) // 组件有的2个 aboutToAppear() { consol 阅读全文
摘要:
1、Tabs的基本使用 @Entry @Component struct Index { private controller: TabsController = new TabsController(); // 声明周期函数 aboutToAppear(){ // 页面加载 1s后 跳转到商城 s 阅读全文
摘要:
1、配置页面路由信息 resources --> base --> profile --> main_pages.json { "src": [ "pages/demo03/Index", "pages/demo03/Detail" ] } 2、编写页面组件 Index.ets /** * 路由跳转 阅读全文