Vue web3 check

## Install

Version: 1.5.1 Updated: 12/02/2019

By: vol4

Downloads Last 30 Days: 141

Install

npm i vue-web3-check
yarn add vue-web3-check

CDNs

bundle.run: https://bundle.run/vue-web3-check

jsDelivr: https://cdn.jsdelivr.net/npm/vue-web3-check

unpkg: https://unpkg.com/vue-web3-check

Quick Start

Install

yarn add vue-web3-check
or
npm install vue-web3-check --save

Use the library

// main.js
import Vue from 'vue';
import * as Web3Check from 'vue-web3-check';

Vue.use(Web3Check, {
  Web3: typeof Web3 !== 'undefined' ? Web3 : null,
  networks: [1],
  requireAccount: true
});
// App.vue
<template>
  <web3Check>
    <template slot="load">
      <div>loader</div>
    </template>
    <template v-slot:error="props">
      <div>
        <p>{{props.error.type}}</p>
        <p>{{props.message}}</p>
      </div>
    </template>
    <div>web3 work</div>
  </web3Check>
</template>
Categories: Vue js
Tags: