mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
优化角色面板提示信息#135
This commit is contained in:
parent
e9d912f118
commit
80b39c9864
4 changed files with 35 additions and 14 deletions
|
|
@ -144,12 +144,12 @@ export const getPanelListOrigin = uid => {
|
|||
* 获取某个角色的面板数据
|
||||
* @param {string} uid
|
||||
* @param {string} name
|
||||
* @returns {ZZZAvatarInfo | null}
|
||||
* @returns {ZZZAvatarInfo | null | false}
|
||||
*/
|
||||
export const getPanel = (uid, name) => {
|
||||
// 通过名称(包括别名)获取角色 ID
|
||||
const id = char.aliasToID(name);
|
||||
if (!id) return null;
|
||||
if (!id) return false;
|
||||
const _data = getPanelData(uid);
|
||||
// 获取所有面板数据
|
||||
const data = _data.map(item => new ZZZAvatarInfo(item));
|
||||
|
|
@ -163,11 +163,11 @@ export const getPanel = (uid, name) => {
|
|||
* 获取某个角色的面板数据(原始数据)
|
||||
* @param {string} uid
|
||||
* @param {string} name
|
||||
* @returns {ZZZAvatarInfo | null}
|
||||
* @returns {ZZZAvatarInfo | null | false}
|
||||
*/
|
||||
export const getPanelOrigin = (uid, name) => {
|
||||
const id = char.aliasToID(name);
|
||||
if (!id) return null;
|
||||
if (!id) return false;
|
||||
const data = getPanelData(uid);
|
||||
// 通过 ID 获取角色数据
|
||||
const result = data.find(item => item.id === id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue