PHPackages                             quansitech/qscmf-list-search-type-select2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. quansitech/qscmf-list-search-type-select2

ActiveLibrary[Search &amp; Filtering](/categories/search)

quansitech/qscmf-list-search-type-select2
=========================================

qscmf list builder search select2

v1.1.0(1y ago)0411↓100%1MITPHPPHP &gt;=7.2

Since May 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/quansitech/qscmf-list-search-type-select2)[ Packagist](https://packagist.org/packages/quansitech/qscmf-list-search-type-select2)[ RSS](/packages/quansitech-qscmf-list-search-type-select2/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (4)Used By (0)

quansitech/qscmf-list-search-type-select2
=========================================

[](#quansitechqscmf-list-search-type-select2)

```
qscmf 列表搜索控件--select2

下拉框模糊搜索，支持多选

```

#### 安装

[](#安装)

```
composer require quansitech/qscmf-list-search-type-select2
```

#### 添加下拉框模糊搜索控件

[](#添加下拉框模糊搜索控件)

- 简单用法，添加单选下拉框模糊搜索筛选项

    - 键值对数据格式

        ```
        $user_list = D("User")->getField("id,name", true);

        (new \Qscmf\Builder\ListBuilder())
        ->addSearchItem('user_id', 'select2', '单选姓名', $user_list)
        ->display();
        ```
    - 需要分组的数据格式

        ```
        for ($i=1;$i $i.'_'.$j, 'text' => $j.'子分类'];
          }
          $cate_list[] = ['text' => '父级分类'.$i, 'children' => $children];
        }

        (new \Qscmf\Builder\ListBuilder())
        ->addSearchItem('cate_id', 'select2', '单选分类', $cate_list)
        ->display();
        ```
- 高级用法，可自定义下拉框宽度，支持多选等

    [Select2Builder使用说明](https://github.com/quansitech/qscmf-list-search-type-select2/blob/master/Select2Builder.md)

    ```
    多选的数据格式为选中值以英文逗号拼接如，id1,id2,id3

    ```

    ```
    $user_list = D("User")->getField("id,name", true);

    // 该值为Select2Builder对象
    $select2_obj = new Select2Builder($user_list);
    $select2_obj->setPlaceholder("请选择多选姓名");
    $select2_obj->setIsMultiple(true);
    $select2_obj->setWidth("100");

    (new \Qscmf\Builder\ListBuilder())
    ->addSearchItem('select2_obj', 'select2', '多选姓名', $select2_obj)
    ->display();
    ```
- 快速拼接数据库查询条件

    通过parse可快速从请求参数中组装数据库查询条件，而无需关心组件的数据格式

    ```
    //$key 搜索栏name
    //$map_key 数据库字段值
    //$get_data $_GET数组
    // 返回值
    // [$map_key => $get_data[$key]]
    $map = array_merge($map, \Qs\ListSearchType\Select2\Select2::parse('project_id', 'project_id', $get_data));
    ```

###  Health Score

27

—

LowBetter than 52% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~345 days

Total

3

Last Release

726d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/15a0610fee78753bdad92fd45c3506455c0fd45ae51924797b1841d260495a3f?d=identicon)[tiderjian](/maintainers/tiderjian)

![](https://www.gravatar.com/avatar/6c2b4bb10b346cb957c091d3273e3332276b5d09a29e255d387184f5dd4b5976?d=identicon)[xhiny](/maintainers/xhiny)

---

Top Contributors

[![Xhiny](https://avatars.githubusercontent.com/u/35066497?v=4)](https://github.com/Xhiny "Xhiny (5 commits)")[![lailixiaoheihong1](https://avatars.githubusercontent.com/u/77043859?v=4)](https://github.com/lailixiaoheihong1 "lailixiaoheihong1 (1 commits)")

---

Tags

searchlistcomponentselect2qscmf

### Embed Badge

![Health badge](/badges/quansitech-qscmf-list-search-type-select2/health.svg)

```
[![Health](https://phpackages.com/badges/quansitech-qscmf-list-search-type-select2/health.svg)](https://phpackages.com/packages/quansitech-qscmf-list-search-type-select2)
```

###  Alternatives

[elasticsearch/elasticsearch

PHP Client for Elasticsearch

5.5k175.3M849](/packages/elasticsearch-elasticsearch)[ruflin/elastica

Elasticsearch Client

2.3k49.8M189](/packages/ruflin-elastica)[solarium/solarium

PHP Solr client

93532.1M89](/packages/solarium-solarium)[opensearch-project/opensearch-php

PHP Client for OpenSearch

14823.0M45](/packages/opensearch-project-opensearch-php)[vintage/yii2-search

Search in Active Record models for Yii2

294.6k](/packages/vintage-yii2-search)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
