moonlandsoft / bootui-typeahead
yii 2 框架的twitter bootstrap typeahead 扩展
1.0.0
2015-01-24 05:50 UTC
Requires
This package is not auto-updated.
Last update: 2024-09-14 16:13:38 UTC
README
yii 2 框架的twitter bootstrap typeahead 扩展
安装
安装此扩展的首选方式是通过 composer。
运行以下命令之一:
php composer.phar require --prefer-dist moonlandsoft/bootui-typeahead "*"
或者
"moonlandsoft/bootui-typeahead": "*"
将以下内容添加到您的 composer.json
文件的 require 部分。
使用方法
扩展安装完成后,只需在代码中使用它即可。
<?= \bootui\typeahead\Typeahead::widget([ 'source' => ['example','bootui','twitter','typeahead','bootstrap'], 'limit' => 10, 'scrollable' => true, 'addon' => ['prepend' => 'Autocomplete'], ]); ?> <?= $form->field($model, 'attribute') ->widget(Typeahead::className(),[ 'source' => ['example','bootui','twitter','typeahead','bootstrap'], 'limit' => 10, 'scrollable' => true, 'addon' => ['prepend' => 'Autocomplete'], ]) ?>