this.loadPosts(this.ownerId)
.then(res => { this.posts = res; })
.catch(err => alert('Что-то пошло не так: ' + err));
<div v-for="image in dataOnPage">
<img :src="image.path" :alt="image.name" :title="image.name">
</div>
<button @click="currentPage > 1 && currentPage--">туда</button>
Текущая - {{currentPage }} из {{ Math.ceil(images.length / perPage) }}
<button @click="currentPage*perPage < images.length && currentPage++">сюда</button>
function formatNum(str) {
return str
.slice(0, -3)
.split('')
.reduceRight((a, v, i, s) =>
v + ((s.length - i - 1) % 3 !== 0 || (i === s.length - 1) ? '' : ' ') + a
, '');
}
function(a, v, i, s) {
return v + ((s.length - i - 1) % 3 !== 0 || (i === s.length - 1) ? '' : ' ') + a
}