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.

msgCard.js 955B

12345678910111213141516171819202122232425262728
  1. Vue.component('MsgCard', {
  2. template: `<div class="om-card card">
  3. <h6 class="msg-head">
  4. <b>{{ msg.subject }}</b>
  5. <img src="favicon.ico" width=20px height=20px>
  6. </h6>
  7. {{ msg.message }}<br><br>
  8. <a href="#">{{ msg.tag }}</a></p>
  9. <div class="om-card-footer"> <div class="om-user-line">
  10. <i class="material-icons">account_circle</i>
  11. Erstellt von {{ msg.user }}</div>
  12. <i class="material-icons" @click="myFilter()" v-if="!isActive">bookmark_border</i>
  13. <i class="material-icons" @click="myFilter()" v-else="isActive">bookmark</i>
  14. </div></div>`,
  15. props: ['msg'],
  16. data: function () {
  17. return {
  18. isActive: false,
  19. };
  20. },
  21. methods: {
  22. myFilter: function() {
  23. this.isActive = !this.isActive;
  24. },
  25. }
  26. });