统一聊天页的头像大小,改用rpx2px的计算,84rpx
This commit is contained in:
@@ -1,67 +1,67 @@
|
||||
<template>
|
||||
<u-alert type="warning" v-if="connection != 0" :description="description" show-icon />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
connection: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
description() {
|
||||
return this.connectionStatusMap.filter(item => item.index == this.connection)[0].text
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
connectionStatusMap: [{
|
||||
index: -1,
|
||||
text: '网络不可用'
|
||||
},
|
||||
{
|
||||
index: 0,
|
||||
text: '连接成功'
|
||||
},
|
||||
{
|
||||
index: 1,
|
||||
text: '连接中'
|
||||
},
|
||||
{
|
||||
index: 2,
|
||||
text: '未连接'
|
||||
},
|
||||
{
|
||||
index: 3,
|
||||
text: '用户账号在其它设备登录'
|
||||
},
|
||||
{
|
||||
index: 4,
|
||||
text: 'TOKEN过期'
|
||||
},
|
||||
{
|
||||
index: 6,
|
||||
text: '用户被禁用'
|
||||
},
|
||||
{
|
||||
index: 12,
|
||||
text: '退出登录'
|
||||
},
|
||||
{
|
||||
index: 13,
|
||||
text: '连接暂时被挂起'
|
||||
},
|
||||
{
|
||||
index: 14,
|
||||
text: '连接超时'
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<template>
|
||||
<u-alert type="warning" v-if="connection != 0" :description="description" show-icon />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
connection: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
description() {
|
||||
return this.connectionStatusMap.filter(item => item.index == this.connection)[0].text
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
connectionStatusMap: [{
|
||||
index: -1,
|
||||
text: '网络不可用'
|
||||
},
|
||||
{
|
||||
index: 0,
|
||||
text: '连接成功'
|
||||
},
|
||||
{
|
||||
index: 1,
|
||||
text: '连接中'
|
||||
},
|
||||
{
|
||||
index: 2,
|
||||
text: '未连接'
|
||||
},
|
||||
{
|
||||
index: 3,
|
||||
text: '用户账号在其它设备登录'
|
||||
},
|
||||
{
|
||||
index: 4,
|
||||
text: 'TOKEN过期'
|
||||
},
|
||||
{
|
||||
index: 6,
|
||||
text: '用户被禁用'
|
||||
},
|
||||
{
|
||||
index: 12,
|
||||
text: '退出登录'
|
||||
},
|
||||
{
|
||||
index: 13,
|
||||
text: '连接暂时被挂起'
|
||||
},
|
||||
{
|
||||
index: 14,
|
||||
text: '连接超时'
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
actionMap: [],
|
||||
actionTitle: '',
|
||||
currentUser: {},
|
||||
avatarSize: 45,
|
||||
avatarSize: 84,
|
||||
labelSize: 14,
|
||||
iconSize: 14
|
||||
}
|
||||
@@ -72,7 +72,7 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.avatarSize = utils.rpx2px(90)
|
||||
this.avatarSize = utils.rpx2px(84)
|
||||
this.labelSize = utils.rpx2px(24)
|
||||
this.iconSize = utils.rpx2px(26)
|
||||
},
|
||||
@@ -271,8 +271,8 @@
|
||||
.avatar {
|
||||
border-radius: 0 8rpx 0 0;
|
||||
position: relative;
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
width: 84rpx;
|
||||
height: 84rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.admin {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view class="message--cell">
|
||||
<view class="avatar">
|
||||
<u-badge max="99" shape="horn" absolute :offset="[-5, -8]" :value="item.unreadMessageCount" />
|
||||
<u-avatar :src="contact(item.targetId).portraitUrl" shape="square" size="44" />
|
||||
<u-avatar :src="contact(item.targetId).portraitUrl" shape="square" :size="avatarSize" />
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="header">
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
<script>
|
||||
import messagePreview from './messagePreview'
|
||||
import utils from '@/utils/index.js'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -27,8 +28,16 @@
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
avatarRpx: 84
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
avatarSize() {
|
||||
return utils.rpx2px(this.avatarRpx)
|
||||
},
|
||||
contact() {
|
||||
return function(targetId) {
|
||||
return this.$store.getters.contactInfo(targetId)
|
||||
@@ -48,6 +57,7 @@
|
||||
|
||||
.avatar {
|
||||
position: relative;
|
||||
padding-top: 5rpx;
|
||||
|
||||
.u-badge {
|
||||
z-index: 998;
|
||||
@@ -59,8 +69,6 @@
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
flex: 1;
|
||||
|
||||
|
||||
border-bottom-width: 0.5px !important;
|
||||
border-color: #f9f9f9 !important;
|
||||
border-bottom-style: solid;
|
||||
|
||||
Reference in New Issue
Block a user