提交 9fa9f8ec 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

chore: generate menu 兼容边界情况

上级 ba60988e
......@@ -121,7 +121,9 @@ function hasPageGroup(value ?: string | null) : boolean {
// #endif
}
function camelToDash(camelStr : string) : string {
function camelToDash(camelStr: string): string {
// 将首字母转换为小写, 兼容类似 Base64 场景
camelStr = camelStr.charAt(0).toLowerCase() + camelStr.slice(1);
return camelStr.replace(/([A-Z])/g, '-$1').toLowerCase()
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册