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
| <!-- header -->
| <template>
| <el-header class="chat-header">
| <div class="title">
| {{ title }}
| </div>
| <div class="title-right">
| <slot></slot>
| </div>
| </el-header>
| </template>
|
| <script setup lang="ts">
| // 设置组件属性
| defineProps({
| title: {
| type: String,
| required: true
| }
| })
| </script>
|
| <style scoped lang="scss">
| .chat-header {
| display: flex;
| flex-direction: row;
| justify-content: space-between;
| align-items: center;
| padding: 0 10px;
| white-space: nowrap;
| text-overflow: ellipsis;
| background-color: #ececec;
| width: 100%;
|
| .title {
| font-size: 20px;
| font-weight: bold;
| overflow: hidden;
| color: #3e3e3e;
| max-width: 220px;
| }
|
| .title-right {
| display: flex;
| flex-direction: row;
| }
| }
| </style>
|
|