2018-12-05 16:35:54 +01:00
|
|
|
const HomeRouter = {
|
2018-12-19 18:18:42 +01:00
|
|
|
template: `
|
|
|
|
<div id="om-msg-cards">
|
2018-12-05 16:35:54 +01:00
|
|
|
<MsgCard
|
2018-12-19 18:18:42 +01:00
|
|
|
v-for="id in messagelist"
|
|
|
|
:key="id"
|
|
|
|
:msg="messages[id] || {}"
|
2018-12-05 16:35:54 +01:00
|
|
|
></MsgCard>
|
|
|
|
</div>`,
|
2018-12-19 18:18:42 +01:00
|
|
|
data: function () {
|
|
|
|
return {
|
|
|
|
messagelist: _messagelist,
|
|
|
|
messages: _messages,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
2018-12-12 15:56:09 +01:00
|
|
|
refresh_messages: function () {
|
2018-12-19 18:18:42 +01:00
|
|
|
_messages.push({ //////// alt
|
|
|
|
id: 42,
|
|
|
|
subject: "xxx",
|
|
|
|
message: "warum habt ihr auch so viel",
|
|
|
|
user: "nobody",
|
|
|
|
tags: "foo"
|
|
|
|
});
|
2018-12-12 15:56:09 +01:00
|
|
|
},
|
2018-12-19 18:18:42 +01:00
|
|
|
},
|
|
|
|
|
2018-12-12 15:56:09 +01:00
|
|
|
/*mounted: function() {
|
|
|
|
this.refresh_messages();
|
|
|
|
}*/
|
2018-12-05 16:35:54 +01:00
|
|
|
};
|