no message

This commit is contained in:
kuaifan 2021-06-09 23:00:08 +08:00
parent 917d144484
commit 52722eda17
8 changed files with 53 additions and 50 deletions

View File

@ -12,9 +12,9 @@
</div> </div>
</div> </div>
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<div :class="['avatar-box', userId === userid || user.online ? 'online' : '']"> <div :class="['avatar-box', userId === userid || user.online ? 'online' : '']" :style="boxStyle">
<WAvatar v-if="showImg" :src="user.userimg" :size="size"/> <WAvatar v-if="showImg" :src="user.userimg" :size="avatarSize"/>
<WAvatar v-else :size="size" class="avatar-text">{{nickname}}</WAvatar> <WAvatar v-else :size="avatarSize" class="avatar-text">{{nickname}}</WAvatar>
</div> </div>
<div v-if="showName" class="avatar-name">{{user.nickname}}</div> <div v-if="showName" class="avatar-name">{{user.nickname}}</div>
</div> </div>
@ -48,6 +48,14 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
borderWitdh: {
type: Number,
default: 0
},
borderColor: {
type: String,
default: ''
},
}, },
data() { data() {
return { return {
@ -60,6 +68,24 @@
computed: { computed: {
...mapState(["userId", "userOnline"]), ...mapState(["userId", "userOnline"]),
boxStyle() {
const style = {};
const {borderWitdh, borderColor} = this
if (borderWitdh > 0) {
style.border = borderWitdh + "px solid " + (borderColor || "#ffffff");
}
return style;
},
avatarSize() {
const {borderWitdh, size} = this
if (borderWitdh > 0) {
return size - borderWitdh * 2;
} else {
return size;
}
},
showImg() { showImg() {
const {userimg} = this.user const {userimg} = this.user
if (!userimg) { if (!userimg) {

View File

@ -42,14 +42,10 @@
</div> </div>
<div class="manage-box-main"> <div class="manage-box-main">
<div class="manage-box-body">
<div class="manage-box-body-content">
<keep-alive> <keep-alive>
<router-view class="manage-box-view"></router-view> <router-view class="manage-box-view overlay"></router-view>
</keep-alive> </keep-alive>
</div> </div>
</div>
</div>
<!--新建项目--> <!--新建项目-->
<Modal <Modal

View File

@ -169,7 +169,7 @@
<div class="task-users"> <div class="task-users">
<ul> <ul>
<li v-for="(user, keyu) in item.task_user" :key="keyu"> <li v-for="(user, keyu) in item.task_user" :key="keyu">
<UserAvatar :userid="user.userid" size="28"/> <UserAvatar :userid="user.userid" size="32" :borderWitdh="2" :borderColor="item.color"/>
</li> </li>
</ul> </ul>
<div v-if="item.file_num > 0" class="task-icon">{{item.file_num}}<Icon type="ios-link-outline" /></div> <div v-if="item.file_num > 0" class="task-icon">{{item.file_num}}<Icon type="ios-link-outline" /></div>

View File

@ -69,7 +69,7 @@
<Col span="3" class="row-member"> <Col span="3" class="row-member">
<ul> <ul>
<li v-for="(user, keyu) in item.task_user" :key="keyu" v-if="keyu < 3"> <li v-for="(user, keyu) in item.task_user" :key="keyu" v-if="keyu < 3">
<UserAvatar :userid="user.userid" size="28"/> <UserAvatar :userid="user.userid" size="32" :borderWitdh="2" :borderColor="item.color"/>
</li> </li>
</ul> </ul>
</Col> </Col>

View File

@ -5,6 +5,7 @@
align-items: center; align-items: center;
.avatar-box { .avatar-box {
position: relative; position: relative;
border-radius: 50%;
.avatar-text { .avatar-text {
background-color: #87d068; background-color: #87d068;
} }

View File

@ -1,3 +1,11 @@
body {
overflow: hidden;
.ivu-input,
.ivu-select-selection {
border-color: #e8e8e8;
}
}
*[hidden="hidden"] { *[hidden="hidden"] {
display: none !important; display: none !important;
} }
@ -15,13 +23,6 @@
} }
} }
body {
.ivu-input,
.ivu-select-selection {
border-color: #e8e8e8;
}
}
.ivu-modal-wrap { .ivu-modal-wrap {
&.simple-modal { &.simple-modal {
.ivu-modal { .ivu-modal {

View File

@ -155,19 +155,6 @@
} }
} }
.manage-box-main { .manage-box-main {
flex: 1;
height: 100%;
display: flex;
flex-direction: column;
background: white;
.manage-box-body {
width: 100%;
flex: 1;
position: relative;
overflow: auto;
display: flex;
flex-direction: column;
.manage-box-body-content {
flex: 1; flex: 1;
position: relative; position: relative;
.manage-box-view { .manage-box-view {
@ -180,5 +167,3 @@
} }
} }
} }
}
}

View File

@ -370,9 +370,6 @@
&:first-child { &:first-child {
margin-left: 0; margin-left: 0;
} }
.common-avatar {
padding: 2px;
}
} }
} }
.task-icon { .task-icon {
@ -663,19 +660,16 @@
} }
} }
&.row-member { &.row-member {
padding: 8px;
> ul { > ul {
display: flex; height: 32px;
align-items: center;
margin-left: -4px;
overflow: hidden; overflow: hidden;
text-overflow:ellipsis; text-overflow:ellipsis;
white-space: nowrap; white-space: nowrap;
> li { > li {
list-style: none; list-style: none;
display: inline-block;
margin-left: -6px; margin-left: -6px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
&:first-child { &:first-child {
margin-left: 0; margin-left: 0;
} }