{"id":21827497,"url":"https://github.com/laixiangran/e-ngx-table","last_synced_at":"2026-05-09T01:31:49.611Z","repository":{"id":57218040,"uuid":"94736269","full_name":"laixiangran/e-ngx-table","owner":"laixiangran","description":"基于Angular的表格组件，耦合后台，仅限公司内部使用","archived":false,"fork":false,"pushed_at":"2018-11-20T07:57:09.000Z","size":282,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T03:26:15.126Z","etag":null,"topics":["angular","table"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laixiangran.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-19T04:24:51.000Z","updated_at":"2021-11-19T02:38:46.000Z","dependencies_parsed_at":"2022-09-07T18:42:25.167Z","dependency_job_id":null,"html_url":"https://github.com/laixiangran/e-ngx-table","commit_stats":null,"previous_names":["laixiangran/essence-ng2-table"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/laixiangran/e-ngx-table","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laixiangran%2Fe-ngx-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laixiangran%2Fe-ngx-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laixiangran%2Fe-ngx-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laixiangran%2Fe-ngx-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laixiangran","download_url":"https://codeload.github.com/laixiangran/e-ngx-table/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laixiangran%2Fe-ngx-table/sbom","scorecard":{"id":577400,"data":{"date":"2025-08-11","repo":{"name":"github.com/laixiangran/e-ngx-table","commit":"8ec766ebb18a0087fd697ada3c51d82b3eb4abe2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T18:12:25.744Z","repository_id":57218040,"created_at":"2025-08-20T18:12:25.744Z","updated_at":"2025-08-20T18:12:25.744Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32804081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","table"],"created_at":"2024-11-27T18:13:19.858Z","updated_at":"2026-05-09T01:31:49.593Z","avatar_url":"https://github.com/laixiangran.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# e-ngx-table\n\n基于Angular的表格组件，耦合后台，仅限公司内部使用。\n\n## Introduce\n\n1. 必须与后台配合，根据配置项自动获取数据\n\n2. 支持分页\n\n3. 支持单元格自定义格式及点击操作\n\n4. 支持高级搜索\n\n5. 支持批量选择行数据\n\n## Usage\n\n1. Install\n\n\t```shell\n\tnpm install --save e-ngx-table@latest\n\t```\n\n2. Set in the .angular-cli.json（@angular/cli）\n\n    ```json\n    \"styles\": [\n        \"../node_modules/bootstrap/dist/css/bootstrap.min.css\",\n        \"../node_modules/font-awesome/css/font-awesome.min.css\"\n    ]\n    ```\n\n3. Add the ENgxTableModule\n\n\t```typescript\n\timport {ENgxTableModule} from \"e-ngx-table\";\n\t@NgModule({\n\t    imports: [\n\t        ENgxTableModule\n\t    ]\n\t})\n\t```\n\n4. Use in Template\n\n    ```html\n    \u003ce-ngx-table [option]=\"option\" (ready)=\"ready($event)\" (rowSelect)=\"onRowSelect($event)\"\u003e\u003c/e-ngx-table\u003e\n    ```\n\n5. Use in Component\n\n    ```typescript\n    table: ENgxTableComponent;\n\n    option: any = {\n        serverParam: {\n            serverUrl: 'http://192.168.0.88/drainage/TSewerageUserController/getSewerageUserListPage',\n            token: '' // 传入登录之后得到的令牌\n        },\n        operateBtn: [{\n                 text: '添加',\n                 cls: 'btn-success',\n                 event: () =\u003e {\n                     console.log('添加操作！');\n                 }\n             }],\n        showGlobalSearch: true, // 是否显示全局搜索，默认显示\n        showComplexSearch: true, // 是否显示复杂搜索框，默认隐藏\n        columns: {\n            primaryKey: 'id', // （一般要配置，如果错了rowSelect事件会失效）\n            items: [{\n                label: \"工程名称\",\n                colName: \"name\",\n                render: (value: any, obj: any) =\u003e {\n                    return `\u003cspan style=\"color: royalblue;\"\u003e\u003cspan class=\"glyphicon glyphicon-user\"\u003e\u003c/span\u003evalue\u003c/span\u003e`;\n                },\n                event: (data) =\u003e {\n                    console.log(data);\n                }\n            }, {\n                label: \"工程编号\",\n                colName: \"no\",\n                style: {color: 'red', 'font-weight': 'bold'}\n            }, {\n                label: \"工程地址\",\n                colName: \"address\",\n                ellipsis: true,\n                width: 200\n            }, {\n                label: \"创建时间\",\n                colName: \"createtime\",\n                search: false,\n                complexSearch: true,\n                type: 'time'\n            }, {\n                label: \"操作\",\n                print: false,\n                order: null,\n                render: [\n                    {\n                        text: '添加',\n                        cls: 'btn-info btn-xs',\n                        exist:(obj: any) =\u003e { // 根据条件判断是否隐藏按钮\n                            return false;\n                        },\n                        event: (obj: any) =\u003e {\n                            console.log(obj);\n                        }\n                    },\n                    {\n                        text: '编辑',\n                        cls: 'btn-info btn-xs',\n                        event: (obj: any) =\u003e {\n                            console.log(obj);\n                        }\n                    },\n                    {\n                        text: '刪除',\n                        cls: 'btn-danger btn-xs',\n                        event: (obj: any) =\u003e {\n                            console.log(obj);\n                        }\n                    }\n                ]\n            }]\n        }\n    };\n\n    // 表格初始完成\n    ready($event) {\n        this.table = $event;\n        console.log('table ready!');\n    }\n\n    // 行选择事件\n    onRowSelect($event) {\n        console.log($event);\n    }\n\n    // 刷新表格\n    refresh() {\n        this.table.refresh();\n    }\n    ```\n\n## API\n\n### Inputs\n\n- `option` (`Object`) - 表格配置项，默认配置如下：\n\n```json\n\nserverParam: {\n    serverUrl: \"\", // 服务地址\n    token: \"\", // 令牌\n    currentPage: 1, // 当前页\n    pageSize: 10, // 每页显示页数\n    conditions: [{fieldName: '', value: '', operator: 'LIKE'}], // 查询条件\n    orders: [{fieldName: '', value: '', operator: 'DESC'}], // 排序条件\n    search: \"\", // 全局搜索值\n    fileds: [] // 全局搜索对应字段\n},\noperateBtn [] ： 按钮对象数组，对象属性{text: 按钮文本, cls：按钮样式类, event：按钮点击事件\nshowGlobalSearch: true, // 是否显示全局搜索，默认是true\nshowComplexSearch: true, // 是否显示复杂搜索框，默认是false，如果设置为true，则在想要进行复杂筛选的items对象里面加两个属性：complexSearch: true,type: 'string','number\ncolumns: {\n    primaryKey: \"id\", // 主键\n    batch: true, // 批量选择\n    index: { // 序号列\n        enabled: true, // 是否启用\n        print: true // 是否可以打印\n    },\n    items: [\n        {\n            label: \"\", // 表头标签\n            colName: \"\", // 字段名\n            visible: true, // 是否可见\n            print: true, // 是否可以打印\n            order: 'normal', // 排序，可取值：null, normal, asc, desc\n            search: true, // 是否加入全局搜索，默认是true\n            complexSearch: {\n                enable: false, // 是否能进行复杂筛选，如果不配置complexSearch对象，则默认是false\n                type: 'string', // 'string', 'number', 'select'\n                data: [{text: '待解决', value: 0}] // 只有type为'select'时，才需要设置该属性，属性值是对象数组\n            },\n            width: null, // 单元格宽度，如'100px'\n            cls: \"text-center\", // 单元格样式类\n            style: null, // 单元格样式\n            ellipsis: false, // 文字超出单元格是否显示...\n            // 单元格格式化，如果是函数，函数参数(value：当前单元格值, obj：单元格所在行数据对象)，单元格显示函数返回的值。\n            // 如果是对象数组，就显示按钮，对象属性{text: 按钮文本, cls：按钮样式类, event：按钮点击事件}\n            render: null, //  单元格格式化，如果是函数(value: any, obj: any) =\u003e {}，就显示函数返回的值，如果是数组，就显示按钮{text: string 按钮文本, cls: string 按钮样式类, event: function 按钮点击事件回调函数, exist: function 判断按钮是否隐藏函数}\n            event: null, // 单元格点击事件, 返回当前行的数据对象\n        },\n        { // 操作按钮列的设置\n            label: \"操作\",\n            print: false,\n            order: null,\n            exist: (obj) =\u003e {\n                // 控制按钮的显隐藏，如果返回值为true，则显示该按钮，如果返回值为false，则隐藏该按钮\n            },\n            render: [\n               {\n                   text: '编辑',\n                   cls: 'btn-info btn-xs',\n                   event: (obj: any) =\u003e {\n                       console.log(obj);\n                   }\n               },\n               {\n                   text: '刪除',\n                   cls: 'btn-danger btn-xs',\n                   event: (obj: any) =\u003e {\n                       console.log(obj);\n                   }\n               }\n            ]\n       }\n    ]\n}\n```\n\n```json\noperator的值可以有:\n\"EQ\"; // 相等\n\"NE\"; // 不相等\n\"LIKE\"; // 包含\n\"GT\"; // 大于\n\"LT\"; // 小于\n\"GTE\"; // 大于等于\n\"LTE\"; // 小于等于\n\"AND\"; // 交集，复杂条件使用\n\"OR\"; // 并集，复杂条件使用\n\"IN\"; // IN\n\"ASC\"; // 正序，排序使用\n\"DESC\"; // 倒序，排序使用\n```\n\n### Outputs (event)\n\n- `ready` - 表格准备就绪后会触发该事件，参数$event为ENgxTableComponent的实例\n\n- `rowSelect` - 行选择事件，参数$event表示已选行的数据，数据类型为对象数组\n\n- `tableRefresh` - 表格刷新后会触发该事件，参数$event为ENgxTableComponent的实例\n\n### Instance Method\n\n- `refresh(): void` - 刷新列表数据\n\n## Develop\n\n\t```shell\n\tnpm install // 安装依赖包\n\n\tnpm start // 启动项目\n\t```\n\n# License\n\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaixiangran%2Fe-ngx-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaixiangran%2Fe-ngx-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaixiangran%2Fe-ngx-table/lists"}