jakabj16 / 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 not auto-updated.
Last update: 2024-09-16 16:44:04 UTC
README
什么是 Bootstrap Confirmation?
Bootstrap Confirmation - 是一个 Bootstrap 插件,用于在位置上创建确认框,使用 Popover 实现。
安装
Composer
安装此扩展的首选方式是通过 Composer.
运行以下命令之一:
php composer.phar require uran1980/yii2-bootstrap-confirmation "dev-master"
或将其添加到 composer.json
文件的 require 部分中:
"uran1980/yii2-bootstrap-confirmation": "dev-master"
使用
用法
要使用此组件,请将依赖项添加到您项目的资产包中。例如,在 ...\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 主项目页面。