rbshubham/yii2-widget-tagsinput

Bootstrap Tags Input 的 Yii2 包装器小部件。

安装: 100

依赖者: 0

建议者: 0

安全: 0

星星: 0

关注者: 2

分支: 1

开放问题: 0

类型:yii2-extension

8.0 2020-03-30 09:44 UTC

This package is auto-updated.

Last update: 2024-09-29 06:25:40 UTC


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/