element-plus/packages/utils/config.ts

20 lines
369 B
TypeScript
Raw Normal View History

import type { ComponentSize } from './types'
export interface InstallOptions {
size: ComponentSize
zIndex: number
locale?: any
}
let $ELEMENT = {} as InstallOptions
2020-07-28 17:48:40 +08:00
const setConfig = (option: InstallOptions): void => {
$ELEMENT = option
2020-07-28 17:48:40 +08:00
}
const getConfig = (key: keyof InstallOptions): unknown => {
2020-07-28 17:48:40 +08:00
return $ELEMENT[key]
}
export { getConfig, setConfig }