layout-header.vue
902 Bytes
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
<template>
<div class="layout-header">
<div class="back flex">
<slot name="back">
<i class="iconfont icon-back"></i>
</slot>
</div>
<div class="title flex">
{{title}}
</div>
<div class="opts flex">
<i class="iconfont icon-back"></i>
</div>
</div>
</template>
<script>
export default {
name: 'LayoutHeader',
props: {
title: String
}
};
</script>
<style lang="scss" scoped>
.layout-header {
width: 100%;
height: 45PX;
overflow: hidden;
display: flex;
.flex {
display: flex;
align-items: center;
}
.iconfont {
width: 70px;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.back {
width: 150px;
}
.title {
flex: 1;
justify-content: center;
font-size: 30px;
}
.opts {
width: 150px;
justify-content: flex-end;
}
}
</style>