{"id":18733190,"url":"https://github.com/bioforestchain/bfsa-plugin-typed","last_synced_at":"2025-11-14T00:30:17.197Z","repository":{"id":63229434,"uuid":"563767607","full_name":"BioforestChain/bfsa-plugin-typed","owner":"BioforestChain","description":"bfsa plugin typings","archived":false,"fork":false,"pushed_at":"2022-11-15T08:13:08.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-28T15:46:13.229Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BioforestChain.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":"2022-11-09T09:44:09.000Z","updated_at":"2022-11-10T02:50:20.000Z","dependencies_parsed_at":"2022-11-15T09:51:46.618Z","dependency_job_id":null,"html_url":"https://github.com/BioforestChain/bfsa-plugin-typed","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioforestChain%2Fbfsa-plugin-typed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioforestChain%2Fbfsa-plugin-typed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioforestChain%2Fbfsa-plugin-typed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioforestChain%2Fbfsa-plugin-typed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BioforestChain","download_url":"https://codeload.github.com/BioforestChain/bfsa-plugin-typed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239605124,"owners_count":19666998,"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-07T15:08:59.669Z","updated_at":"2025-11-14T00:30:17.146Z","avatar_url":"https://github.com/BioforestChain.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bfsa-plugin-typed\n\n### 用于@bfsx/plugin组件类型安全\n\u003e 具体@bfsx/plugin组件内容可以看 [组件文档](https://docs.plaoc.com/plugin/)\n\n#### vue3使用\n\u003e npm i @bfsx/plugin-typed-vue --save\n```vue\n\u003cscript lang=\"ts\" setup\u003e\nimport { BfcsTopBar } from \"@bfsx/plugin\";\nimport { DwebTopBar } from \"@bfsx/plugin-typed-vue\";\n\nconst topbar = document.querySelector\u003cBfcsTopBar\u003e(\"dweb-top-bar\");\nconst title = \"vue3\";\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n    \u003cdweb-top-bar :title=\"title\"\u003e\u003c/dweb-top-bar\u003e\n\u003c/template\u003e\n```\n#### react使用\n\u003e npm i @bfsx/plugin-typed-react --save\n```tsx\nimport { useEffect } from \"react\";\nimport { BfcsTopBar, BfcsTopBarButton } from \"@bfsx/plugin\";\nimport \"@bfsx/plugin-typed-react\";\n\nfunction App() {\n\n    useEffect(() =\u003e {\n        // onClick事件无效，只能通过下面的方式监听click事件\n        const ccc = document.querySelector\u003cBfcsTopBarButton\u003e(\"#ccc\")!;\n        ccc.addEventListener(\"click\", () =\u003e {\n            console.log(\"点击事件\");\n        });\n    });\n\n    return (\n        \u003cdiv className=\"App\"\u003e\n            \u003cdweb-top-bar title={\"title\"} className=\"topbar\"\u003e\n                \u003cdweb-top-bar-button id=\"ccc\"\u003e\n                    \u003cdweb-icon\n                        source=\"https://objectjson.waterbang.top/test-vue3/vite.svg\"\n                        type=\"AssetIcon\"\n                    \u003e\u003c/dweb-icon\u003e\n                \u003c/dweb-top-bar-button\u003e\n            \u003c/dweb-top-bar\u003e\n        \u003c/div\u003e\n    )\n}\n```\n\n#### preact使用\n\u003e npm i @bfsx/plugin-typed-preact --save\n```tsx\nimport { BfcsTopBar } from \"@bfsx/plugin\";\nimport \"@bfsx/plugin-typed-preact\";\n\nfunction App() {\n    return (\n        \u003cdiv className=\"App\"\u003e\n            \u003cdweb-top-bar title={\"title\"} className=\"topbar\"\u003e\u003c/dweb-top-bar\u003e\n        \u003c/div\u003e\n    )\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbioforestchain%2Fbfsa-plugin-typed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbioforestchain%2Fbfsa-plugin-typed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbioforestchain%2Fbfsa-plugin-typed/lists"}