nativescript-easy-notification-banner
为 NativeScript 提供简单的通知横幅。
npm i --save nativescript-easy-notification-banner

EasyNotificationBanner

NativeScript 的横幅通知。

基于

Sample iOS

安装

tns plugin add nativescript-easy-notification-banner

用法

import { Component, OnInit } from '@angular/core';
import { EasyNotificationBanner } from 'nativescript-easy-notification-banner';

@Component({
selector: 'ad-main',
template: '<page-router-outlet></page-router-outlet>'
})
export class AppComponent {
private notificationBanner: EasyNotificationBanner;
constructor() {
this.notificationBanner = new EasyNotificationBanner();
}

ngOnInit(){
this.notificationBanner.showSuccess('Celebrate!', 'A new version is available')
.then(() => console.log('this is really easy!'))
;
}
}

待办事项

- [] allow custom design
- [] allow custom duration
- [] enable buttons inside the banner
- [] support android

欢迎贡献! :)

捐赠

bitcoin:1EAqBrcWKGS3VG1ktUxCje2E6hYTQRHRRV

donate

也可以 greenaddress

许可证

Apache 许可证版本 2.0,2004 年 1 月