conversation-profile.vue 980 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <div class="conversation-profile-wrapper">
  3. <user-profile
  4. v-if="currentConversation.type === 1"
  5. :userProfile="currentConversation.userProfile"
  6. />
  7. <group-profile
  8. v-else-if="currentConversation.type === 3"
  9. :groupProfile="currentConversation.groupProfile"
  10. />
  11. </div>
  12. </template>
  13. <script>
  14. import { mapState } from 'vuex'
  15. import GroupProfile from './conversationProfile/group-profile.vue'
  16. import UserProfile from './conversationProfile/user-profile.vue'
  17. export default {
  18. name: 'ConversationProfile',
  19. components: {
  20. GroupProfile,
  21. UserProfile
  22. },
  23. data() {
  24. return {}
  25. },
  26. computed: {
  27. ...mapState({
  28. currentConversation: state => state.conversation.currentConversation
  29. })
  30. }
  31. }
  32. </script>
  33. <style lang="stylus" scoped>
  34. .conversation-profile-wrapper
  35. background-color $white
  36. height 100%
  37. overflow-y scroll
  38. /* 设置滚动条的样式 */
  39. ::-webkit-scrollbar {
  40. width: 0px;
  41. height: 0px;
  42. }
  43. </style>