Skip to content

Commit f692a3c

Browse files
author
刘欢
committed
feat: default getPrefixCls
1 parent 237ad43 commit f692a3c

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/components/config-provider/config-provider.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,17 @@ type Config = {
4949
}
5050
export const defaultPrefixCls = 'adm'
5151

52-
const getPrefixCls = (suffixCls?: string, customizePrefixCls?: string) => {
53-
if (customizePrefixCls) {
54-
return customizePrefixCls
55-
}
56-
return suffixCls ? `${defaultPrefixCls}-${suffixCls}` : defaultPrefixCls
57-
}
5852
export const defaultConfigRef: {
5953
current: Config
6054
} = {
6155
current: {
6256
locale: zhCN,
63-
getPrefixCls,
57+
getPrefixCls: (suffixCls?: string, customizePrefixCls?: string) => {
58+
if (customizePrefixCls) {
59+
return customizePrefixCls
60+
}
61+
return suffixCls ? `${defaultPrefixCls}-${suffixCls}` : defaultPrefixCls
62+
},
6463
},
6564
}
6665

0 commit comments

Comments
 (0)