style: 优化刷赞扫码的样式

This commit is contained in:
539943419 committed 2025-01-21 14:27:46 +08:00
1 parent 741a05c9b6
commit f3af29f04c
5 files changed
+235 -7

No files matched your search

+4 -3
View File
@@ -1,7 +1,7 @@
<template>
<div class="qr-scanner-wrapper">
<video ref="scannerDisplayRef" autoplay></video>
<canvas ref="testCtx" v-show="false"></canvas>
<video ref="scannerDisplayRef"></video>
<!-- <canvas ref="testCtx" v-show="false"></canvas> -->
</div>
</template>
@@ -13,7 +13,7 @@ const emit = defineEmits<{
}>()
const scannerDisplayRef = ref<HTMLVideoElement>()
const testCtx = ref<HTMLCanvasElement>()
// const testCtx = ref<HTMLCanvasElement>()
const result = reactive<string[]>([])
let stream: MediaStream | null = null
@@ -75,6 +75,7 @@ onMounted(async () => {
}
if (stream) {
scannerDisplayRef.value!.srcObject = stream
scannerDisplayRef.value!.play()
const videoTrack = stream.getVideoTracks()[0]
handleVideoTrack(videoTrack)
}