<template>
  <div>
    <a-modal
      :footer="null"
      :title="profile.title"
      :visible="showProfile"
      @cancel="handleCancel"
      @ok="handleCancel"
    >
      <p v-if="profile.description">
        <span class="font-16 white line-height-36" v-dompurify-html="profile.description"></span>
      </p>
      <p v-else>暂无介绍</p>
    </a-modal>
  </div>
</template>

<script>
import { mapState, mapMutations, mapActions } from 'vuex';

export default {
  props: {
    showProfile: {
      type: Boolean,
      default: false,
    },
  },

  data() {
    return { ModalText: 'Content of the modal' };
  },

  computed: mapState('home', ['profile']),

  methods: {
    handleCancel(e) {
      this.$emit('closeProfile');
    },
  },
};
</script>
