10
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<view @tap.prevent="clickConversationItem" :class="['conversation_item',source.isPinned?'pinned' : '']">
|
||||
<view @longtap.prevent="longtapConversationItem" @tap.prevent="clickConversationItem" :class="['conversation_item',source.isPinned?'pinned' : '']">
|
||||
<view class="left_info">
|
||||
<my-avatar :isGroup="isGroup" :isNotify="isNotify" :src="source.faceURL" :desc="source.showName"
|
||||
size="46" />
|
||||
<my-avatar :isGroup="isGroup" :isNotify="isNotify" :src="source.faceURL" :desc="source.showName" size="46" />
|
||||
<view class="details">
|
||||
<view class="title">
|
||||
<text class="conversation_name">
|
||||
@@ -38,9 +37,6 @@
|
||||
default: () => {},
|
||||
},
|
||||
},
|
||||
created() {
|
||||
console.log(this.source)
|
||||
},
|
||||
computed: {
|
||||
latestMessage() {
|
||||
if (this.source.latestMsg === "") return "";
|
||||
@@ -71,6 +67,10 @@
|
||||
//console.log(this.source);
|
||||
prepareConversationState(this.source);
|
||||
},
|
||||
longtapConversationItem() {
|
||||
//console.log(this.source);
|
||||
this.$emit('longtapEvent',this.source);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -78,9 +78,17 @@
|
||||
<style lang="scss" scoped>
|
||||
.conversation_item {
|
||||
@include btwBox();
|
||||
flex-direction: row;
|
||||
padding: 12rpx 44rpx 20rpx;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
&::after {
|
||||
content: " ";
|
||||
border-bottom: 1px solid #eee;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
left: 140rpx;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
&.pinned{
|
||||
background-color: #ededed;
|
||||
}
|
||||
@@ -91,6 +99,9 @@
|
||||
|
||||
.left_info {
|
||||
@include btwBox();
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 12rpx 44rpx 20rpx;
|
||||
flex:1;
|
||||
|
||||
.details {
|
||||
@@ -99,7 +110,6 @@
|
||||
margin-left: 24rpx;
|
||||
height: 46px;
|
||||
color: $uni-text-color;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding-bottom:20rpx;
|
||||
.title{
|
||||
@include btwBox();
|
||||
|
||||
Reference in New Issue
Block a user