我在用
vue
对于
solana
发展
我使用的图书馆是
@solana/wallet-adapter
错误显示:
/node_modules/@toruslabs/eccrypto/index.js: 'return' outside of function
因为这个例子只适用于
React
,我很难找到错误的根本原因。
应用程序。vue
<template>
<div id="app">
<WalletConnectButton/>
</div>
</template>
<script>
import { ConnectionProvider, WalletProvider } from '@solana/wallet-adapter-vue';
import { WalletAdapterNetwork } from '@solana/wallet-adapter-base';
import {
getLedgerWallet,
getPhantomWallet,
getSlopeWallet,
getSolflareWallet,
getSolletExtensionWallet,
getSolletWallet,
getTorusWallet,
} from '@solana/wallet-adapter-wallets';
import {
WalletDisconnectButton,
WalletMultiButton,
WalletConnectButton
} from '@solana/wallet-adapter-vue-ui';
import { clusterApiUrl } from '@solana/web3.js';
export default {
name: "App",
components: {
}
};
</script>
<style>
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
代码沙盒
https://codesandbox.io/s/strange-oskar-j1byt?file=/src/App.vue:0-906