mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-01 03:28:20 +08:00
添加一种机制可以设置类名大写开头,但是不自动加主题前缀
This commit is contained in:
parent
df17101117
commit
e3cc7ace16
@ -48,7 +48,7 @@ export function makeClassnames(ns?: string) {
|
||||
|
||||
const fn = (...classes: ClassValue[]) => {
|
||||
const str = cx(...(classes as any));
|
||||
return str && ns ? str.replace(/(^|\s)([A-Z])/g, '$1' + ns + '$2') : str || '';
|
||||
return str && ns ? str.replace(/(^|\s)([A-Z])/g, '$1' + ns + '$2').replace(/(^|\s)\:/g, '$1') : str || '';
|
||||
};
|
||||
|
||||
ns && (fns[ns] = fn);
|
||||
|
Loading…
Reference in New Issue
Block a user