update 搬迁树节点页面
This commit is contained in:
@@ -40,5 +40,11 @@ export const toCamelCase = (str) => {
|
||||
* @param {String} str
|
||||
*/
|
||||
export const toUnderScoreCase = (str) => {
|
||||
|
||||
if (typeof str === 'string') {
|
||||
str = str.replace(/[A-Z]/g, (match) => {
|
||||
return `_${match}`
|
||||
}).toLowerCase()
|
||||
return str.startsWith('_') ? str.slice(1) : str
|
||||
}
|
||||
return str
|
||||
}
|
||||
Reference in New Issue
Block a user