Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<div id="app">
<div class="content">
<li v-for="(item, i) in items" :key="i">{{item}}</li>
export default {
name: "App",
components: {},
data() {
const items = new Array(200).fill(null).map((e, i) => `Item ${i + 1}`);
const perPage = 10;
return {
items, //表示するデータがここに入る
page: 1, //現在のページ番号
perPage, //1ページ毎の表示件数
totalPage: Math.ceil(items.length / perPage), //総ページ数
count: items.length //itemsの総数
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #2c3e50;
margin-top: 60px;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.