Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
```vue

import { 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 (




)
}
```