2021-08-24 13:36:48 +08:00
|
|
|
import type { ComponentSize } from './types'
|
|
|
|
|
2020-11-26 19:56:10 +08:00
|
|
|
export interface InstallOptions {
|
2021-12-10 17:21:53 +08:00
|
|
|
size: ComponentSize | ''
|
2020-11-26 19:56:10 +08:00
|
|
|
zIndex: number
|
|
|
|
locale?: any
|
|
|
|
}
|
|
|
|
|
2021-09-04 19:29:28 +08:00
|
|
|
let $ELEMENT = {} as InstallOptions
|
2020-07-28 17:48:40 +08:00
|
|
|
|
2020-11-26 19:56:10 +08:00
|
|
|
const setConfig = (option: InstallOptions): void => {
|
|
|
|
$ELEMENT = option
|
2020-07-28 17:48:40 +08:00
|
|
|
}
|
|
|
|
|
2020-11-26 19:56:10 +08:00
|
|
|
const getConfig = (key: keyof InstallOptions): unknown => {
|
2020-07-28 17:48:40 +08:00
|
|
|
return $ELEMENT[key]
|
|
|
|
}
|
|
|
|
|
2021-09-04 19:29:28 +08:00
|
|
|
export { getConfig, setConfig }
|