index.vue
5.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<template>
<div style="background-color:#f7f7f7;padding:10px 10px;">
<div class="zhuti">
<div style="height:58px;line-height:58px;">
<div style="color:#0006"> <span>客服服务管理</span> <span style="padding:0 5px;">></span> <span
style="color:#000000e6">客服消息</span></div>
</div>
<div style="display:flex;border: 1px solid #d7d7d7;width: 80%;">
<div class="left_list">
<div :class="index == msgListIndex ?'cardClick' :'card'" v-for="index in 10" @click="getMsg(index)">
<div style="display:flex;justify-content: space-between; margin-bottom: 10px;">
<div class="name">我我去请问而且</div>
<div>2024-10-18 17:50:20</div>
</div>
<div class="const">这里是内容内容内容这里是内容内容内容这里是内容内容内容这里是内容内容内容</div>
</div>
</div>
<div class="right_list" v-if="msgListIndex!=null">
<div class="title_name">我我去请问而且我我去请问而且我我去请问而且</div>
<div class="neiBox">
<div class="kehu">Chat Bubble</div>
<div class="time">17:50:20</div>
</div>
<div class="zijiBox">
<div class="ziji">Chat Bubble</div>
<div class="time" style="text-align: right;">17:50:20</div>
</div>
<div class="footput">
<el-input v-model="msg" placeholder="请输入" style="width:90%;margin-right: 15px;" />
<el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">发送
</el-button>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
msg:'',
msgListIndex:null,
tableData:[]
}
},
created() {
},
computed: {
},
methods: {
getMsg(index){
console.log(index)
this.msgListIndex = index
}
}
}
</script>
<style scoped>
/deep/ .first-column-bg {
background-color: #f4f4f5 !important;
}
.zhuti {
padding: 0 20px 20px 20px;
min-height: calc(100vh - 50px - 20px);
background-color: #fff;
}
/deep/ .el-form-item__content {
width: 80%;
}
.left_list{
border-right: 1px solid #d7d7d7;
width: 25%;
height: 80vh;
overflow-y: auto; /* 允许垂直滚动 */
}
.right_list{
width: 75%;
height: 80vh;
position: relative;
overflow-y: auto; /* 允许垂直滚动 */
}
.card{
padding:20px;
border-bottom:1px solid #d7d7d7 ;
}
.card:hover{
background-color: #DEEBE2;
color: #3F9B6A;
}
.cardClick{
padding:20px;
border-bottom:1px solid #d7d7d7 ;
background-color: #3F9B6A;
color: #fff;
}
.cardClick:hover{
background-color: #3F9B6A;
color: #fff;
}
/* 针对WebKit内核的浏览器(如Chrome和Safari)隐藏滚动条 */
.left_list::-webkit-scrollbar {
display: none;
}
/* 对于Firefox,使用以下CSS属性隐藏滚动条 */
.left_list {
scrollbar-width: none; /* Firefox 64 */
}
/* 针对WebKit内核的浏览器(如Chrome和Safari)隐藏滚动条 */
.right_list::-webkit-scrollbar {
display: none;
}
/* 对于Firefox,使用以下CSS属性隐藏滚动条 */
.right_list {
scrollbar-width: none; /* Firefox 64 */
}
.const{
width:80%;
white-space: nowrap; /* 防止文字换行 */
overflow: hidden; /* 隐藏溢出的文字 */
text-overflow: ellipsis; /* 显示省略号 */
}
.title_name{
border-bottom:1px solid #d7d7d7;
padding: 20px;
}
.neiBox{
padding: 20px;
}
.zijiBox{
padding: 20px;
align-content: flex-end;
flex-wrap: wrap;
flex-direction: column;
display: flex;
}
.footput{
display: flex;
position: absolute;
bottom:0;
left:0;
padding: 10px;
width: 100%;
align-items: center;
}
.kehu {
width: 30%; /* 假设消息框占据了屏幕宽度的80% */
padding: 16px; /* 消息框内的内边距 */
background-color: #F7F5F6; /* 蓝色背景 */
color: #000; /* 白色文字 */
position: relative; /* 为了定位右上角的表情符号 */
font-size: 16px; /* 字体大小 */
text-align: left; /* 文字左对齐 */
/* 移除圆角 */
border-radius: 0;
/* 只给右上角添加圆角(如果需要的话,这里设置为0表示不添加) */
border-top-right-radius: 22px; /* 可以根据需要调整或删除此行 */
border-bottom-right-radius: 22px; /* 同上 */
/* 只保留左下角的直角(实际上不需要特别设置,因为默认就是直角) */
/* 但为了明确,我们可以设置其他三个角为0(如果之前设置了圆角的话) */
border-top-left-radius: 40px;
border-bottom-left-radius: 0; /* 左下角保持直角,这其实是默认值 */
}
.ziji{
width: 30%; /* 假设消息框占据了屏幕宽度的80% */
padding: 16px; /* 消息框内的内边距 */
background-color: #3F9B6A; /* 蓝色背景 */
color: white; /* 白色文字 */
position: relative; /* 为了定位右上角的表情符号 */
font-size: 16px; /* 字体大小 */
text-align: left; /* 文字左对齐 */
/* 移除圆角 */
border-radius: 0;
/* 只给右上角添加圆角(如果需要的话,这里设置为0表示不添加) */
border-top-right-radius: 40px; /* 可以根据需要调整或删除此行 */
border-bottom-right-radius: 0px; /* 同上 */
/* 只保留左下角的直角(实际上不需要特别设置,因为默认就是直角) */
/* 但为了明确,我们可以设置其他三个角为0(如果之前设置了圆角的话) */
border-top-left-radius: 22px;
border-bottom-left-radius:22px; /* 左下角保持直角,这其实是默认值 */
}
.time{
padding:5px;
}
</style>