{"id":20144206,"url":"https://github.com/quansitech/qscmf-antd-tag","last_synced_at":"2026-05-13T02:33:48.723Z","repository":{"id":62531957,"uuid":"263509242","full_name":"quansitech/qscmf-antd-tag","owner":"quansitech","description":"antd-tag 扩展组件","archived":false,"fork":false,"pushed_at":"2020-06-02T08:16:14.000Z","size":237,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-13T20:43:44.717Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/quansitech.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-05-13T02:52:32.000Z","updated_at":"2020-06-02T08:15:27.000Z","dependencies_parsed_at":"2022-11-02T15:00:41.450Z","dependency_job_id":null,"html_url":"https://github.com/quansitech/qscmf-antd-tag","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/quansitech/qscmf-antd-tag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqscmf-antd-tag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqscmf-antd-tag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqscmf-antd-tag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqscmf-antd-tag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quansitech","download_url":"https://codeload.github.com/quansitech/qscmf-antd-tag/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqscmf-antd-tag/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32965363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"online","status_checked_at":"2026-05-13T02:00:07.132Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-13T22:09:15.462Z","updated_at":"2026-05-13T02:33:48.704Z","avatar_url":"https://github.com/quansitech.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# qscmf-antd-tag\nantd tag 列表、表单组件\n\n#### 安装\n\n```php\ncomposer require quansitech/qscmf-antd-tag\n```\n\n#### 截图\n列表组件\n\u003cimg src=\"https://user-images.githubusercontent.com/1665649/81764741-d4c04680-9504-11ea-8e79-96bc8c99db8f.png\" /\u003e\n\n表单组件\n\u003cimg src=\"https://user-images.githubusercontent.com/1665649/81764842-0e914d00-9505-11ea-9365-2787282a7611.png\" /\u003e\n\n#### 用法\n+ 组件基础\n\n组件默认带hidden的input元素，input元素存着tag id序列，用逗号分隔。当使用列表保存或者表单提交，都会将这个隐藏input的数据提交到后端处理。\n\n如果新增tag，tag id默认格式为 @ + tag名称， 如新增 test1，那么tag.id=@test1。 因此做业务处理时可判断有无@前缀来辨别是否新增的数据\n\n+ 列表组件\n```php\nforeach($data_list as \u0026$data){\n    $ents = [\n        [\n          'openid' =\u003e 'openid1',\n          'nickname' =\u003e '昵称1'\n        ],\n        [\n          'openid' =\u003e 'openid2',\n          'nickname' =\u003e '昵称2'\n        ]\n    ];\n    $data['person'] = collect($ents)-\u003emap(function($item){\n        return [\n            'id' =\u003e $item['openid'],\n            'text' =\u003e $item['nickname'],\n            'deletable' =\u003e true, //是否可删除 默认为false 可省略\n            'editable' =\u003e false //是否可修改 默认为false 可省略\n        ];\n    })-\u003eall();\n}\n\n$builder = new ListBuilder();\n.\n.\n.\n$builder-\u003eaddTableColumn('person', '已绑定', 'antd_tags', ['createTag' =\u003e false, 'createTagBtnText' =\u003e '添加'])   \n//createTag 是否可新增tag 默认为false 可省略 \n//createTagBtnText 新增按钮的文字提示 默认为 New Tag， 只有当createTag为true时才有效\n-\u003esetTableDataList($data_list)\n```\n\n可配合listBuilder的保存功能，直接在表单去增删改tag，显著提高操作效率。\n\n+ 表单组件\n```php\n$info['person'] = [\n    [\n        'id' =\u003e 1,\n        'text' =\u003e '测试1',\n        'deletable' =\u003e true, //是否可删除 默认为false 可省略\n        'editable' =\u003e true //是否可修改 默认为false 可省略\n    ],\n    [\n        'id' =\u003e 2,\n        'text' =\u003e '测试2',\n        'deletable' =\u003e true,\n        'editable' =\u003e true\n    ]\n];\n\n$builder = new FormBuilder();\n$builder-\u003eaddFormItem('person', 'antd_tags', '绑定用户', '', ['createTag' =\u003e true]) \n//createTag 是否可新增tag 默认为false 可省略\n//createTagBtnText 新增按钮的文字提示 默认为 New Tag， 只有当createTag为true时才有效\n-\u003esetFormData($info);\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquansitech%2Fqscmf-antd-tag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquansitech%2Fqscmf-antd-tag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquansitech%2Fqscmf-antd-tag/lists"}