Official example: https://ext.dcloud.net.cn/plugin?id=32
The paging face component to display page numbers, request data, etc.
1. Main features
<template>
<view>
<uni-pagination :total="60"/>
<Uni-Pagination: Total = "50" Prev-Text = "Предыдущая страница" Next-Text = "следующая страница" />
<uni-pagination :show-icon="true" :total="50" />
</view>
</template>
Second, event binding
<template>
<view>
<uni-pagination :current="current" :total="total" :show-icon="true" @change="change" />
<Text> текущая страница: {{Current}}, общие данные: {{Total}} полоса, каждая страница данных: {{ pageSize }}</text>
<button type = "primary" @click = "добавить"> добавить </button>
<button type = "default" @click = "сбросить"> сбросить данные </button>
</view>
</template>
<script>
export default {
components: {},
data() {
return {
current: 1,
total: 0,
pageSize: 10
};
},
methods: {
add() {
this.total += 10;
},
reset() {
this.total = 0;
this.current = 1;
},
change(e) {
this.current = e.current;
}
}
};
</script>