mirror of
https://gitcode.com/flipped-aurora/gin-vue-admin.git
synced 2026-05-15 03:37:55 +00:00
增加排序功能,修改错别字 dashbord->dashboard 需更新数据库中base_menu表中 所有的dashbord改为dashboard
This commit is contained in:
13
web/src/utils/stringFun.js
Normal file
13
web/src/utils/stringFun.js
Normal file
@@ -0,0 +1,13 @@
|
||||
export const toUpperCase = (str) => {
|
||||
if (str[0]) {
|
||||
return str.replace(str[0], str[0].toUpperCase())
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
// 驼峰转换下划线
|
||||
export const toSQLLine = (str) => {
|
||||
if (str=="ID") return "ID"
|
||||
return str.replace(/([A-Z])/g,"_$1").toLowerCase();
|
||||
}
|
||||
Reference in New Issue
Block a user