Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

SideBar.vue 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template lang="pug">
  2. aside.sidebar.p-1.f-col.between
  3. h3 Profile: {{ pid }}
  4. button(@click="$emit('hide')") hide
  5. messages(:title="title" :users="users")
  6. .spacer.f-grow
  7. .temp-control-box.f-row.start.center
  8. input(v-model='switchToPID' style="width: 50px")
  9. button(@click="$emit('updatePid', switchToPID)").t-up.p-0 switch profile
  10. </template>
  11. <script>
  12. import messages from './Messages.vue'
  13. export default {
  14. components: { messages },
  15. props: {
  16. pid: {
  17. required: true,
  18. type: Number
  19. }
  20. },
  21. data: () => ({
  22. title:'Messages from Matches',
  23. switchToPID: null,
  24. users: [
  25. {
  26. name: 'Bob McRob',
  27. uid: 111,
  28. avatar: 'https://hips.hearstapps.com/hmg-prod.s3.amazonaws.com/images/newborn-baby-boy-sleeping-peacefully-wearing-knit-royalty-free-image-1589459736.jpg?crop=0.669xw:1.00xh;0.228xw,0&resize=640:*',
  29. metadata: { rawMetadata: 'howdy howdy howdy' },
  30. },
  31. {
  32. name: 'Rob Bebob',
  33. uid: 112,
  34. avatar: 'https://hips.hearstapps.com/hmg-prod.s3.amazonaws.com/images/newborn-baby-boy-sleeping-peacefully-wearing-knit-royalty-free-image-1589459736.jpg?crop=0.669xw:1.00xh;0.228xw,0&resize=640:*',
  35. metadata: { rawMetadata: 'this is the last message' },
  36. },
  37. ],
  38. }),
  39. mounted() {
  40. // Set the form to display the default pid set in Home.vue
  41. this.switchToPID = this.pid
  42. }
  43. }
  44. </script>
  45. <style lang="postcss">
  46. aside.sidebar
  47. background-color: yellow
  48. height: 100vh
  49. h3
  50. padding: 2vh
  51. .search
  52. display: flex
  53. flex-direction: row
  54. input
  55. border: 0
  56. </style>