rbshubham / yii2-widget-tagsinput
Bootstrap Tags Input 的 Yii2 包装器小部件。
8.0
2020-03-30 09:44 UTC
Requires
- yiisoft/yii2: *
README
创建 Bootstrap Tags Input 框
安装
安装此扩展的首选方式是通过 composer。请检查此扩展的 composer.json 以了解其要求和依赖项。阅读有关为您的应用程序的 composer.json 设置 minimum-stability 设置的 web 提示 /wiki。
安装方法:
$ php composer.phar require rbshubham/yii2-widget-tagsinput
或将其添加到您的 composer.json 文件的 require 部分:
"rbshubham/yii2-widget-tagsinput": "*"
用法
use shubham\tagsinput\TagsInput; // Usage with ActiveForm and model echo $form->field($model, 'tags')->widget(TagsInput::classname(), [ "options"=>[ // Input Options Here ], 'pluginOptions'=>[ // Refer to https://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/#options // Enables clear all tags button 'allowClear'=>true; // default true ], 'pluginEvents'=>[ // Refer to https://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/ ] ]); // Without model & without ActiveForm echo TagsInput::widget([ 'name' => 'tags', ]);
有关更多详细信息,请访问: http://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/