uni-modules组件升级,u-icon组件替换uni-icons,前面的那个网络不好的时候加载不出来

This commit is contained in:
2022-02-25 11:17:16 +08:00
parent 9bba6e4ef4
commit 2a1590172e
30 changed files with 986 additions and 797 deletions

View File

@@ -18,9 +18,8 @@
</view>
</view>
<view class="loadmore">
<u-icon name="arrow-right" @click="loadMore" v-if="members > users.length" color="#999" labelColor="#999"
label="查看更多群成员" labelPos="left" :labelSize="labelSize" :size="iconSize" />
<view class="loadmore" @click="loadMore" v-if="members > users.length">
查看更多群成员 <uni-icons size="30rpx" type="right"></uni-icons>
</view>
<u-action-sheet :actions="actionMap" :title="actionTitle" cancelText="取消" @close="hideAction"
@@ -38,11 +37,11 @@
transferGroupOwner
} from '@/apis/interfaces/im.js'
import utils from '@/utils/index.js'
import imBase from '../mixins/imBase.js'
export default {
mixins: [
imBase
import imBase from '../mixins/imBase.js'
export default {
mixins: [
imBase
],
props: {
targetId: {
@@ -71,7 +70,6 @@
}
},
created() {
this.labelSize = utils.rpx2px(24)
this.iconSize = utils.rpx2px(26)
},
mounted() {
@@ -102,10 +100,10 @@
hideAction(item) {
this.actionShow = false
},
showAction(item) {
if (item.is_admin == 2) {
return
}
showAction(item) {
if (item.is_admin == 2) {
return
}
this.currentUser = item
this.actionTitle = item.name
// 只有管理员以上才会弹窗
@@ -322,12 +320,16 @@
.loadmore {
font-size: 26rpx;
color: $text-gray-m;
color: $text-gray-m !important;
text-align: center;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
.uni-icons {
color: $text-gray-m !important;
}
}
</style>

View File

@@ -1,19 +1,13 @@
<template>
<view v-if="!isRemote">
<view class="state" v-if="isGroup">
<!-- 已发送 -->
<u-icon name="checkbox-mark" :size="iconSize" class="sent"
:color="message.sentStatus >= 30 ? '#34CE98' : '#999999' " />
<!-- 已阅读 -->
<!-- 已发送 -->
<uni-icons class="sent" type="checkmarkempty" size="28rpx" :color="message.sentStatus >= 30 ? '#34CE98' : '#999999'" />
<text class="readers">{{ readers }}</text>
</view>
<view class="state" v-else>
<!-- 已发送 -->
<u-icon name="checkbox-mark" :size="iconSize" class="sent"
:color="message.sentStatus >= 30 ? '#34CE98' : '#999999' " />
<!-- 已阅读 -->
<u-icon name="checkbox-mark" :size="iconSize" class="receive"
:color="message.sentStatus >= 50 ? '#34CE98' : '#999999' " />
<view class="state" v-else>
<uni-icons class="sent" type="checkmarkempty" size="28rpx" :color="message.sentStatus >= 30 ? '#34CE98' : '#999999'" />
<uni-icons class="receive" type="checkmarkempty" size="28rpx" :color="message.sentStatus >= 50 ? '#34CE98' : '#999999'" />
</view>
</view>
</template>

View File

@@ -1,9 +1,10 @@
<template>
<view class="msg--call">
<view class="name" v-if="isGroup && isRemote">{{ contact(message.senderUserId).name }}</view>
<view class="im--text" :class="isRemote ? 'left': 'right'">
<u-icon name="camera" size="22" v-if="msg.mediaType == 1" :label="label" />
<u-icon name="phone" size="22" v-else :label="label" />
<view class="im--text" :class="isRemote ? 'left': 'right'">
<uni-icons type="videocam" size="44rpx" v-if="msg.mediaType == 1" />
<uni-icons type="phone" size="40rpx" v-else />
{{ label }}
</view>
</view>
</template>
@@ -68,7 +69,8 @@
font-size: 32rpx;
color: $text-color;
display: flex;
flex-direction: row;
flex-direction: row;
align-items: center;
&.left {
border-radius: 0 20rpx 20rpx 20rpx;
@@ -80,8 +82,8 @@
background: $main-color;
color: white;
.u-icon {
color: white;
.uni-icons {
color: white !important;
}
}
}