<template>
  <!-- <div> -->
      <el-tooltip :placement="direction">
        <pre slot="content">{{preHtml}}</pre>
        <slot></slot>
      </el-tooltip>
  <!-- </div> -->
</template>

<script>
export default {
    name:'Tooltip',
    props:{
        preHtml:{
            type: String,
            default: '',
        },
        direction:{
          type: String,
          default: 'top',
        }
    },
  data() {
    return {

    };
  },
  watch: {

  },
  created() {
  },
  mounted() {},
  methods: {

  }
};
</script>

<style scoped="scoped" lang="scss">
  pre{
    margin: 0 !important;
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
    word-wrap: break-word;
    max-width: 600px;
    color: #fff;
  }
</style>
