|
@@ -2,12 +2,12 @@
|
|
|
<div class="logo">
|
|
|
<img v-if="!avtImageUrl" src="~@/assets/images/admin.png" alt=""/>
|
|
|
<img v-else :src="avtImageUrl" alt="" style="border-radius: 50%"/>
|
|
|
- <h2 v-show="!collapsed" class="title">{{ userInfo.name }}</h2>
|
|
|
+ <h2 v-show="!collapsed" class="title">{{ userInfo.name }}{{ num }}</h2>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import {onMounted, reactive, ref, toRef} from 'vue';
|
|
|
+import {computed, onMounted, reactive, ref, toRef, watch} from 'vue';
|
|
|
import { useUserStore } from '@/store/modules/user';
|
|
|
import {getFileBase64, getList} from "@/api/system/file";
|
|
|
import {base64ToBlob} from "@/utils/imageUtils";
|
|
@@ -23,6 +23,15 @@ const userInfo=reactive(userStore.getUserInfo);
|
|
|
|
|
|
const avtImageUrl = ref<any>("")
|
|
|
|
|
|
+const avtImageNum = computed(() => {
|
|
|
+ const userStore = useUserStore();
|
|
|
+ return userStore.getAvtImage;
|
|
|
+})
|
|
|
+
|
|
|
+watch(() => avtImageNum.value, () => {
|
|
|
+ getAvtImag(userInfo.userID)
|
|
|
+}, {deep: true})
|
|
|
+
|
|
|
function getAvtImag(fileRefID) {
|
|
|
getList({fileRefID}).then((res) => {
|
|
|
if (!res) {
|