40 <div class="warp-child bg-gray">
41 <section class="header bg-header">
42 <i class="iconfont icon-back" @click="close"></i>
43 <p>{{ $t('main.receive') }}</p>
47 <div id="qrcode"></div>
48 <p>{{$t('receive.address')}}</p>
49 <span class="color-black font-medium address-text" :title="addressTitle" :data-clipboard-text="addr">{{addr}}</span>
51 <div v-if="netType === 'vapor'" class="vp-warning color-red"> {{$t('receive.vpWarning')}}</div>
52 <div class="footer color-grey"> {{$t('receive.tips')}}</div>
57 import QRCode from "qrcodejs2";
58 import ClipboardJS from "clipboard";
59 import { mapGetters } from 'vuex'
66 clipboard: new ClipboardJS(".address-text"),
67 addressTitle: this.$t("main.copy")
81 this.clipboard.on("success", e => {
84 header: this.$t("dialog.header"),
85 body: this.$t("dialog.copy.success")
88 this.clipboard.on("error", e => {
90 header: this.$t("dialog.header"),
91 body: this.$t("dialog.copy.fail")
97 if (this.currentAccount.address != undefined) {
98 if(this.netType === 'vapor'){
99 this.addr = this.currentAccount.vpAddress;
101 this.addr = this.currentAccount.address;
103 this.qrcode = new QRCode( "qrcode", {
107 colorDark: "#000000",
108 colorLight: "#ffffff",
109 correctLevel: QRCode.CorrectLevel.H
112 this.setupClipboard();
115 this.clipboard.destroy();