maestro-server/bootue

View on GitHub
src/pagination/template.html

Summary

Maintainability
Test Coverage
<nav v-if="total_pages > 1">
  <ul class="pagination">
    <li v-if="!only_number">
      <a href="#" aria-label="Previous" @click.prevent="changePage(1)">
        <span aria-hidden="true">&laquo;</span>
      </a>
    </li>

    <li :class="{active: n==curr}" v-for="n in total_pages"><a href="#" @click.prevent="changePage(n)">{{n}}</a></li>

    <li v-if="!only_number">
      <a href="#" aria-label="Next" @click.prevent="changePage(total_pages)">
        <span aria-hidden="true">&raquo;</span>
      </a>
    </li>
  </ul>
</nav>