drexlerux/yii2-bootstrap-sweetalert
Composer 安装命令:
composer require drexlerux/yii2-bootstrap-sweetalert
包简介
Alert widget based on bootstrap-sweetalert extension {@link http://lipis.github.io/bootstrap-sweetalert/)
README 文档
README
- Alert widget based on bootstrap-sweetalert extension http://lipis.github.io/bootstrap-sweetalert
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist drexlerux/yii2-bootstrap-sweetalert "*"
or add
"drexlerux/yii2-bootstrap-sweetalert": "*"
to the require section of your composer.json.
Usage
Once the extension is installed, simply add widget to your page as follows:
echo \drexlerux\sweetalert\SweetAlert::widget([ 'type' => \drexlerux\sweetalert\SweetAlert::TYPE_WARNING, 'options' => [ 'title' => 'Warning message', 'text' => "Do you want to delete it?", 'confirmButtonText' => "Yes, delete it!", 'cancelButtonText' => "No, cancel plx!" ] ]);
Overrid Confirm
SweetAlertAsset overrides javascript confirm dialog by default. If you want to keep default edit your config.php
'assetManager' => [ 'bundles' => [ 'drexlerux\sweetalert\SweetAlertAsset' => [ 'overrideConfirm' => false ] ] ]
Alert Options
You can find them on the options page
统计信息
- 总下载量: 53
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-10