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:
@@ -2,14 +2,11 @@
|
||||
<div class="uc-header">
|
||||
<div class="uc-header-box" >
|
||||
<div class="personalData">
|
||||
<!-- <div >
|
||||
<img src="../../../public/images/Avatarwoman.png" alt="">
|
||||
</div> -->
|
||||
<div class="uesr-avaer">
|
||||
<img :src="fileBaseUrl+userData.avatar" v-if="userData.avatar !== '' ">
|
||||
<div v-else class="uavatar">
|
||||
<div v-if="userData.sex === 1 "><img src="../../../public/images/Avatarman.png" alt=""></div>
|
||||
<div v-else><img src="../../../public/images/Avatarwoman.png" alt=""></div>
|
||||
<div v-if="userData.sex === 1 "><img src="../../../public/images/Avatarman.png" style="width: 100%;" alt=""></div>
|
||||
<div v-if="userData.sex === 2 "><img src="../../../public/images/Avatarwoman.png" style="width: 100%;" alt=""></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -98,7 +95,7 @@
|
||||
code: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
sex: 2,
|
||||
sex: '',
|
||||
sign: "",
|
||||
}
|
||||
}
|
||||
@@ -355,27 +352,7 @@
|
||||
color: #aa0000;
|
||||
}
|
||||
}
|
||||
.uavatar{
|
||||
border-radius: 50%;
|
||||
// border: 1px solid #73adfe;
|
||||
// color: #73adfe;
|
||||
text-align: center;
|
||||
font-size: 30px;
|
||||
line-height: 100px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 50%;
|
||||
// background: #d9e9ff;
|
||||
div{
|
||||
border-radius: 50%;
|
||||
img{
|
||||
border-radius: 50%;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1366px){
|
||||
.uc-header-box {
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native="setCurIdentity(1)"><a :href="`${webBaseUrl}${isTiao ? '/uc/study/task' : '/uc/study/courses'}`">个人中心</a></el-dropdown-item>
|
||||
<el-dropdown-item><router-link :to="'/home/index/'+userInfo.aid">个人主页</router-link></el-dropdown-item>
|
||||
<el-dropdown-item><router-link :to="'/home/'+userInfo.aid">个人主页</router-link></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
<img src="../../../public/images/Avatarwoman.png" alt="">
|
||||
</div> -->
|
||||
<div class="uesr-avaer">
|
||||
<img :src="userInfo.avatar" v-if="userInfo.avatar !== '' ">
|
||||
<router-link :to="'/home/'+userInfo.aid">
|
||||
<img v-if="userInfo.avatar !== '' " :src="userInfo.avatar" >
|
||||
<div v-else class="uavatar">
|
||||
<router-link :to="'/home/index?id='+userInfo.aid">
|
||||
<div v-if="sex === 1 "><img src="../../../public/images/Avatarman.png" alt=""></div>
|
||||
<div v-else><img src="../../../public/images/Avatarwoman.png" alt=""></div>
|
||||
</router-link>
|
||||
<div v-if="sex === 1 "><img src="../../../public/images/Avatarman.png" style="width: 100%;" alt=""></div>
|
||||
<div v-if="sex === 2 "><img src="../../../public/images/Avatarwoman.png" style="width: 100%" alt=""></div>
|
||||
</div>
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
<div class="user-content">
|
||||
@@ -102,6 +102,7 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
||||
},
|
||||
mounted() {
|
||||
this.sex = this.userInfo.sex;
|
||||
//console.log(this.sex,'this.sex')
|
||||
// 判断路由是进入的学员默认页面就重置setCurIdentity
|
||||
if(this.$route.path == '/uc/study/task' || this.$route.path == '/study/index'){
|
||||
this.setCurIdentity(1);
|
||||
@@ -218,6 +219,10 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
margin-right: 20px;
|
||||
.uavatar{
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
}
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -329,26 +334,6 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
||||
color: #aa0000;
|
||||
}
|
||||
}
|
||||
.uavatar{
|
||||
border-radius: 50%;
|
||||
// border: 1px solid #73adfe;
|
||||
// color: #73adfe;
|
||||
text-align: center;
|
||||
font-size: 30px;
|
||||
line-height: 100px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 50%;
|
||||
// background: #d9e9ff;
|
||||
div{
|
||||
border-radius: 50%;
|
||||
img{
|
||||
border-radius: 50%;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1366px){
|
||||
.uc-header-box {
|
||||
|
||||
Reference in New Issue
Block a user