提交 | 用户 | 时间
|
820397
|
1 |
<!-- header --> |
H |
2 |
<template> |
|
3 |
<el-header class="chat-header"> |
|
4 |
<div class="title"> |
|
5 |
{{ title }} |
|
6 |
</div> |
|
7 |
<div class="title-right"> |
|
8 |
<slot></slot> |
|
9 |
</div> |
|
10 |
</el-header> |
|
11 |
</template> |
|
12 |
|
|
13 |
<script setup lang="ts"> |
|
14 |
// 设置组件属性 |
|
15 |
defineProps({ |
|
16 |
title: { |
|
17 |
type: String, |
|
18 |
required: true |
|
19 |
} |
|
20 |
}) |
|
21 |
</script> |
|
22 |
|
|
23 |
<style scoped lang="scss"> |
|
24 |
.chat-header { |
|
25 |
display: flex; |
|
26 |
flex-direction: row; |
|
27 |
justify-content: space-between; |
|
28 |
align-items: center; |
|
29 |
padding: 0 10px; |
|
30 |
white-space: nowrap; |
|
31 |
text-overflow: ellipsis; |
|
32 |
background-color: #ececec; |
|
33 |
width: 100%; |
|
34 |
|
|
35 |
.title { |
|
36 |
font-size: 20px; |
|
37 |
font-weight: bold; |
|
38 |
overflow: hidden; |
|
39 |
color: #3e3e3e; |
|
40 |
max-width: 220px; |
|
41 |
} |
|
42 |
|
|
43 |
.title-right { |
|
44 |
display: flex; |
|
45 |
flex-direction: row; |
|
46 |
} |
|
47 |
} |
|
48 |
</style> |