text.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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="txtcon">
  6. <div class="txtbody" v-html="metadata.description">
  7. </div>
  8. </div>
  9. </div>
  10. </template>
  11. <script setup>
  12. import { reactive, defineEmits, onBeforeMount, onMounted, ref, watchEffect, computed, watch, nextTick } from "vue";
  13. import { useStore } from "vuex";
  14. const store = useStore();
  15. const metadata = computed(() => store.getters["scene/metadata"]);
  16. const close = () => {
  17. store.commit("functions/setShowIntroduce", false);
  18. };
  19. </script>
  20. <style lang="scss" scoped>
  21. .tag-layer {
  22. width: 100vw;
  23. height: 100vh;
  24. z-index: 10000;
  25. top: 0;
  26. position: fixed;
  27. left: 0;
  28. background-color: rgba(0, 0, 0, 0.6);
  29. backdrop-filter: blur(10px);
  30. .txtcon {
  31. display: flex;
  32. align-items: flex-start;
  33. justify-content: center;
  34. height: 100%;
  35. width: 100%;
  36. padding-top: 70px;
  37. :deep(p) {
  38. line-height: 24px;
  39. }
  40. .txtbody {
  41. width: 744px;
  42. background: rgba(0, 0, 0, 0.6);
  43. border-radius: 10px;
  44. font-size: 14px;
  45. color: #fff;
  46. padding: 30px;
  47. max-height: calc(100vh - 100px);
  48. overflow-y: auto;
  49. }
  50. .title {
  51. position: absolute;
  52. left: 20px;
  53. top: 20px;
  54. height: 36px;
  55. line-height: 36px;
  56. padding: 0 30px;
  57. background: rgba(0, 0, 0, 0.6);
  58. border-radius: 20px;
  59. color: #fff;
  60. font-size: 14px;
  61. >i {
  62. margin-right: 4px;
  63. }
  64. }
  65. }
  66. .close {
  67. width: 36px;
  68. height: 36px;
  69. right: 30px;
  70. top: 30px;
  71. position: absolute;
  72. cursor: pointer;
  73. z-index: 999;
  74. }
  75. }
  76. </style>