button(@click="editNews(n)") {{ st.tr["Edit"] }}
button(@click="deleteNews(n)") {{ st.tr["Delete"] }}
p(v-html="parseHtml(n.content)")
- button(
+ button#loadMoreBtn(
v-if="hasMore"
@click="loadMore()"
)
},
created: function() {
ajax("/news", "GET", { cursor: this.cursor }, res => {
- this.newsList = res.newsList.sort((n1, n2) => n1.added - n2.added);
+ this.newsList = res.newsList.sort((n1, n2) => n2.added - n1.added);
const L = res.newsList.length;
if (L > 0) this.cursor = this.newsList[0].id;
});
#writeNews
padding-top: 50px
-button#writeNewsBtn
+button#writeNewsBtn, button#loadMoreBtn
margin-top: 0
margin-bottom: 0