Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bioforestchain/bfsa-plugin-typed
bfsa plugin typings
https://github.com/bioforestchain/bfsa-plugin-typed
Last synced: 9 days ago
JSON representation
bfsa plugin typings
- Host: GitHub
- URL: https://github.com/bioforestchain/bfsa-plugin-typed
- Owner: BioforestChain
- License: apache-2.0
- Created: 2022-11-09T09:44:09.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-15T08:13:08.000Z (about 2 years ago)
- Last Synced: 2023-03-11T05:44:09.922Z (over 1 year ago)
- Language: TypeScript
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bfsa-plugin-typed
### 用于@bfsx/plugin组件类型安全
> 具体@bfsx/plugin组件内容可以看 [组件文档](https://docs.plaoc.com/plugin/)#### vue3使用
> npm i @bfsx/plugin-typed-vue --save
```vueimport { BfcsTopBar } from "@bfsx/plugin";
import { DwebTopBar } from "@bfsx/plugin-typed-vue";const topbar = document.querySelector<BfcsTopBar>("dweb-top-bar");
const title = "vue3";
```
#### react使用
> npm i @bfsx/plugin-typed-react --save
```tsx
import { useEffect } from "react";
import { BfcsTopBar, BfcsTopBarButton } from "@bfsx/plugin";
import "@bfsx/plugin-typed-react";function App() {
useEffect(() => {
// onClick事件无效,只能通过下面的方式监听click事件
const ccc = document.querySelector("#ccc")!;
ccc.addEventListener("click", () => {
console.log("点击事件");
});
});return (
)
}
```#### preact使用
> npm i @bfsx/plugin-typed-preact --save
```tsx
import { BfcsTopBar } from "@bfsx/plugin";
import "@bfsx/plugin-typed-preact";function App() {
return (
)
}
```