npm i --save nativescript-playground-bar
- 版本:1.0.0
- GitHub: https://github.com/mudlabs/nativescript-playground-bar
- NPM: https://npmjs.net.cn/package/nativescript-playground-bar
- 下载量
- 昨天: 0
- 上周: 0
- 上个月: 0
nativeScript-playground-bar
为您的 NativeScript Playground 项目提供一个插件,以帮助实现浅色或深色内容的状态栏。
安装
- 从 Playground UI 选择
添加 NPM 包
(通过资源管理器弹出菜单)。 - 将
nativescript-playground-bar
作为 NPM 包名 输入。 - 点击 添加。
用法
// main-page.js
const PlaygroundBar = require("~/nativescript-playgroundbar");
exports.pageLoaded = function (args) {
PlaygroundBar.lightContent(args.object);
}
方法
lightContent
将 iOS
状态栏设置为浅色内容。
参数 | 必需 | 默认 | 描述 |
---|---|---|---|
page | yes | n/a | 您想要更改状态栏的当前页面。 |
timeout | no | 10 | 指定延迟更改样式的 (以毫秒为单位的时间)。 |
darkContent
将 iOS
状态栏设置为深色内容,这是 Playgrounds 的默认样式。
参数 | 必需 | 默认 | 描述 |
---|---|---|---|
page | yes | n/a | 您想要更改状态栏的当前页面。 |
timeout | no | 10 | 指定延迟更改样式的 (以毫秒为单位的时间)。 |