n2ref/coreui-form-field-select2 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

n2ref/coreui-form-field-select2

最新稳定版本:1.0.3

Composer 安装命令:

composer require n2ref/coreui-form-field-select2

包简介

CoreUI Form field select2

README 文档

README

Online documentation

js repository

Install

composer install n2ref/coreui-form-field-select2-php

Select2 options

select2.org

Example usage

$form = new Form();

$form->setRecord([
    'field' => 'Reactive',
]);

$options = [
    'Reactive',
    'Solution',
    'Conglomeration',
    'Algoritm',
    'Holistic',
];

$form->setFields([
    (new Field\Select2('field', 'title')))->setWidth(300)->setOptions($options)
        ->setSelect2([
            "placeholder"     => 'Write your value',
            "tags"            => true,
            "tokenSeparators" => [',', ' ']
        ]),
]);

echo json_encode($form->toArray());

Output

{
    "component": "coreui.form",
    "record"  : {
      "field": "Reactive"
    },
    "fields"  : [
      
      {
        "type": "select2", 
        "name": "field", 
        "label": "title", 
        "width": 300, 
        "options": [
          "Reactive", "Solution", "Conglomeration", "Algoritm", "Holistic"
        ], 
        "select2": {
            "placeholder": "Write your value",
            "tags": true,
            "tokenSeparators": [",", " "]
          }
      }
      
    ]
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2024-06-22