diff --git a/Yi.Bbs.Vue3/src/components/AvatarInfo.vue b/Yi.Bbs.Vue3/src/components/AvatarInfo.vue index 2d1aa2bb..1f5a565b 100644 --- a/Yi.Bbs.Vue3/src/components/AvatarInfo.vue +++ b/Yi.Bbs.Vue3/src/components/AvatarInfo.vue @@ -9,7 +9,17 @@
- {{ userInfo.nick }} +
{{ userInfo.nick }}
+
+ {{ + userInfo.level + }} +
+
+ + {{ userInfo.userLimit.label }} + +
{{ props.time }}
@@ -48,6 +58,8 @@ const userInfo = reactive({ nick: "", role: [], id: "", + level: 1, + userLimit: 0, }); const iconUrl = ref("/favicon.ico"); const iconUrlHandler = () => { @@ -86,6 +98,8 @@ const Init = () => { userInfo.nick = props.userInfo.nick; userInfo.role = props.userInfo.role; userInfo.id = props.userInfo.id; + userInfo.level = "等级" + props.userInfo.level; + userInfo.userLimit = getStatusInfo(1); iconUrl.value = iconUrlHandler(userInfo.icon); } @@ -98,6 +112,28 @@ const Init = () => { iconUrl.value = userInfo.icon; } }; + +const statusTypeList = [ + { + label: "正常", + value: 0, + type: "success", + }, + { + label: "危险", + value: 1, + type: "warning", + }, + { + label: "已禁止", + value: 2, + type: "danger", + }, +]; + +const getStatusInfo = (type) => { + return statusTypeList.filter((item) => item.value === type)[0]; +}; \ No newline at end of file +