mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-03-15 03:53:16 +08:00
🚸 调整动态头像缓存策略
This commit is contained in:
@@ -2,7 +2,8 @@
|
|||||||
<div class="tp-avatar-box">
|
<div class="tp-avatar-box">
|
||||||
<div class="tpa-img">
|
<div class="tpa-img">
|
||||||
<div class="tpa-icon">
|
<div class="tpa-icon">
|
||||||
<TMiImg :ori="true" :src="getUserAvatar(props.data)" alt="avatar" />
|
<img v-if="avatarUrl.endsWith('.gif')" :src="avatarUrl" alt="avatar" />
|
||||||
|
<TMiImg v-else :ori="true" :src="avatarUrl" alt="avatar" />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="props.data.pendant !== ''" class="tpa-pendant">
|
<div v-if="props.data.pendant !== ''" class="tpa-pendant">
|
||||||
<TMiImg :ori="true" :src="props.data.pendant" alt="pendant" />
|
<TMiImg :ori="true" :src="props.data.pendant" alt="pendant" />
|
||||||
@@ -32,11 +33,11 @@ type TpAvatarProps = { data: TGApp.BBS.Post.User; position: "left" | "right" };
|
|||||||
|
|
||||||
const props = defineProps<TpAvatarProps>();
|
const props = defineProps<TpAvatarProps>();
|
||||||
|
|
||||||
|
const avatarUrl = computed<string>(() => getUserAvatar(props.data));
|
||||||
const authorDesc = computed<string>(() => {
|
const authorDesc = computed<string>(() => {
|
||||||
if (props.data.certification.label !== "") return props.data.certification.label;
|
if (props.data.certification.label !== "") return props.data.certification.label;
|
||||||
return props.data.introduce;
|
return props.data.introduce;
|
||||||
});
|
});
|
||||||
|
|
||||||
const levelColor = computed<string>(() => {
|
const levelColor = computed<string>(() => {
|
||||||
if (!props.data.level_exp) return "var(--tgc-od-white)";
|
if (!props.data.level_exp) return "var(--tgc-od-white)";
|
||||||
const level = props.data.level_exp.level;
|
const level = props.data.level_exp.level;
|
||||||
|
|||||||
Reference in New Issue
Block a user