mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 01:41:20 +08:00
66043aa3b5
re #4146 added button configuration added useGlobalConfig hook
14 lines
352 B
TypeScript
14 lines
352 B
TypeScript
import { inject } from 'vue'
|
|
import { configProviderContextKey } from '@element-plus/tokens'
|
|
import type { ConfigProvdierContext } from '@element-plus/tokens'
|
|
|
|
const defaultConfig: ConfigProvdierContext = {
|
|
button: {
|
|
autoInsertSpace: true,
|
|
},
|
|
}
|
|
|
|
export const useGlobalConfig = () => {
|
|
return inject(configProviderContextKey, defaultConfig)
|
|
}
|