moxuandi/yii2-tagsinput

bootstrap-tagsinput

Installs: 150

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

v2.2.0.1 2019-12-11 12:48 UTC

This package is auto-updated.

Last update: 2024-12-10 13:51:47 UTC


README

Yii2 标签云插件

Bootstrap Tags Input

参考借鉴: wbraganca/yii2-tagsinput

安装:

使用 composer 下载:

# 2.2.x(yii >= 2.0.24):
composer require moxuandi/yii2-tagsinput:"~2.2.0"

# 开发版:
composer require moxuandi/yii2-tagsinput:"dev-master"

使用:

View中添加:

1. 简单调用:
$form->field($model, 'tags')->widget(moxuandi\tagsInput\TagsInputWidget, [
    'clientOptions' => [
        'trimValue' => true,
    ],
])

2. 不带 $model 调用:
\moxuandi\tagsInput\TagsInputWidget::widget([
    'name' => 'tags',
    'clientOptions' => [
        'trimValue' => true,
    ],
]);