框架 API
getApp
获取应用唯一 App 实例,实例对象为 src/App.tsx
引入
import { getApp } from '@ray-js/ray';
签名
getApp(): AppInstance
getCurrentPages
获取当前页面栈
引入
import { getCurrentPages } from '@ray-js/ray';
签名
getCurrentPages() => Page[]
getElementById
获取页面节点
引入
import { getElementById } from '@ray-js/ray';
签名
getElementById(id: string) => Promise<Element>
showNotification
打开通知栏
引入
import { showNotification } from '@ray-js/ray';
签名
showNotification(options: Options) => void