mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
首页卡片头像不出现问题
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div class="item-author">
|
||||
<div :style="`width:${width};height:${height};`" @click="toHome()">
|
||||
{{userAvatar}}
|
||||
<el-avatar shape="circle" :src="userAvatar" v-if="userAvatar"></el-avatar>
|
||||
|
||||
<div v-else class="uavatar">
|
||||
<div v-if="sex == null" style="border-radius: 50%;" :style="`width:${width};height:${height};`"></div>
|
||||
<div v-else>
|
||||
@@ -52,6 +54,7 @@
|
||||
},
|
||||
mounted() {
|
||||
this.userName=this.name;
|
||||
this.usersex = this.sex;
|
||||
if(this.avatar){
|
||||
if(this.avatar.startsWith('http')){
|
||||
this.userAvatar=this.avatar;
|
||||
@@ -59,7 +62,8 @@
|
||||
this.userAvatar=this.baseUrl+this.avatar;
|
||||
}
|
||||
}
|
||||
this.usersex = this.sex;
|
||||
console.log(this.usersex)
|
||||
|
||||
},
|
||||
methods:{
|
||||
toHome() {
|
||||
|
||||
Reference in New Issue
Block a user