From 1898068f6b29183da52d267a43a078fe5bf9db82 Mon Sep 17 00:00:00 2001
From: Xwen <929716663@qq.com>
Date: Sun, 7 Jan 2024 21:19:54 +0800
Subject: [PATCH] =?UTF-8?q?perf:=E7=BB=9F=E4=B8=80=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=BB=84=E4=BB=B6=E7=9A=84=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E6=9D=A5=E6=BA=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Yi.Bbs.Vue3/src/components/AvatarInfo.vue | 10 +++++++---
Yi.Bbs.Vue3/src/components/UserInfoCard/index.vue | 4 ++--
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/Yi.Bbs.Vue3/src/components/AvatarInfo.vue b/Yi.Bbs.Vue3/src/components/AvatarInfo.vue
index 9984731f..b969f3ec 100644
--- a/Yi.Bbs.Vue3/src/components/AvatarInfo.vue
+++ b/Yi.Bbs.Vue3/src/components/AvatarInfo.vue
@@ -17,8 +17,12 @@
>
-
- {{ userInfo.userLimit.label }}
+
+ {{ getStatusInfo(userInfo.userLimit)?.label }}
@@ -107,7 +111,7 @@ const Init = () => {
userInfo.role = props.userInfo.role;
userInfo.id = props.userInfo.id;
userInfo.level = props.userInfo.level;
- userInfo.userLimit = getStatusInfo(props.userInfo.userLimit);
+ userInfo.userLimit = props.userInfo.userLimit;
iconUrl.value = iconUrlHandler(userInfo.icon);
}
diff --git a/Yi.Bbs.Vue3/src/components/UserInfoCard/index.vue b/Yi.Bbs.Vue3/src/components/UserInfoCard/index.vue
index 884a837a..0c6c9598 100644
--- a/Yi.Bbs.Vue3/src/components/UserInfoCard/index.vue
+++ b/Yi.Bbs.Vue3/src/components/UserInfoCard/index.vue
@@ -48,7 +48,7 @@
积分:3005
状态:
- {{ getStatusInfo(userInfo.userLimit.label) }}
+ {{ getStatusInfo(userInfo.userLimit) }}
@@ -98,7 +98,7 @@ const statusTypeList = [
},
];
const getStatusInfo = (type) => {
- return statusTypeList.filter((item) => item.value === type)[0];
+ return statusTypeList.filter((item) => item.value === type)[0]?.label;
};