simialbi/yii2-widget-toastr
Composer 安装命令:
composer require simialbi/yii2-widget-toastr
包简介
toastr is a Javascript library for non-blocking notifications implemented as yii2 widget.
README 文档
README
Installation
The preferred way to install this extension is through composer.
Either run
$ php composer.phar require --prefer-dist simialbi/yii2-widget-toastr
or add
"simialbi/yii2-widget-toastr": "^1.0.0"
to the require section of your composer.json
Demo
- Demo can be found at http://codeseven.github.io/toastr/demo.html
- Demo using FontAwesome icons with toastr
Plugin docs
All options and events can be found on the plugins repository page.
Example Usage
<?php use simialbi\yii2\Toastr; Toastr::widget([ 'type' => Toastr::TYPE_SUCCESS, 'title' => 'This is a toast', 'message' => 'Example toast message', 'closeButton' => true, 'debug' => false, 'newestOnTop' => false, 'position' => Toastr::POSITION_BOTTOM_RIGHT, 'progressBar' => true // [...] ]);
Options
| Property | Description |
|---|---|
type |
required The alert type. This is one of the ALERT_TYPE_* constants. |
title |
required The title to render. |
message |
required The main message to render |
closeButton |
Whether or not to show the close button |
debug |
Is it debug mode? |
newestOnTop |
Show the newest on top or at the end? |
progressBar |
Whether or not to show a progress bar |
positionClass |
The position of the toast. One of the POSITION_* constants. |
preventDuplicates |
Whether or not to show duplicate toasts. |
onclick |
A \yii\web\JsExpression with a js function which will be executed on click. |
showDuration |
The animation duration in milliseconds until the toast appears |
hideDuration |
The animation duration in milliseconds until the toasts is hidden |
timeOut |
How long the toast will display without user interaction |
extendedTimeOut |
How long the toast will display after a user hovers over it |
showEasing |
The animation easing to use while showing. One of the EASING_* constants. |
hideEasing |
The animation easing to use while hiding. One of the EASING_* constants. |
showMethod |
The animation method to use while showing. One of the ANIMATION_* constants. |
hideMethod |
The animation method to use while hiding. One of the ANIMATION_* constants. |
tapToDismiss |
Whether or not to dismiss the toast on tap. |
clientOptions |
Manually override all client options here. |
License
yii2-widget-toastr is released under MIT license. See bundled LICENSE for details.
Acknowledgements
simialbi/yii2-widget-toastr 适用场景与选型建议
simialbi/yii2-widget-toastr 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 144 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 05 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「jquery」 「notification」 「session」 「flash」 「widget」 「yii2」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 simialbi/yii2-widget-toastr 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 simialbi/yii2-widget-toastr 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 simialbi/yii2-widget-toastr 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Secure session middleware for Slim 3 framework
This package makes it easy to send notifications via AfricasTalking with Laravel
Yii2 LightBox image galary widget uses Lightbox v2.10.0 by Lokesh Dhakar
Non-I/O blocking PHP SessionHandler implementation using Nette/Caching with DI Extension for Nette framework
Apple Push Notification & Feedback Provider
Throttle notifications on a per-channel basis
统计信息
- 总下载量: 144
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-05-06