
<template>
  <div class="bottom-message-popover">
    <!--    <el-popover-->
    <!--      v-model="visible"-->
    <!--      placement="bottom"-->
    <!--      width="200"-->
    <!--    >-->
    <!--      <p>{{ message.title }}</p>-->
    <!--      <p>{{ message.content }}</p>-->
    <!--      <span slot="reference">hahah</span>-->
    <!--    </el-popover>-->
  </div>

</template>
<script>
import { DEFINE } from '@/utils/dict/config'

export default {
  name: 'MessagePopover',
  data() {
    return {
      visible: false,
      message: {
        title: null,
        content: null
      }
    }
  },
  created() {
    this.$bus.on(DEFINE.ON_PROCESS_MSG, (data) => {
      this.$notify({
        title: data.title,
        message: data.content && data.content.length > 16 ? data.content.slice(0, 16) + '...' : data.content,
        position: 'bottom-right',
        duration: 0
      })
      // this.visible = true
      // this.message = data
      // setTimeout(() => {
      //   this.visible = false
      // }, 3000)
    })
  }
}
</script>
<style scoped lang="scss">
.bottom-message-popover {
  position: absolute;
  bottom: 20px;
  right: 0;
}
</style>
