2019-11-29 12:51:58 +08:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
* @param {string} type
|
|
|
|
* @return {string}
|
|
|
|
*/
|
|
|
|
export function getUName(list) {
|
2019-12-05 16:17:54 +08:00
|
|
|
var base = 1;
|
|
|
|
if (list) {
|
|
|
|
list.forEach(elem => {
|
|
|
|
if (elem.hasOwnProperty('name') && Number.isInteger(parseInt(elem.name)) && parseInt(elem.name) >= base) {
|
|
|
|
base = parseInt(elem.name) + 1;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
return base.toString();
|
2019-11-29 12:51:58 +08:00
|
|
|
}
|