mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-03-15 03:53:16 +08:00
🚸 调整动态头像缓存策略
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
<div class="vp-ouu-info">
|
||||
<div class="left">
|
||||
<div class="avatar">
|
||||
<TMiImg :ori="true" :src="getUserAvatar(userInfo)" alt="avatar" />
|
||||
<img v-if="avatarUrl.endsWith('.gif')" :src="avatarUrl" alt="avatar" />
|
||||
<TMiImg v-else :ori="true" :src="avatarUrl" alt="avatar" />
|
||||
</div>
|
||||
<div v-if="userInfo.pendant !== ''" class="pendant">
|
||||
<TMiImg :ori="true" :src="userInfo.pendant" alt="pendant" />
|
||||
@@ -62,6 +63,10 @@ const isLast = ref<boolean>(false);
|
||||
const load = ref<boolean>(false);
|
||||
const userInfo = shallowRef<TGApp.BBS.User.Info>();
|
||||
const results = shallowRef<Array<TGApp.BBS.Post.FullData>>([]);
|
||||
const avatarUrl = computed<string>(() => {
|
||||
if (!userInfo.value) return "";
|
||||
return getUserAvatar(userInfo.value);
|
||||
});
|
||||
const levelColor = computed<string>(() => {
|
||||
if (!userInfo.value) return "var(--tgc-od-white)";
|
||||
const level = userInfo.value.level_exp.level;
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
<div class="tpr-user" @click="handleUser()">
|
||||
<div class="tpru-left">
|
||||
<div class="avatar">
|
||||
<TMiImg :ori="true" :src="getUserAvatar(props.modelValue.user)" alt="avatar" />
|
||||
<img v-if="avatarUrl.endsWith('.gif')" :src="avatarUrl" alt="avatar" />
|
||||
<TMiImg v-else :ori="true" :src="avatarUrl" alt="avatar" />
|
||||
</div>
|
||||
<div v-if="props.modelValue.user.pendant !== ''" class="pendant">
|
||||
<TMiImg :ori="true" :src="props.modelValue.user.pendant" alt="pendant" />
|
||||
@@ -147,6 +148,7 @@ const isLast = ref<boolean>(false);
|
||||
const loading = ref<boolean>(false);
|
||||
const subReplies = shallowRef<Array<TGApp.BBS.Reply.ReplyFull>>([]);
|
||||
const vpReplyEl = useTemplateRef<HTMLDivElement>("VpReplyRef");
|
||||
const avatarUrl = computed<string>(() => getUserAvatar(props.modelValue.user));
|
||||
const levelColor = computed<string>(() => {
|
||||
const level = props.modelValue.user.level_exp.level;
|
||||
if (level < 5) return "var(--tgc-od-green)";
|
||||
|
||||
Reference in New Issue
Block a user