【发布时间】:2019-02-07 15:54:16
【问题描述】:
我有一个简单的 vue 项目 codesandbox 和 bootstrap-vue。
这些列有几列带有卡片和分页:
<template>
<b-container>
<b-row
:current-page="currentPage"
:per-page="perPage">
<b-col cols="12" sm="4" class="my-1"
v-for="item in items"
:key="item.id">
<b-card
:bg-variant="item.variant"
text-variant="white"
header="item.title"
class="text-center"
>
<p class="card-text">
{{item.body}}
</p>
</b-card>
</b-col>
</b-row>
<b-row>
<b-col md="6" class="my-1">
<b-pagination :total-rows="totalRows" :per-page="perPage" v-model="currentPage" class="my-0" />
</b-col>
</b-row>
</b-container>
</template>
所以我正在尝试为列实现一个工作分页,类似于bootstrap table 的分页。
页面应显示 2 列,卡片 = perPage: 2。
问题:如何为自定义列或行设置 bootstrap-vue perPage?
【问题讨论】:
标签: javascript vue.js vuejs2 vue-component bootstrap-vue