mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
refactor(components): refactor pagination (#3526)
* refactor(components): refactor pagination * fix: tests * fix: emits * refactor: improve props
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import type { Mutable } from './types'
|
||||
import type { PropType } from 'vue'
|
||||
|
||||
/**
|
||||
@@ -69,5 +70,7 @@ export function buildProp<
|
||||
}
|
||||
|
||||
export const keyOf = <T>(arr: T) => Object.keys(arr) as Array<keyof T>
|
||||
export const mutable = <T extends readonly any[]>(val: T) =>
|
||||
val as Mutable<typeof val>
|
||||
|
||||
export const componentSize = ['large', 'medium', 'small', 'mini'] as const
|
||||
|
||||
@@ -49,3 +49,5 @@ export type TimeoutHandle = ReturnType<typeof global.setTimeout>
|
||||
export type ComponentSize = 'large' | 'medium' | 'small' | 'mini'
|
||||
|
||||
export type StyleValue = string | CSSProperties | Array<StyleValue>
|
||||
|
||||
export type Mutable<T> = { -readonly [P in keyof T]: T[P] }
|
||||
|
||||
Reference in New Issue
Block a user