框架 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
Options
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| icon | success | warning | error |
'warning' | 通知栏类型 |
| backgroundColor | string | #FFF | 背景颜色值,有效值为十六进制颜色 |
Ray.js框架API概览:页面管理、通知与多语言功能

最低0.47元/天 解锁文章
1040

被折叠的 条评论
为什么被折叠?



