perf:统一用户信息组件的数据来源

This commit is contained in:
Xwen
2024-01-07 21:19:54 +08:00
parent d0b64b6521
commit 1898068f6b
2 changed files with 9 additions and 5 deletions

View File

@@ -17,8 +17,12 @@
>
</div>
<div class="status" v-if="userInfo.userLimit">
<el-tag round effect="light" :type="userInfo.userLimit.type">
{{ userInfo.userLimit.label }}
<el-tag
round
effect="light"
:type="getStatusInfo(userInfo.userLimit)?.type"
>
{{ getStatusInfo(userInfo.userLimit)?.label }}
</el-tag>
</div>
</div>
@@ -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);
}