element-plus/packages/tokens/pagination.ts
三咲智子 6256189100
refactor(components): refactor pagination (#3526)
* refactor(components): refactor pagination

* fix: tests

* fix: emits

* refactor: improve props
2021-09-22 01:19:04 +08:00

13 lines
375 B
TypeScript

import type { InjectionKey, ComputedRef } from 'vue'
export interface ElPaginationContext {
currentPage?: ComputedRef<number>
pageCount?: ComputedRef<number>
disabled?: ComputedRef<boolean>
changeEvent?: (val: number) => void
handleSizeChange?: (val: number) => void
}
export const elPaginationKey: InjectionKey<ElPaginationContext> =
Symbol('elPaginationKey')