定制 akavov/yii2-bootstrap-tokenfield 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

akavov/yii2-bootstrap-tokenfield

最新稳定版本:0.1.0

Composer 安装命令:

composer require akavov/yii2-bootstrap-tokenfield

包简介

Create elegant taggable fields with copy/paste and keyboard support using Bootstrap Tokefield

README 文档

README

Create elegant taggable fields with copy/paste and keyboard support using Bootstrap Tokefield (http://sliptree.github.io/bootstrap-tokenfield/)

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist akavov/yii2-bootstrap-tokenfield : "*"

or add

"akavov/yii2-bootstrap-tokenfield": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= \akavov\tokenfield\Tokenfield::widget([
    'name' => 'inputName',
]);

to use autocomplete

<?= \akavov\tokenfield\Tokenfield::widget([
    'name' => 'inputName',
    "pluginOptions" => [
        'delimiter' => '#', // default ',' (comma)
        'showAutocompleteOnFocus' => true,
        'autocomplete' => [
            'source' => ['red','blue','green','yellow','violet','brown','purple','black','white'],
            'delay' => 100
        ],
    ],
]);

to use with ActiveForm

<?= $form->field($model, 'name')->widget(\akavov\tokenfield\Tokenfield::className(), [
    'pluginOptions' => [
        'delimiter' => '#', // default ',' (comma)
        'showAutocompleteOnFocus' => true,
        'autocomplete' => [
            'source' => ['red','blue','green','yellow','violet','brown','purple','black','white'],
            'delay' => 100
        ],
    ],
]); ?>

TODO

  1. Add ability to choose between jqueryui and typeahead
  2. Test

统计信息

  • 总下载量: 2.41k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-28