返回介绍

Ionic4 弹出框插件-弹出框Toast

发布于 2019-11-23 07:41:02 字数 1580 浏览 1204 评论 0 收藏 0

This plugin allows you to show a native Toast (a little text popup) on iOS, Android and WP8. It's great for showing a non intrusive native notification which is guaranteed always in the viewport of the browser.

Requires Cordova plugin: cordova-plugin-x-toast. For more info, please see the Toast plugin docs.

https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin

Ionic 弹出框Toast插件的安装(Installation)

ionic cordova plugin add cordova-plugin-x-toast npm install @ionic-native/toast 
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEY npm install @ionic-enterprise/toast 

Ionic 弹出框Toast插件支持的平台(Supported Platforms)

  • Android
  • BlackBerry 10
  • iOS
  • Windows
  • Windows Phone 8

Ionic 弹出框Toast插件的用法(Usage)

import { Toast } from '@ionic-native/toast/ngx';

constructor(private toast: Toast) { }

...

this.toast.show(`I'm a toast`, '5000', 'center').subscribe(
  toast => {
    console.log(toast);
  }
);

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文