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

Sidebar.vue 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template lang="pug">
  2. aside.sidebar.p-1.f-col.between
  3. h3 Messages
  4. .search
  5. input
  6. label search
  7. messages(:title="title" :users="users")
  8. .spacer.f-grow
  9. .temp-control-box.f-row.start.center
  10. p.t-up.p-0 current user
  11. input(v-model='mypid' style="width: 50px")
  12. button(@click="$emit('updatePid', mypid)").t-up.p-0 switch
  13. </template>
  14. <script>
  15. import messages from './Messages.vue'
  16. export default {
  17. components: { messages },
  18. data: () => ({
  19. title:'Messages from Matches',
  20. mypid: 45,
  21. users: [
  22. {
  23. name: 'Bob McRob',
  24. uid: 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. uid: 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. created() {
  37. this.$emit('updatePid', this.mypid)
  38. }
  39. }
  40. </script>
  41. <style lang="postcss">
  42. aside.sidebar
  43. background-color: yellow
  44. height: 100vh
  45. h3
  46. padding: 2vh
  47. .search
  48. display: flex
  49. flex-direction: row
  50. input
  51. border: 0
  52. </style>