Item.vue 868 B

123456789101112131415161718192021222324252627282930
  1. <template>
  2. <li class="detail-comments__item">
  3. <div class="detail-comments-item">
  4. <div class="detail-comments-item__text">
  5. <span class="response-user" v-if="commentsItem.response_user">{{ commentsItem.response_user }}, </span>
  6. <span class="text" v-html="commentsItem.text"></span>
  7. </div>
  8. <span class="comment-date"> {{ $convertDate(commentsItem.create) }}, </span><span class="comment-user">{{ commentsItem.user_name }}</span><span class="response-comment" @click="response(commentsItem.user_id, commentsItem.user_name)">Ответить</span>
  9. </div>
  10. </li>
  11. </template>
  12. <script>
  13. export default {
  14. props: {
  15. commentsItem: {
  16. type: Object,
  17. },
  18. },
  19. methods: {
  20. response(userId, userName){
  21. this.$emit('commentResponse', {user_id: userId, user_name: userName});
  22. }
  23. }
  24. };
  25. </script>
  26. <style>
  27. </style>