提交 b56d890d 编写于 作者: DCloud_JSON's avatar DCloud_JSON

更新 优化单图片时的样式

上级 dab3c5ec
<template>
<view class="uni-im-rich-text"
:class="{'isFromSelf':isFromSelf, 'only1u': trBody.length === 0 &&webInfoList.length === 1}">
:class="{'isFromSelf':isFromSelf, 'only1u': trBody.length === 0 &&webInfoList.length === 1 , isSingeImg}">
<template v-for="(item,index) in trBody" :index="index">
<template v-if="item.name == 'span'">
<text v-if="item.attrs && item.attrs.class == 'nickname'" class="text nickname"
......@@ -89,6 +89,9 @@
// }
},
computed: {
isSingeImg() {
return this.msg.body.filter(item => item.name != 'img' && item.text).length === 0
},
imgList() {
return this.msg.body.filter(item => item.name == 'img').map(item => item.attrs.src)
},
......@@ -321,4 +324,10 @@
.web-info .link-box .copy:hover {
opacity: 0.8;
}
/* #ifndef APP-NVUE */
.uni-im-rich-text.isSingeImg {
background-color: transparent !important;
padding: 0;
}
/* #endif */
</style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册