index.vue 535 B

12345678910111213141516171819202122232425262728293031
  1. <script setup lang="ts">
  2. const sceneId = ref("");
  3. const route = useRoute();
  4. onMounted(() => {
  5. sceneId.value = route.query.code;
  6. console.log(sceneId.value);
  7. });
  8. </script>
  9. <template>
  10. <div class="scene">
  11. <iframe
  12. class="irf"
  13. :src="`https://www.4dmodel.com/SuperTwo/index.html?m=${sceneId}`"
  14. frameborder="0"
  15. ></iframe>
  16. </div>
  17. </template>
  18. <style lang="less" scoped>
  19. .scene {
  20. width: 100%;
  21. height: 100vh;
  22. height: calc(var(--vh, 1vh) * 100);
  23. .irf {
  24. width: 100%;
  25. height: 100%;
  26. }
  27. }
  28. </style>