Bread.vue
891 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
<template>
<div class="bread">
<div>
<slot name="title"></slot>
<span class="btn">
<slot name="btn"></slot>
</span>
</div>
<el-button
v-if="isShowBack"
type="text"
style="margin-right:50px;"
@click="handleClick"
>返回</el-button
>
</div>
</template>
<script>
export default {
name: 'Bread',
props: {
isShowBack: {
type: Boolean,
default: false
}
},
methods: {
handleClick() {
this.$router.go(-1)
}
}
}
</script>
<style lang="scss" scoped>
.bread {
display: flex;
align-items: center;
justify-content: space-between;
height: 50px;
border-left: 5px solid #3f51b5;
padding-left: 15px;
font-size: 16px;
font-weight: 700;
.btn {
display: inline-block;
color: #3f51b5;
margin-left: 15px;
font-size: 20px;
cursor: pointer;
}
}
</style>