Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
fix(pagination): remove class duplicates
Browse files Browse the repository at this point in the history
Closes: #319
  • Loading branch information
rayrutjes committed Oct 10, 2017
1 parent 6d4e690 commit c56ea2b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/Pagination.vue
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<template>
<ul :class="bem()" v-show="totalResults > 0">
<li :class="[bem('item', 'first'), page === 1 ? bem('item', 'disabled') : '']">
<li :class="[bem('item', 'first'), page === 1 ? bem('item', 'disabled', false) : '']">
<a href="#" @click.prevent="goToFirstPage" :class="bem('link')">
<slot name="first">&lt;&lt;</slot>
</a>
</li>
<li :class="[bem('item', 'previous'), page === 1 ? bem('item', 'disabled') : '']">
<li :class="[bem('item', 'previous'), page === 1 ? bem('item', 'disabled', false) : '']">
<a href="#" @click.prevent="goToPreviousPage" :class="bem('link')">
<slot name="previous">&lt;</slot>
</a>
</li>
<li v-for="item in pages" :key="item" :class="[bem('item'), page === item ? bem('item', 'active') : '']" >
<li v-for="item in pages" :key="item" :class="[bem('item'), page === item ? bem('item', 'active', false) : '']" >
<a href="#" @click.prevent="goToPage(item)" :class="bem('link')">
<slot :value="item" :active="item === page">
{{ item }}
</slot>
</a>
</li>
<li :class="[bem('item', 'next'), page >= totalPages ? bem('item', 'disabled') : '']">
<li :class="[bem('item', 'next'), page >= totalPages ? bem('item', 'disabled', false) : '']">
<a href="#" @click.prevent="goToNextPage" :class="bem('link')">
<slot name="next">&gt;</slot>
</a>
</li>
<li :class="[bem('item', 'last'), page >= totalPages ? bem('item', 'disabled') : '']">
<li :class="[bem('item', 'last'), page >= totalPages ? bem('item', 'disabled', false) : '']">
<a href="#" @click.prevent="goToLastPage" :class="bem('link')">
<slot name="last">&gt;&gt;</slot>
</a>
Expand Down

0 comments on commit c56ea2b

Please sign in to comment.