Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Navigator

Hierarchy

  • Navigator

Index

Properties

Private isClick

isClick: boolean = true

Private maxDeep

maxDeep: number = 10

Methods

Private checkIsClick

  • checkIsClick(): void

Private findPageInHistory

  • findPageInHistory(path: string): number

gotoPage

  • gotoPage(...arg: [CommonParams["path"], CommonParams["query"]]): Promise<any>
  • Parameters

    • Rest ...arg: [CommonParams["path"], CommonParams["query"]]

    Returns Promise<any>

navigateBack

  • navigateBack(query: { delta: number }, option?: { setData: Record<string, unknown> }): Promise<unknown>
  • navigateBack

    Parameters

    • query: { delta: number }
      • delta: number

        返回的页面数,如果 delta 大于现有页面数,则返回到首页。

    • Optional option: { setData: Record<string, unknown> }
      • setData: Record<string, unknown>

        植入目标页面 data 的数据。

    Returns Promise<unknown>

navigateTo

  • navigateTo(path: CommonParams["path"], query?: CommonParams["query"], options?: { events: any }): Promise<any>
  • navigateTo

    Parameters

    • path: CommonParams["path"]

      小程序页面真实路径

    • Optional query: CommonParams["query"]

      页面参数

    • Optional options: { events: any }
      • events: any

        页面间通信接口,用于监听被打开页面发送到当前页面的数据。

    Returns Promise<any>

redirectTo

  • redirectTo(path: CommonParams["path"], query?: CommonParams["query"]): Promise<unknown>
  • redirectTo

    Parameters

    • path: CommonParams["path"]

      小程序页面真实路径

    • Default value query: CommonParams["query"] = {}

      页面参数

    Returns Promise<unknown>

switchTab

  • switchTab(path: CommonParams["path"], query?: CommonParams["query"]): Promise<unknown>
  • switchTab

    Parameters

    • path: CommonParams["path"]

      小程序页面真实路径

    • Default value query: CommonParams["query"] = {}

      页面参数

    Returns Promise<unknown>

Generated using TypeDoc