Skip to content

Commit

Permalink
avatarIssue
Browse files Browse the repository at this point in the history
  • Loading branch information
jackjieYYY committed Jan 23, 2025
1 parent b7ce93b commit fd73181
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/card/GameAccount.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ const game = computed(() => {
const getAvatarId = () => {
if (!game.value) return "avatar_activity_GK";
return game.value.status?.avatar.id || "avatar_activity_GK";
// 如果有 avatar id,则进行替换处理
return (game.value.status?.avatar.id || "avatar_activity_GK")
.replace(/@/g, "_") // 替换 @ 为 _
.replace(/#/g, "_"); // 替换 # 为 _
};
const getAvatarType = () => {
if (!game.value) return "DEFAULT";
return game.value.status?.avatar.type || "DEFAULT";
Expand Down

0 comments on commit fd73181

Please sign in to comment.