title: smartProgram.currentPage header: develop nav: devtools

sidebar: currentPage

解释:获取当前页面。

  1. smartProgram.currentPage(): Promise<Page>

示例代码:

  1. automator.launch().then(async smartProgram => {
  2. await smartProgram.currentPage();
  3. });