Add Setting.getNewRowNameForTable().

This commit is contained in:
Gucheng Wang
2021-11-28 18:21:34 +08:00
parent e888ff8475
commit a04702a8d0
3 changed files with 11 additions and 2 deletions

View File

@ -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";
}