mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
Add Setting.getNewRowNameForTable().
This commit is contained in:
@ -526,6 +526,15 @@ export function getDeduplicatedArray(array, filterArray, key) {
|
||||
return res;
|
||||
}
|
||||
|
||||
export function getNewRowNameForTable(table, rowName) {
|
||||
const emptyCount = table.filter(row => row.name.includes(rowName)).length;
|
||||
let res = rowName;
|
||||
for (let i = 0; i < emptyCount; i ++) {
|
||||
res = res + " ";
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
export function getTagColor(s) {
|
||||
return "success";
|
||||
}
|
||||
|
Reference in New Issue
Block a user