<template>
  <div class="tag-layer" @click.stop>
    <img class="close" @click.stop="close"
      :src="require('@/assets/images/icon/material_preview_close@2x.png')" alt="" />

    <div class="txtcon">
      <div class="txtbody" v-html="metadata.description">
      </div>
    </div>
  </div>

</template>

<script setup>
import { reactive, defineEmits, onBeforeMount, onMounted, ref, watchEffect, computed, watch, nextTick } from "vue";
import { useStore } from "vuex";
const store = useStore();

const metadata = computed(() => store.getters["scene/metadata"]);

const close = () => {
  store.commit("functions/setShowIntroduce", false);
};

</script>

<style lang="scss" scoped>

.tag-layer {
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  top: 0;
  position: fixed;
  left: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);

  .txtcon {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 100%;
  width: 100%;
  padding-top: 70px;
  :deep(p) {
    line-height: 24px;
  }

  .txtbody {
    width: 744px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    font-size: 14px;
    color: #fff;
    padding: 30px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    line-height: 24px;
  }

  .title {
    position: absolute;
    left: 20px;
    top: 20px;
    height: 36px;
    line-height: 0;
    padding: 0 30px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    color: #fff;
    font-size: 14px;

    >i {
      margin-right: 4px;
    }
  }
}
  .close {
    width: 36px;
    height: 36px;
    right: 30px;
    top: 20px;
    position: absolute;
    cursor: pointer;
    z-index: 999;
  }
}

</style>