1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- Vue.component('msg-item', {
- template: `<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>`,
- props: ['subject', 'message', 'tag', 'user']
- })
-
- new Vue({
- el: '#message-list',
- data: {
- messages: [
- {
- id: 1,
- subject: 'Betreff_1',
- 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_2',
- 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_3',
- 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>`
- })
-
- */
|