mirror of
https://github.com/Instadapp/vue-web3.git
synced 2024-07-29 21:48:25 +00:00
Merge branch 'master' of https://github.com/Instadapp/vue-web3
This commit is contained in:
commit
1fd4eebfad
16
README.md
16
README.md
|
@ -75,12 +75,28 @@ yarn add @instadapp/vue-web3-nuxt -D
|
||||||
```
|
```
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
|
// nuxt.config.ts
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
modules: [
|
modules: [
|
||||||
'@instadapp/vue-web3-nuxt'
|
'@instadapp/vue-web3-nuxt'
|
||||||
],
|
],
|
||||||
|
web3 :{
|
||||||
|
autoImport: false, // default `true`
|
||||||
|
}
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
If you disabled `@instadapp/vue-web3-nuxt` auto import:
|
||||||
|
```ts
|
||||||
|
//composables/useWeb3.ts
|
||||||
|
import Web3 from "web3";
|
||||||
|
// import { Web3Provider } from "@ethersproject/providers";
|
||||||
|
import { useWeb3 as useWeb3Generic } from "@instadapp/vue-web3";
|
||||||
|
|
||||||
|
const useWeb3 = () => useWeb3Generic<Web3>();
|
||||||
|
// const useWeb3 = () => useWeb3Generic<Web3Provider>();
|
||||||
|
|
||||||
|
export { useWeb3 };
|
||||||
|
```
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
---
|
---
|
||||||
|
|
Loading…
Reference in New Issue
Block a user