概览
概览@capgo/capacitor-pretty-toast 提供 toast.* API for native-first toast notifications in Capacitor apps. It renders native overlays on iOS and Android and a DOM renderer on Web.
原生首选的__CAPGO_KEEP_1__通知
它在iOS和Android上渲染原生覆盖层,在Web上渲染DOM渲染器。
使用它来显示成功消息、错误、加载状态、长时间运行的Promise反馈以及与平台集成的操作通知。
在外部设备上展示动画的Pretty Toast
通知流程toast.show- 使用完整配置对象显示自定义toast。toast.success,toast.error,toast.info,toast.warning- 使用标题和可选配置显示常见语义toast。toast.loading- 显示一个持续加载的toast。toast.update- 在原处更新一个现有的toast。toast.promise- 使用加载、成功和错误状态跟踪一个Promise。toast.dismiss- 移除一个toast或清空队列。toast.dismissAll公共__CAPGO_KEEP_0__
标题:公共API
Section titled “Public API”| 描述 | 使用完整配置显示一个toast。 |
|---|---|
toast.show(config, options?) | 显示一个toast ToastConfig. |
toast.success(title, config?, options?) | 显示成功的toast。 |
toast.error(title, config?, options?) | 显示错误的toast。 |
toast.info(title, config?, options?) | 显示信息性的toast。 |
toast.warning(title, config?, options?) | 显示警告的toast。 |
toast.loading(title, config?, options?) | 显示一个不自动消失的加载toast。 |
toast.update(id, partial) | 更新一个现有的toast。 |
toast.promise(promise, messages) | 显示加载状态,然后更新为成功或错误。 |
toast.dismiss(id?) | 消除一个toast或当前的toast。 |
toast.dismissAll() | 消除所有可见的和排队的toast。 |
真实数据来源
标题为“真实数据来源”的部分这个参考是从源同步的 src/definitions.ts 在 capacitor-pretty-toast.
继续从 @capgo/capacitor-pretty-toast
标题:继续从 @capgo/capacitor-pretty-toast如果您正在使用 @capgo/capacitor-pretty-toast 来规划原生插件工作,连接它到 Capgo Plugin Directory 在 Capgo Plugin Directory 中的产品工作流程 在 Capacitor Plugins by Capgo 中的实现细节 在 Capacitor Plugins by Capgo 中添加或更新插件 继续 在添加或更新插件的实现细节中 Ionic 企业插件替代品 在 Ionic 企业插件替代品的产品工作流程中 Capgo 本机构建 在 Capgo 本机构建的产品工作流程中