mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-16 01:41:15 +08:00
9 lines
369 B
TypeScript
9 lines
369 B
TypeScript
|
import { computed, inject } from 'vue';
|
||
|
import { defaultConfigProvider } from '../../config-provider';
|
||
|
|
||
|
export default (name: string, props: Record<any, any>) => {
|
||
|
const configProvider = inject('configProvider', defaultConfigProvider);
|
||
|
const prefixCls = computed(() => configProvider.getPrefixCls(name, props.prefixCls));
|
||
|
return { configProvider, prefixCls };
|
||
|
};
|