Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

home.js 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. _messages = [
  2. {
  3. id: 1,
  4. subject: 'Betreff',
  5. message: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam.',
  6. tag: '#efi #bme #semester',
  7. user: 'user_1'
  8. },
  9. {
  10. id: 2,
  11. subject: 'Betreff',
  12. message: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.',
  13. tag: '#efi #fachschaft',
  14. user: 'user_2'
  15. },
  16. {
  17. id: 3,
  18. subject: 'Betreff',
  19. message: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam.',
  20. tag: '#efi #bei #wichtig',
  21. user: 'user_3'
  22. },
  23. ];
  24. Vue.component('MsgCard', {
  25. template: `<div class="om-card card">
  26. <h6 class="msg-head">
  27. <b>{{ msg.subject }}</b>
  28. <img src="favicon.ico" width=20px height=20px>
  29. </h6>
  30. {{ msg.message }}<br><br>
  31. <a href="#">{{ msg.tag }}</a></p>
  32. <div class="om-user-line">
  33. <i class="material-icons">account_circle</i>
  34. Erstellt von {{ msg.user }}
  35. </div></div>`,
  36. props: ['msg']
  37. });
  38. const HomeRouter = {
  39. template: `
  40. <div>
  41. <MsgCard
  42. v-for="(msg, index) in messages"
  43. :key="msg.id"
  44. :msg="msg"
  45. ></MsgCard>
  46. </div>`,
  47. data: function () {
  48. return { messages: _messages };
  49. },
  50. methods: {
  51. },
  52. };