fix(docs): [pagination] example bugfix according to new usage (#5833)

This commit is contained in:
ioslh 2022-02-09 18:28:39 +08:00 committed by GitHub
parent f73387f9ee
commit a8a8cd8f08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View File

@ -34,8 +34,8 @@
<div class="demonstration">Change page size</div>
<el-pagination
v-model:currentPage="currentPage2"
v-model:page-size="pageSize2"
:page-sizes="[100, 200, 300, 400]"
:page-size="100"
:small="small"
:disabled="disabled"
:background="background"
@ -50,7 +50,7 @@
<div class="demonstration">Jump to</div>
<el-pagination
v-model:currentPage="currentPage3"
:page-size="100"
v-model:page-size="pageSize3"
:small="small"
:disabled="disabled"
:background="background"
@ -65,8 +65,8 @@
<div class="demonstration">All combined</div>
<el-pagination
v-model:currentPage="currentPage4"
v-model:page-size="pageSize4"
:page-sizes="[100, 200, 300, 400]"
:page-size="100"
:small="small"
:disabled="disabled"
:background="background"
@ -85,6 +85,9 @@ const currentPage1 = ref(5)
const currentPage2 = ref(5)
const currentPage3 = ref(5)
const currentPage4 = ref(4)
const pageSize2 = ref(100)
const pageSize3 = ref(100)
const pageSize4 = ref(100)
const small = ref(false)
const background = ref(false)
const disabled = ref(false)

View File

@ -1,7 +1,7 @@
import type { InjectionKey, ComputedRef } from 'vue'
import type { InjectionKey, ComputedRef, WritableComputedRef } from 'vue'
export interface ElPaginationContext {
currentPage?: ComputedRef<number>
currentPage?: WritableComputedRef<number>
pageCount?: ComputedRef<number>
disabled?: ComputedRef<boolean>
changeEvent?: (val: number) => void