diff --git a/dashboard/package.json b/dashboard/package.json index d8ca5f01..b097d9b7 100755 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -27,7 +27,7 @@ "mockjs2": "1.0.8", "moment": "^2.24.0", "nprogress": "^0.2.0", - "qrcodejs2": "^0.0.2", + "vue-qrcode2": "^0.0.1", "quill": "^1.3.7", "store": "^2.0.12", "v-distpicker": "^1.2.12", diff --git a/dashboard/src/components/qrcode/index.js b/dashboard/src/components/qrcode/index.js new file mode 100644 index 00000000..e3da2899 --- /dev/null +++ b/dashboard/src/components/qrcode/index.js @@ -0,0 +1,15 @@ +import view from './index.vue' +import Vue from 'vue' + +const Constructor = Vue.extend(view) + +export default class { + constructor (el, options) { + const instance = new Constructor({ + data: options + }) + instance.id = '_qrcode_' + Math.random() + instance.$mount() + el.appendChild(instance.$el) + } +} diff --git a/dashboard/src/components/qrcode/index.vue b/dashboard/src/components/qrcode/index.vue new file mode 100644 index 00000000..e3a558da --- /dev/null +++ b/dashboard/src/components/qrcode/index.vue @@ -0,0 +1,24 @@ + + + diff --git a/dashboard/src/views/lottery/components/share.vue b/dashboard/src/views/lottery/components/share.vue index a758c8b9..3d9fb981 100755 --- a/dashboard/src/views/lottery/components/share.vue +++ b/dashboard/src/views/lottery/components/share.vue @@ -64,7 +64,7 @@