- BaseApi:schAvatarStyle/saveSchAvatarStyle/clearSchAvatarStyle 三端点(后端 SchSettingsController 配套,本仓 service 仓随轮提交) - App.vue:登录后 loadSchAvatarDefault()(与 loadSchThemeDefault 同构:失败/404/空→不写键不报错不阻塞),写 localStorage[yh-avatar-sch-default] - Settings.vue:新增 avatar pane(我的头像样式人人可见 + 本校默认管理员可配,watch 进 pane 拉取) - AppHeader/UserInfoModal:头像展示位换 UserAvatar 三态组件 - ThemePreview:预览页头像形态联动 运行时联调与部署验证待人工(后端端点须随 service 发版)
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<h4 class="fl align-middle">{{ appName }}</h4>
|
||||
<div class="school-bg"></div>
|
||||
<div class="header-aside fr">
|
||||
<img :src="userInfo.profilePicture" @click="showUserInfo" class="fl align-middle" />
|
||||
<UserAvatar :src="userInfo.profilePicture" :name="userInfo.name" :size="28" placement="brand" class="fl align-middle" @click="showUserInfo" />
|
||||
<a class="name fl align-middle text-ellipsis" @click="showUserInfo" href="javascript:void(0);">
|
||||
Hi
|
||||
<span class="ml-4">{{ userInfo.name }}</span>
|
||||
@@ -27,6 +27,7 @@
|
||||
import { useDefaultStore } from "@/store";
|
||||
import { computed } from "vue";
|
||||
import SvgIcon from "@/components/SvgIcon.vue";
|
||||
import UserAvatar from "@/components/UserAvatar.vue";
|
||||
import mittBus from "@/utils/mitt";
|
||||
import { StateEnum } from "@/types";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
:headers="uploadHeaders"
|
||||
>
|
||||
<div class="avatar-wrap" title="点击更换头像">
|
||||
<img :src="requireImg('user-avatar-default.png')" v-real-img="store.userInfo.profilePicture" alt="" />
|
||||
<UserAvatar :src="store.userInfo.profilePicture" :name="store.userInfo.name" :size="120" placement="light" />
|
||||
<div class="avatar-mask">更换头像</div>
|
||||
</div>
|
||||
</Upload>
|
||||
@@ -67,8 +67,8 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, onUnmounted, reactive } from "vue";
|
||||
import { requireImg } from "@/utils/hook/useImg";
|
||||
import { useDefaultStore } from "@/store";
|
||||
import UserAvatar from "@/components/UserAvatar.vue";
|
||||
import mittBus from "@/utils/mitt";
|
||||
import BaseApi from "@/api/BaseApi";
|
||||
import Utils from "@/utils";
|
||||
|
||||
Reference in New Issue
Block a user