scorpsan/bootstrap-select
Composer 安装命令:
composer require scorpsan/bootstrap-select
包简介
Yii2 Bootstrap Select Asset.
README 文档
README
Позволяет использовать стилизованные выпадающие списки. Плагин мультиязычный, поэтому установите язык в своем приложении.
Installation
The preferred way to install this extension through composer.
You can set the console
$ composer require "scorpsan/bootstrap-select"
or add
"scorpsan/bootstrap-select": "*"
in require section in composer.json file.
Using
Once the extension is installed, simply use it in your code by :
Add following code to your configuration file of application:
<?php ... use phpnt\bootstrapSelect\BootstrapSelectAsset; ... BootstrapSelectAsset::register($this); ... echo $form->field($model, 'id')->dropDownList($items, [ 'class' => 'form-control selectpicker', 'data' => [ 'style' => 'btn-success', 'live-search' => false, 'size' => 7, 'title' => 'Choose one...' ]]); echo $form->field($model, 'id')->dropDownList($items, [ 'class' => 'form-control selectpicker', 'data' => [ 'style' => 'btn-primary', 'live-search' => true, 'size' => 7, 'title' => 'Choose one...', ], ]); echo $form->field($model, 'id')->dropDownList($items, [ 'class' => 'form-control selectpicker', 'multiple' => true, 'data' => [ 'style' => 'btn-warning', 'live-search' => false, 'size' => 7, ], ]); echo Html::dropDownList('item', null, $items, [ 'class' => 'form-control selectpicker', 'data' => [ 'style' => 'btn-info', 'live-search' => false, 'size' => 7, 'title' => 'Choose one...', ] ]); echo Html::dropDownList('item', null, $items, [ 'class' => 'form-control selectpicker', 'data' => [ 'style' => 'btn-default', 'live-search' => true, 'size' => 7, 'title' => 'Choose one...', ] ]); ... ?>
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2018-07-03