mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-03-26 05:39:45 +08:00
✨ 支持动态头像
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="tp-avatar-box">
|
||||
<div class="tpa-img">
|
||||
<div class="tpa-icon">
|
||||
<TMiImg :ori="true" :src="props.data.avatar_url" alt="avatar" />
|
||||
<TMiImg :ori="true" :src="getUserAvatar(props.data)" alt="avatar" />
|
||||
</div>
|
||||
<div v-if="props.data.pendant !== ''" class="tpa-pendant">
|
||||
<TMiImg :ori="true" :src="props.data.pendant" alt="pendant" />
|
||||
@@ -25,6 +25,7 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import { getUserAvatar } from "@utils/toolFunc.js";
|
||||
import { computed } from "vue";
|
||||
|
||||
type TpAvatarProps = { data: TGApp.BBS.Post.User; position: "left" | "right" };
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="vp-ouu-info">
|
||||
<div class="left">
|
||||
<div class="avatar">
|
||||
<TMiImg :src="userInfo.avatar_url" alt="avatar" :ori="true" />
|
||||
<TMiImg :src="getUserAvatar(userInfo)" alt="avatar" :ori="true" />
|
||||
</div>
|
||||
<div class="pendant" v-if="userInfo.pendant !== ''">
|
||||
<TMiImg :src="userInfo.pendant" alt="pendant" :ori="true" />
|
||||
@@ -46,6 +46,7 @@ import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { useBoxReachBottom } from "@hooks/reachBottom.js";
|
||||
import bbsReq from "@req/bbsReq.js";
|
||||
import postReq from "@req/postReq.js";
|
||||
import { getUserAvatar } from "@utils/toolFunc.js";
|
||||
import { computed, ref, shallowRef, useTemplateRef, watch } from "vue";
|
||||
|
||||
type ToPostUserProps = { gid: number; uid: string; postId?: string };
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="tpr-user" @click="handleUser()">
|
||||
<div class="tpru-left">
|
||||
<div class="avatar">
|
||||
<TMiImg :ori="true" :src="props.modelValue.user.avatar_url" alt="avatar" />
|
||||
<TMiImg :ori="true" :src="getUserAvatar(props.modelValue.user)" alt="avatar" />
|
||||
</div>
|
||||
<div class="pendant" v-if="props.modelValue.user.pendant !== ''">
|
||||
<TMiImg :ori="true" :src="props.modelValue.user.pendant" alt="pendant" />
|
||||
@@ -109,7 +109,7 @@ import { emit, type Event, type UnlistenFn } from "@tauri-apps/api/event";
|
||||
import { save } from "@tauri-apps/plugin-dialog";
|
||||
import { writeTextFile } from "@tauri-apps/plugin-fs";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
import { getNearTime, timestampToDate } from "@utils/toolFunc.js";
|
||||
import { getNearTime, getUserAvatar, timestampToDate } from "@utils/toolFunc.js";
|
||||
import { computed, onMounted, onUnmounted, ref, shallowRef, toRaw, watch } from "vue";
|
||||
|
||||
import TpParser from "./tp-parser.vue";
|
||||
|
||||
Reference in New Issue
Block a user