Skip to content

Commit d42e4b8

Browse files
committed
More ES5 compat
1 parent aac3585 commit d42e4b8

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/laravel-vue-pagination.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,15 @@ module.exports = {
2222
}
2323
},
2424

25-
template: `
26-
<ul class="pagination" v-if="data.total > data.per_page">
27-
<li v-if="data.prev_page_url">
28-
<a href="#" aria-label="Previous" @click.prevent="selectPage(--data.current_page)"><span aria-hidden="true">&laquo;</span></a>
29-
</li>
30-
<li v-for="n in getPages()" :class="{ 'active': n == data.current_page }"><a href="#" @click.prevent="selectPage(n)">{{ n }}</a></li>
31-
<li v-if="data.next_page_url">
32-
<a href="#" aria-label="Next" @click.prevent="selectPage(++data.current_page)"><span aria-hidden="true">&raquo;</span></a>
33-
</li>
34-
</ul>`,
25+
template: '<ul class="pagination" v-if="data.total > data.per_page">\
26+
<li v-if="data.prev_page_url">\
27+
<a href="#" aria-label="Previous" @click.prevent="selectPage(--data.current_page)"><span aria-hidden="true">&laquo;</span></a>\
28+
</li>\
29+
<li v-for="n in getPages()" :class="{ \'active\': n == data.current_page }"><a href="#" @click.prevent="selectPage(n)">{{ n }}</a></li>\
30+
<li v-if="data.next_page_url">\
31+
<a href="#" aria-label="Next" @click.prevent="selectPage(++data.current_page)"><span aria-hidden="true">&raquo;</span></a>\
32+
</li>\
33+
</ul>',
3534

3635
methods: {
3736
selectPage: function(page) {
@@ -41,7 +40,7 @@ module.exports = {
4140
if (this.limit === -1) {
4241
return 0;
4342
}
44-
43+
4544
if (this.limit === 0) {
4645
return this.data.last_page;
4746
}

0 commit comments

Comments
 (0)