未验证 提交 55dac264 编写于 作者: E Edward zZhang 提交者: GitHub

Update index.vue

上级 55905250
......@@ -2,11 +2,11 @@
<span class="headerAvatar">
<template v-if="picType === 'avatar'">
<el-avatar v-if="userInfo.headerImg" :size="30" :src="avatar" />
<el-avatar v-else :size="30" :src="require('@/assets/noBody.png')" />
<el-avatar v-else :size="30" :src="noAvatar" />
</template>
<template v-if="picType === 'img'">
<img v-if="userInfo.headerImg" :src="avatar" class="avatar">
<img v-else :src="require('@/assets/noBody.png')" class="avatar">
<img v-else :src="noAvatar" class="avatar">
</template>
<template v-if="picType === 'file'">
<img :src="file" class="file">
......@@ -15,6 +15,7 @@
</template>
<script>
import noAvatar from '@/assets/noBody.png'
import { mapGetters } from 'vuex'
const path = import.meta.env.VITE_BASE_API
export default {
......@@ -33,6 +34,7 @@ export default {
},
data() {
return {
noAvatar: noAvatar,
path: path + '/'
}
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册