Browse Source

站内信图标换成头像

master_hella_20240701
yufei0306 7 months ago
parent
commit
5a14671ffd
  1. 6
      src/layout/components/Message/src/Message.vue

6
src/layout/components/Message/src/Message.vue

@ -1,6 +1,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import * as NotifyMessageApi from '@/api/system/notify/message' import * as NotifyMessageApi from '@/api/system/notify/message'
import avatarImg from '@/assets/imgs/avatar.gif'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
const avatar = userStore.getUser.avatar ? userStore.getUser.avatar : avatarImg
defineOptions({ name: 'Message' }) defineOptions({ name: 'Message' })
@ -66,7 +70,7 @@ onBeforeUnmount(() => {
<div class="message-list"> <div class="message-list">
<template v-for="item in list" :key="item.id"> <template v-for="item in list" :key="item.id">
<div class="message-item"> <div class="message-item">
<img alt="" class="message-icon" src="@/assets/imgs/avatar.gif" /> <img alt="" class="message-icon" :src="avatar" />
<div class="message-content"> <div class="message-content">
<span class="message-title"> <span class="message-title">
{{ item.templateNickname }}{{ item.templateContent }} {{ item.templateNickname }}{{ item.templateContent }}

Loading…
Cancel
Save