link.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <div class="tag-layer" @click.stop>
  3. <img class="close" @click.stop="close"
  4. :src="require('@/assets/images/icon/material_preview_close@2x.png')" alt="" />
  5. <div class="linkcon">
  6. <div class="linkbody">
  7. <iframe :src="link" frameborder="0"></iframe>
  8. </div>
  9. </div>
  10. </div>
  11. </template>
  12. <script setup>
  13. import { reactive, defineEmits, onBeforeMount, onMounted, ref, watchEffect, computed, watch, nextTick } from "vue";
  14. import { useStore } from "vuex";
  15. const store = useStore();
  16. const metadata = computed(() => store.getters["scene/metadata"]);
  17. const link = computed(() => {
  18. return metadata.value.customButton ? metadata.value.customButton.find(item => item.name == '链接').value : false
  19. });
  20. const close = () => {
  21. store.commit("functions/setShowLink", false);
  22. };
  23. </script>
  24. <style lang="scss" scoped>
  25. .tag-layer {
  26. width: 100vw;
  27. height: 100vh;
  28. z-index: 10000;
  29. top: 0;
  30. position: fixed;
  31. left: 0;
  32. background-color: rgba(0, 0, 0, 0.6);
  33. backdrop-filter: blur(10px);
  34. .linkcon {
  35. display: flex;
  36. align-items: center;
  37. justify-content: center;
  38. height: 100%;
  39. width: 100%;
  40. .linkbody {
  41. width: 90%;
  42. height: 90%;
  43. background: rgba(255,255,255,1);
  44. border-radius: 2px;
  45. color: #fff;
  46. >iframe{
  47. width: 100%;
  48. height: 100%;
  49. }
  50. }
  51. .title {
  52. position: absolute;
  53. left: 20px;
  54. top: 20px;
  55. height: 36px;
  56. line-height: 36px;
  57. padding: 0 30px;
  58. background: rgba(0, 0, 0, 0.6);
  59. border-radius: 20px;
  60. color: #fff;
  61. font-size: 14px;
  62. >i {
  63. margin-right: 4px;
  64. }
  65. }
  66. }
  67. .close {
  68. width: 36px;
  69. height: 36px;
  70. right: 30px;
  71. top: 30px;
  72. position: absolute;
  73. cursor: pointer;
  74. z-index: 999;
  75. }
  76. }
  77. </style>