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.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* First try of vue-componetn -> does not work
  2. Vue.component('home', {
  3. data: function () {
  4. return {
  5. }
  6. },
  7. template:
  8. `<div id="sample">
  9. <div v-for="msgs in private.messages">
  10. <div class="om-card card" v-for="elements in msgs.message">
  11. <h6 class="msg-head">
  12. <b>{{elements.subject}}</b>
  13. <img src="favicon.ico" width=20px height=20px>
  14. </h6>
  15. <p>{{elements.msg}}<br>
  16. <a href="#">{{elements.tags}}</a></p>
  17. <div class="om-user-line">
  18. <i class="material-icons">account_circle</i>
  19. Erstellt von {{elements.user}}
  20. </div>
  21. </div>
  22. </div>
  23. </div>`
  24. })
  25. new Vue({
  26. el: '#sample',
  27. data: {
  28. private: {
  29. messages : [
  30. {
  31. message : [
  32. {subject : 'Betreff_1'},
  33. { msg : 'Nachricht_1' },
  34. { tags : '#tag_1' },
  35. { user : 'user_1' }
  36. ]
  37. },
  38. {
  39. message : [
  40. {subject : 'Betreff_2'},
  41. { msg : 'Nachricht_2' },
  42. { tags : '#tag_2' },
  43. { user : 'user_2' }
  44. ]
  45. },
  46. {
  47. message : [
  48. {subject : 'Betreff_3'},
  49. { msg : 'Nachricht_3' },
  50. { tags : '#tag_3' },
  51. { user : 'user_3' }
  52. ]
  53. }
  54. ]
  55. }
  56. }
  57. })
  58. */