index.vue
808 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
<template>
<el-button class="venus-back-button"
type="text"
:style="{ width: `${size}px`, height: `${size}px` }"
@click="handleBack">
<i class="el-icon-back" :style="{ fontSize: `${size * 0.6}px` }"></i>
</el-button>
</template>
<script>
export default {
name: "VenusBackButton",
props: {
size: {
type: Number,
default: 32,
},
},
methods: {
handleBack() {
this.$router.back();
},
},
};
</script>
<style scoped lang="scss">
.venus-back-button {
padding: 0;
display: flex;
align-items: center;
justify-content: center;
transition:
color 200ms,
background-color 200ms;
color: #303133;
background-color: white;
border-radius: 6px;
&:hover {
color: #2a58ad;
background-color: rgba(245, 245, 245);
}
}
</style>