<template>
  <div class="txtcon">
    <div class="title">
      <i class="iconfont icon-material_text"/>
      {{currentTag.hotspotTitle}} 
    </div>

    <div class="txtbody" v-html="currentTag.textarea">
    </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 currentTag = computed(() => store.getters['tags/currentTag'])
  
</script>

<style lang="scss" scoped>
.txtcon{
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 100%;
  width: 100%;
  padding-top: 70px;
  
  .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: 1.5;
    :deep(p) {
      line-height: 24px;
    }
  }
  .title{
    position: absolute;
    left: 20px;
    top: 20px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 16px;
    background: rgba(0,0,0,0.6);
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    z-index: 999;
    >i{
      margin-right: 4px;
    }
  }
}
</style>