123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- const ('Home', {
- template: ` <div id="message-list" v-for="(msg, index) in messages" :key="msg.id" :subject="msg.subject" :message="msg.message" :tag="msg.tag" :user="msg.user">
- <div class="om-card card">
- <h6 class="msg-head">
- <b>{{ subject }}</b>
- <img src="favicon.ico" width=20px height=20px>
- </h6>
- {{ message }}<br><br>
- <a href="#">{{ tag }}</a></p>
- <div class="om-user-line">
- <i class="material-icons">account_circle</i>
- Erstellt von {{ user }}
- </div></div>`,
- props: ['subject', 'message', 'tag', 'user']
- })
-
- new Vue({
- el: '#message-list',
- data: {
- messages: [
- {
- id: 1,
- subject: 'Betreff',
- message: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam.',
- tag: '#efi #bme #semester',
- user: 'user_1'
- },
- {
- id: 2,
- subject: 'Betreff',
- 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.',
- tag: '#efi #fachschaft',
- user: 'user_2'
- },
- {
- id: 3,
- subject: 'Betreff',
- message: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam.',
- tag: '#efi #bei #wichtig',
- user: 'user_3'
- }
- ],
- },
- })
-
-
- /* First try of vue-componetn -> does not work
- Vue.component('home', {
- data: function () {
- return {
- }
- },
- template:
- `<div id="sample">
- <div v-for="msgs in private.messages">
- <div class="om-card card" v-for="elements in msgs.message">
- <h6 class="msg-head">
- <b>{{elements.subject}}</b>
- <img src="favicon.ico" width=20px height=20px>
- </h6>
- <p>{{elements.msg}}<br>
- <a href="#">{{elements.tags}}</a></p>
- <div class="om-user-line">
- <i class="material-icons">account_circle</i>
- Erstellt von {{elements.user}}
- </div>
- </div>
- </div>
- </div>`
- })
-
- */
|