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

SideBar.vue 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template lang="pug">
  2. aside.sidebar.p-1.f-col
  3. .temp-control-box.f-row.start.center
  4. input(v-model="switchToPID")
  5. button(@click="$emit('updatePid', switchToPID)").t-up.p-0 switch profile
  6. Messages(:matches="matches" :pid="pid")
  7. .spacer.f-grow
  8. </template>
  9. <script>
  10. import Messages from './Messages.vue'
  11. export default {
  12. components: { Messages },
  13. props: {
  14. pid: {
  15. required: true,
  16. type: Number
  17. }
  18. },
  19. data: () => ({
  20. switchToPID: null,
  21. matches: [
  22. {
  23. name: 'Bob McRob',
  24. profile_id: 111,
  25. 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:*',
  26. metadata: { rawMetadata: 'howdy howdy howdy' },
  27. },
  28. {
  29. name: 'Rob Bebob',
  30. profile_id: 112,
  31. 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:*',
  32. metadata: { rawMetadata: 'this is the last message' },
  33. },
  34. ],
  35. }),
  36. mounted() {
  37. // Set the form to display the default pid set in Home.vue
  38. this.switchToPID = this.pid
  39. }
  40. }
  41. </script>
  42. <style lang="postcss">
  43. aside.sidebar
  44. background-color: yellow
  45. height: 100vh
  46. h3
  47. padding: 2vh
  48. .search
  49. display: flex
  50. flex-direction: row
  51. input
  52. border: 0
  53. </style>