index.vue 705 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <view class="container">
  3. <!-- <web-view :src="pdfUrl"></web-view> -->
  4. <iframe :src="pdfUrl" class="iframe-area" frameborder="0"></iframe>
  5. </view>
  6. </template>
  7. <script setup>
  8. import {
  9. ref
  10. } from 'vue'
  11. import {
  12. onLoad,
  13. } from "@dcloudio/uni-app"
  14. let pdfUrl = ref(null)
  15. onLoad((Option) => {
  16. console.log(Option);
  17. pdfUrl.value = Option.filePath
  18. })
  19. </script>
  20. <style lang="scss" scoped>
  21. page {
  22. height: 100%;
  23. background-color: #EAF0FA;
  24. }
  25. .container {
  26. width: 100%;
  27. height: 100%;
  28. margin: 0 auto;
  29. background: linear-gradient(180deg, #1869F6 0%, #EAF0FA 64%, #EAF0FA 100%);
  30. .iframe-area {
  31. // margin-top: 10%;
  32. width: 100%;
  33. height: 100%;
  34. }
  35. }
  36. </style>