From 6772eb2263e025e0af5d1bc45df7bdd3e8604076 Mon Sep 17 00:00:00 2001 From: zhenghongxing <1219539426@qq.com> Date: Fri, 13 Aug 2021 16:21:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E8=8A=B1=E5=B1=8F=E6=97=A0=E6=B3=95=E6=89=AB=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/package.json | 2 +- dashboard/src/components/qrcode/index.js | 15 ++++++++++++ dashboard/src/components/qrcode/index.vue | 24 +++++++++++++++++++ .../src/views/lottery/components/share.vue | 2 +- .../src/views/radar/components/share.vue | 2 +- dashboard/src/views/roomClockIn/index.vue | 2 +- .../roomFission/components/list/details.vue | 2 +- .../roomInfinitePull/components/details.vue | 2 +- .../src/views/roomInfinitePull/index.vue | 2 +- .../src/views/shopCode/employeeIndex.vue | 2 +- .../views/workFission/components/details.vue | 2 +- 11 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 dashboard/src/components/qrcode/index.js create mode 100644 dashboard/src/components/qrcode/index.vue 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 @@