jjzjj

UIability

全部标签

【HarmonyOS应用开发】【Stage模型】启动应用内的UIAbility

当一个应用内包含多个UIAbility时,存在应用内启动UIAbility的场景。例如在支付应用中从入口UIAbility启动收付款UIAbility。假设应用中有两个UIAbility:EntryAbility和EntryAbility2(可以在应用的一个模块中,也可以在的不同模块中),需要从EntryAbility的页面中启动EntryAbility2。importUIAbilityfrom'@ohos.app.ability.UIAbility';importhilogfrom'@ohos.hilog';importwindowfrom'@ohos.window';exportdefau

HarmonyOS入门|UIAbility内页面间的跳转

官方课程网址:华为开发者学堂-应用程序框架(huawei.com)官方版代码(仅放entry下的page):IndexPage:/**Copyright(c)2022HuaweiDeviceCo.,Ltd.*LicensedundertheApacheLicense,Version2.0(the"License");*youmaynotusethisfileexceptincompliancewiththeLicense.*YoumayobtainacopyoftheLicenseat**http://www.apache.org/licenses/LICENSE-2.0**Unlessreq

鸿蒙开发学习笔记-UIAbility-Router页面跳转接口源码分析

在鸿蒙开发中,UIAbility的跳转使用router方法.在使用的时候需导入importrouterfrom'@ohos.router';该方法接口成员如下:1.interfaceRouterOptionsinterfaceRouterOptions{url:string;//跳转页面的Urlparams?:Object;//传给跳转页面的参数params}该成员定义RouterOptions基本对象,在进行页面跳转时对应跳转的url和传入的参数params。2.interfaceRouterStateinterfaceRouterState{/***Indexofthecurrentpag

鸿蒙开发学习笔记-UIAbility-Router页面跳转接口源码分析

在鸿蒙开发中,UIAbility的跳转使用router方法.在使用的时候需导入importrouterfrom'@ohos.router';该方法接口成员如下:1.interfaceRouterOptionsinterfaceRouterOptions{url:string;//跳转页面的Urlparams?:Object;//传给跳转页面的参数params}该成员定义RouterOptions基本对象,在进行页面跳转时对应跳转的url和传入的参数params。2.interfaceRouterStateinterfaceRouterState{/***Indexofthecurrentpag