<template>
    <dl data-type="2" :class='[(chatMen ? "chat-right" : "chat-left")]'>
        <dt>
            <a>
                <img :src='chatImg' class="c-images-cycle">
            </a>
        </dt>
        <div class="c-content">
            <span class="c-f12 name">{{chatObj.sender_name}}</span>
            <div class="c-msg">
                <dd class="preview-img">
                    <span class="yidu yidu1" v-show="chatMen && chatJudge && chatJudge > chatObj.timestamp">已读</span>
                    <div>
                        <a :href='photoSrc(chatObj.content)' class="img-link">
                            <img id="img" :class='[(chatMen ? "video-img-right" : "video-img-left")]' class="min" :src='photoSrc(chatObj.content)'>
                        </a>
                    </div>
                    <i :class='[(chatMen ? "jianjiao-icon-right" : "jianjiao-icon-left")]' ></i>
                </dd>
            </div>
        </div>
    </dl>
</template>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "../../assets/sass/message-chat";
@import "../../assets/js/vendor/gallery/css/blueimp-gallery.css";
</style>
<script>
import common from '../../assets/js/common'

export default {
    props: ['chatMen', 'chatJudge', 'chatObj', 'chatImg'],
    components: {},
    mounted() {
    },
    data() {
        return {}
    },
    methods: {
        photoSrc(str) {
            return common.setImgUrl(str)
        }
    }
}
</script>
