wip
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<slot name="head"></slot>
|
||||
<slot></slot>
|
||||
<template v-for="(post, i) in _posts">
|
||||
<x-post :post="post" :key="post.id"/>
|
||||
<x-post :post="post" :key="post.id" @update:post="onPostUpdated(i, $event)"/>
|
||||
<p class="date" v-if="i != posts.length - 1 && post._date != _posts[i + 1]._date">
|
||||
<span>%fa:angle-up%{{ post._datetext }}</span>
|
||||
<span>%fa:angle-down%{{ _posts[i + 1]._datetext }}</span>
|
||||
@@ -39,6 +39,11 @@ export default Vue.extend({
|
||||
return post;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onPostUpdated(i, post) {
|
||||
Vue.set((this as any).posts, i, post);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user