您可以通过更改
CSS
活动项的
b-pagination
. 我用以下代码说明了解决方案:
new Vue({
el: '#app',
data() {
return {
rows: 100,
perPage: 10,
currentPage: 1
}
},
})
.customPage.page-item.active .page-link {
background-color: red;
border-color: red;
}
<link type="text/css" rel="stylesheet" href="https://unpkg.com/bootstrap@4.5.3/dist/css/bootstrap.min.css" />
<link type="text/css" rel="stylesheet" href="https://unpkg.com/bootstrap-vue@2.21.2/dist/bootstrap-vue.css" />
<script src="https://unpkg.com/vue@2.6.12/dist/vue.min.js"></script>
<script src="https://unpkg.com/bootstrap-vue@2.21.2/dist/bootstrap-vue.min.js"></script>
<div id="app">
<b-pagination v-model="currentPage" :total-rows="rows" :per-page="perPage" page-class="customPage"></b-pagination>
</div>