test.vue 733 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <view class="">
  3. <text>123456</text>
  4. <poster ref="poster"></poster>
  5. <uqrcode class="canvas-hide" ref="uqrcode"></uqrcode>
  6. </view>
  7. </template>
  8. <script>
  9. import poster from "@/components/poster/poster.vue"
  10. import uqrcode from "@/components/uqrcode/uqrcode.vue"
  11. export default {
  12. components: {
  13. poster,
  14. uqrcode
  15. },
  16. data() {
  17. return {
  18. };
  19. },
  20. async onReady() {
  21. let res=await this.$refs.uqrcode.make({size: 150,text: '黄明潘'})
  22. this.$refs.poster.showCanvas(res.tempFilePath)
  23. },
  24. onLoad() {
  25. }
  26. };
  27. </script>
  28. <style lang="scss" scoped>
  29. .canvas-hide {
  30. position: fixed;
  31. right: 100vw;
  32. bottom: 100vh;
  33. z-index: -9999;
  34. opacity: 0;
  35. }
  36. </style>