uran1980 / yii2-bootstrap-confirmation
Bootstrap插件,用于Yii2中实现位置的确认框,使用Popover
0.0.3
2015-03-07 00:00 UTC
Requires
- bower-asset/bootstrap-confirmation2: *
- yiisoft/yii2: ~2
This package is auto-updated.
Last update: 2024-09-13 04:29:19 UTC
README
什么是Bootstrap Confirmation?
Bootstrap Confirmation - 是Bootstrap插件,用于在位置上创建确认框,使用Popover。
安装
Composer
通过Composer安装此扩展是首选方式。
运行以下命令之一:
php composer.phar require uran1980/yii2-bootstrap-confirmation "dev-master"
或
"uran1980/yii2-bootstrap-confirmation": "dev-master"
将以下内容添加到你的composer.json
文件的require部分
使用方法
要使用此组件,请将依赖项添加到项目的资产包中。例如,在...\frontend\assets\AppAsset.php
文件中添加到依赖项
<?php namespace frontend\assets; class AppAsset extends \yii\web\AssetBundle { ... public $depends = [ ... 'uran1980\yii\bootstrapConfirmation\BootstrapConfirmationAsset', ]; }
这样就可以了。在视图中添加按钮如下
<button class="btn btn-default" data-toggle="confirmation">Confirmation</button>
更多详情请参阅Bootstrap Confirmation的主项目页面。