PHPackages                             nelsonkti/componentize - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nelsonkti/componentize

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nelsonkti/componentize
======================

componentize is a combination of componentization and modularization

1.0.8(2y ago)023MITPHPPHP &gt;=7.0

Since Sep 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/nelsonkti/componentize)[ Packagist](https://packagist.org/packages/nelsonkti/componentize)[ RSS](/packages/nelsonkti-componentize/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (10)Used By (0)

Componentize
============

[](#componentize)

**Componentize** 是一个结合了组件化和模块化的库，可以让您以更高效的方式使用组件和模块来管理和组织代码库。

Installation
------------

[](#installation)

您可以通过 Composer 来安装此库：

```
composer require nelsonkti/componentize
```

Requirements
------------

[](#requirements)

- PHP &gt;= 7.0

Usage
-----

[](#usage)

要使用此库，只需通过 Composer 安装，然后在代码中导入所需的类。

### Example

[](#example)

```
use Nelsons\Componentize\Grid;
use Nelsons\Componentize\Form;

$grid = new Grid();
$grid->column('id', 'ID')->sortAble();
$grid->column('name', '商品名称')->copyable();
```

### 筛选器

[](#筛选器)

```
# 筛选器
$grid->filter(function (Grid\Filter $filter) {
    $filter->checkbox('export_node', '导出节点')->options(array(
                '11' => '不限', '22' => '待分配订单',
        ))->canCheckAll();
    $filter->datetimeRange('order_time', '订单时间')->date()
    $filter->select('order_number2', '订单号2')->options(array(
                '不限', '待分配订单', '已分配订单', '挂起订单', '已催收订单', '催收中订单'
    ));
});
```

### 增删改

[](#增删改)

```
# action
$grid->action(function (Grid\Action $action) {
    $action->create('新增员工', function (Form $form) {
        $form->title('新增员工');
        $form->text('name', '用户名称')->required()->default('张三');
        $form->select('nationality', '国籍')->options(['泰国', '香港', '中国'])->default(3);
    })
    $action->delete('删除', function (Form $form) {
       $form->title('删除员工');
    });
});
```

### 导出

[](#导出)

```
# 导出
$grid->export(function (Grid\Export $export) {
   $export->title('导出')->ajax('post:xxxxx')->async();
   $export->checkbox('export_node', '导出节点')->options(array(
    '11' => '不限', '22' => '待分配订单',
    ))->canCheckAll();
    $export->column('order_number', '订单号');
    $export->datetime('创建时间', 'create_time')->format('YYYY-MM-DD');
    $export->fields(function (Grid\Export\Fields $fields) {
        $fields->checkbox('order_number2222', '订单号2')->options(array(
            '不限', '待分配订单', '已分配订单', '挂起订单', '已催收订单', '催收中订单'
        ))->canCheckAll()->default(1);
    });
});
```

### 导入

[](#导入)

```
# 导入
$grid->import(function (Grid\Import $import) {
    $import->ajax('post:xxxx');
    $import->templateFileUrl('post:xxxx');
    $import->select('collection_label', '催收标签')->options(array(
        '自定义', '盲发订单', '盲发订单'
    ));
    $import->select('collection_user_id', '催收员')->options(array(
        '王五', '张六', '刘七'
    ));
});
```

### 统计

[](#统计)

```
# 统计
$grid->panel('statistics_list')->template('xxxxx');
$grid->echarts('order_statistic')->type('line');
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.7% 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 ~1 days

Total

9

Last Release

967d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/93e303607aa0b2985263e8f57fc8a506915b3d8c0d0326c01c3a6f30264c2534?d=identicon)[nelsonkti](/maintainers/nelsonkti)

---

Top Contributors

[![fuzengyao](https://avatars.githubusercontent.com/u/24694539?v=4)](https://github.com/fuzengyao "fuzengyao (22 commits)")[![nelsonkti](https://avatars.githubusercontent.com/u/58064299?v=4)](https://github.com/nelsonkti "nelsonkti (1 commits)")

---

Tags

Nelsonscomponentize

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nelsonkti-componentize/health.svg)

```
[![Health](https://phpackages.com/badges/nelsonkti-componentize/health.svg)](https://phpackages.com/packages/nelsonkti-componentize)
```

PHPackages © 2026

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