このレイアウトの作成方法= "prev、pager、next"(バックエンド)。私はnext_page
とprev_page
に値を入れる必要があります。私はドキュメントを参照しているが、私は何も得ていない。Vue JSのページングに要素uiを使用するにはどうすればよいですか?
<el-pagination
@current-change="handleCurrentChange"
:current-page="current_page"
:page-size="per_page"
layout="prev, pager, next"
:total="total">
</el-pagination>
<script>
data() {
return {
per_page: null,
current_page: null,
total: null,
next_page_url: null,
}
},
created(){
this.fetchPost();
},
methods: {
fetchPost() {
axios.get('/' + this.$route.params.trans + '/adminGetPosts')
.then(({data}) => {
this.posts = data.data
this.current_page= data.current_page
this.per_page = data.per_page
this.total = data.total
this.next_page_url = data.next_page_url
})
},
</script>
あなたはあなたの方法でセクション – Den