{"id":20144167,"url":"https://github.com/quansitech/qscmf-builderitem-checkbox-text","last_synced_at":"2025-09-12T19:40:28.386Z","repository":{"id":65343040,"uuid":"590286212","full_name":"quansitech/qscmf-builderitem-checkbox-text","owner":"quansitech","description":"checkbox+自定义文本组件","archived":false,"fork":false,"pushed_at":"2023-03-03T10:20:32.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T10:50:10.079Z","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-18T03:43:49.000Z","updated_at":"2023-01-18T03:45:11.000Z","dependencies_parsed_at":"2025-01-13T10:42:11.994Z","dependency_job_id":"e0fa4849-47fb-4e7f-8472-fe139a88a11a","html_url":"https://github.com/quansitech/qscmf-builderitem-checkbox-text","commit_stats":{"total_commits":2,"total_committers":2,"mean_commits":1.0,"dds":0.5,"last_synced_commit":"838dd2a472272d4c2441b8618c4457e2b79187b6"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqscmf-builderitem-checkbox-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqscmf-builderitem-checkbox-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqscmf-builderitem-checkbox-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqscmf-builderitem-checkbox-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quansitech","download_url":"https://codeload.github.com/quansitech/qscmf-builderitem-checkbox-text/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241587914,"owners_count":19986627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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:03.560Z","updated_at":"2025-03-02T23:44:08.888Z","avatar_url":"https://github.com/quansitech.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# qscmf-builderitem-checkbox-text\n\ncheckbox-text builder组件\n\n#### 效果截图\n\n![](https://github.com/quansitech/files/blob/master/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20230118113942.png)\n\n![](https://github.com/quansitech/files/blob/master/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20230118114124.png)\n\n\n#### 安装\n\n```php\ncomposer require quansitech/qscmf-builderitem-checkbox-text\n```\n\n#### 如何使用\n\n+ FormType\n\n  ```php\n  // title: 选项标题\n  // key: 选现对应的键值\n  // need_text 是否需要填写额外的文本项\n  $option = [\n    [\n        'title' =\u003e '网站开发',\n        'key' =\u003e 1,\n    ],\n    [\n        'title' =\u003e '公众号运维',\n        'key' =\u003e 2,\n    ],\n    [\n        'title' =\u003e '其他',\n        'key' =\u003e 3,\n        'need_text' =\u003e true,\n    ]\n  ];\n  -\u003eaddFormItem(\"main_business\", \"checkbox_text\", \"主营业务\", \"\", $option)\n  \n  //注意：组件会自动构造好json格式的数据提交，直接存入对应的数据库字段即可\n  ```\n\n+ ColumnType\n    \n  考虑展示内容可能会比较多，放listbuilder进行编辑并不优雅，暂时不支持editable模式\n\n  ```php\n    $option = [\n        [\n            'title' =\u003e '网站开发',\n            'key' =\u003e 1,\n        ],\n        [\n            'title' =\u003e '公众号运维',\n            'key' =\u003e 2,\n        ],\n        [\n            'title' =\u003e '其他',\n            'key' =\u003e 3,\n            'need_text' =\u003e true,\n        ]\n    ];\n  -\u003eaddTableColumn(\"main_business\", \"主营业务\", \"checkbox_text\", $option)\n  ```\n\n\n#### 前端单独使用checkbox-text.js\n\n  用法参照asset/demo.html\n\n  name属性会自动赋予input hidden组件，用于form提交数据时用\n\n  option是组件展示配置，格式是json字符串，具体设置参照上面的$option说明\n\n  value是组件的默认值，格式是json字符串，参照builder存入数据库的格式，一般直接配置后端读取即可\n\n  class如果没有特殊的样式要求，可以使用qscmf-checkbox-text,否则可以自定义一个别的类名，但是需要自己写样式\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquansitech%2Fqscmf-builderitem-checkbox-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquansitech%2Fqscmf-builderitem-checkbox-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquansitech%2Fqscmf-builderitem-checkbox-text/lists"}