mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
Upd:零号·安比评分、评分权重ID转中文
This commit is contained in:
parent
a860c9c176
commit
de597aba8a
3 changed files with 412 additions and 370 deletions
|
|
@ -65,3 +65,14 @@ export const idToName = _id => {
|
|||
if (!result) return null;
|
||||
return result[1];
|
||||
};
|
||||
|
||||
/**
|
||||
* 属性名转id
|
||||
* @param {string} propName 属性名
|
||||
*/
|
||||
export const nameToId = (propName) => {
|
||||
for (const id in propertyData) {
|
||||
if (propertyData[id]?.[1] === propName) return Number(id);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue