Created
September 23, 2023 08:46
-
-
Save 9kopb/de04c9aa9f96aa52c50bda7c13e8b877 to your computer and use it in GitHub Desktop.
wvRypVP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="app"> | |
<qrcode-stream @detect="onDetect" @error="onError"></qrcode-stream> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { createApp, ref } = Vue | |
Vue.createApp({ | |
setup() { | |
const message = ref('Hello vue!') | |
return { | |
message | |
} | |
}, | |
methods: { | |
onDetect(detectedCodes) { | |
console.log(detectedCodes) | |
}, | |
onError(error) { | |
console.error(error) | |
} | |
} | |
}).mount('#app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://unpkg.com/vue@3.3.4/dist/vue.global.js"></script> | |
<script src="https://unpkg.com/vue-qrcode-reader@5.3.0/dist/vue-qrcode-reader.umd.cjs"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#app { | |
width: 600px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment