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 981B

1234567891011121314151617181920212223242526272829
  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 v-for="tag in msg.tag" href="#">#{{ tag }} </a>
  9. </p>
  10. <div class="om-card-footer"> <div class="om-user-line">
  11. <i class="material-icons">account_circle</i>
  12. Erstellt von {{ msg.user }}</div>
  13. <i class="material-icons" @click="myFilter()" v-if="!isActive">bookmark_border</i>
  14. <i class="material-icons" @click="myFilter()" v-else="isActive">bookmark</i>
  15. </div></div>`,
  16. props: ['msg'],
  17. data: function () {
  18. return {
  19. isActive: false,
  20. };
  21. },
  22. methods: {
  23. myFilter: function() {
  24. this.isActive = !this.isActive;
  25. },
  26. }
  27. });