diff --git a/components/miaoQRScanner.vue b/components/miaoQRScanner.vue
index bd60dc0..39e4645 100644
--- a/components/miaoQRScanner.vue
+++ b/components/miaoQRScanner.vue
@@ -21,12 +21,10 @@ let timer: any | undefined = undefined
const scannerResult = new Set()
-const getQRData = (videoFrame: VideoFrame): string | undefined => {
+const getQRData = (videoFrame: ImageBitmap ): string | undefined => {
const canvas = document.createElement('canvas')
// const canvas = testCtx.value!
- // @ts-ignore
canvas.width = videoFrame.width
- // @ts-ignore
canvas.height = videoFrame.height
// console.log(canvas.width, canvas.height)
const ctx = canvas.getContext('2d')
@@ -82,6 +80,7 @@ onMounted(async () => {
onBeforeUnmount(() => {
stream?.getTracks().forEach(track => track.stop())
+ clearInterval(timer)
})
diff --git a/components/tools/miaoQRGBCode.vue b/components/tools/miaoQRGBCode.vue
new file mode 100644
index 0000000..704a371
--- /dev/null
+++ b/components/tools/miaoQRGBCode.vue
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/index.vue b/pages/index.vue
index 5b5c147..98e266e 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -148,6 +148,16 @@ const PageContent = reactive([
}
]
},
+ {
+ name: 'QRGB',
+ description: '把三个二维码叠在一起,真是创创又新新啊',
+ nuxtLinks: [
+ {
+ name: 'link',
+ to: `/tools/QRGB`
+ }
+ ]
+ },
]
}, {
subTitle: '学习资料',
diff --git a/pages/tools/QRGB.vue b/pages/tools/QRGB.vue
new file mode 100644
index 0000000..a70119a
--- /dev/null
+++ b/pages/tools/QRGB.vue
@@ -0,0 +1,15 @@
+
+
+ code
+ scanner
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/tools/QRGB/code.vue b/pages/tools/QRGB/code.vue
new file mode 100644
index 0000000..a848d2b
--- /dev/null
+++ b/pages/tools/QRGB/code.vue
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/tools/QRGB/scanner.vue b/pages/tools/QRGB/scanner.vue
new file mode 100644
index 0000000..f040e58
--- /dev/null
+++ b/pages/tools/QRGB/scanner.vue
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
\ No newline at end of file