<template>
    <div :ref="ref" class="msg-container-bdx1">
        <p class="msg-title-xxb1">
            <img src="../img/ic_tips.png" alt="">
            {{title}}
            <i @click="close('msg-short-log')" class="el-icon-close"></i>
        </p>
        <div class="msg-tips-xxb1">
            <div class="msg-text-xxb1">
                {{text}}
            </div>
            <p class="detail-xxb1" @click="aas">查看详情</p>
            <p class="msg-time-info-xxb1"><span>{{time}}</span>  <span>{{source}}</span></p>
        </div>
    </div>
</template>

<script>
export default {
    props: {

    },
    components: {

    },
    data() {
        return {
            title:'',
            text:'',
            time:'',
            source:'',
            ref:''
        };
    },
    watch: {

    },
    computed: {

    },
    created() {

    },
    mounted() {
        console.log(ref,right);
        appendToBody(this.ref,'20px')
    },
    methods: {
        appendToBody(ref,right){
            console.log(ref,right);
            if(right){
                this.$refs[ref].style.right = right
            }
        },
    },
};
</script>

<style scoped>
.msg-container-bdx1{
    width: 400px;
	background-color: #ffffff;
	box-shadow: 0px 4px 12px 0px 
		rgba(18, 30, 63, 0.1);
	border-radius: 4px;
	border: solid 1px #e6e9ef;
    padding: 17px;
    position: fixed;
    z-index: 9999;
    top: 100px;
    right: -500px;
    transition: all 0.5s;
}
.el-icon-close{
    float: right;
    cursor: pointer;
}
.msg-title-xxb1{
    font-size: 16px;
	font-weight: 600;
	color: #202531;
    margin-bottom: 10px;
}
.msg-title-xxb1 img{
    vertical-align: -5px;
    margin-right: 12px;
}
.msg-tips-xxb1{
    margin-left: 40px;
    font-size: 14px;
}
.msg-text-xxb1{
  text-overflow: -o-ellipsis-lastline;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  font-size: 14px;
  -webkit-box-orient: vertical;
}
.detail-xxb1{
    text-align: right;
    color: #3759be;
    cursor: pointer;
    font-size: 14px;
    margin: 15px 0;
}
.msg-time-info-xxb1{
    display: flex;
    justify-content: space-between;
    font-size: 14px;
	color: #909bb6;
}
</style>
