0
代码介绍
代码
Issues
Pull Requests
流水线
Actions
讨论
Wiki
项目成员
分析
项目设置
0
  1. docs_zh
  2. /
  3. zh-cn
  4. /
  5. application-dev
  6. /
  7. application-models
  8. /
  9. window-switch.md
ge-yafangge-yafangupdate window big file
1232efca创建于 2025年6月6日历史提交

window接口切换

FA模型接口 Stage模型接口对应d.ts文件 Stage模型对应接口
create(id: string, type: WindowType, callback: AsyncCallback<Window>): void;
create(id: string, type: WindowType): Promise<Window>;
@ohos.window.d.ts createSubWindow(name: string, callback: AsyncCallback<Window>): void;
createSubWindow(name: string): Promise;
FA模型应用通过window.create(id, WindowType.TYPE_APP)接口创建应用子窗口,Stage模型应用可使用WindowStage.CreateSubWindow()接口代替
getTopWindow(callback: AsyncCallback<Window>): void;
getTopWindow(): Promise<Window>;
@ohos.window.d.ts getLastWindow(ctx: BaseContext, callback: AsyncCallback<Window>): void;
getLastWindow(ctx: BaseContext): Promise<Window>;