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 1.0KB

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