wip(Login): Login developing

This commit is contained in:
陈凯龙
2022-01-05 17:02:25 +08:00
parent 77097c8d92
commit 4216f7c218
26 changed files with 391 additions and 1597 deletions

View File

@@ -16,3 +16,21 @@ export const withInstall = <T>(component: T, alias?: string) => {
}
return component as T & Plugin
}
/**
* @param str 需要转下划线的驼峰字符串
* @returns 字符串下划线
*/
export function humpToUnderline(str: string): string {
return str.replace(/([A-Z])/g, '-$1').toLowerCase()
}
/**
* @param str 需要转驼峰的下划线字符串
* @returns 字符串驼峰
*/
export function underlineToHump(str: string): string {
return str.replace(/\-(\w)/g, function (_, letter: string) {
return letter.toUpperCase()
})
}