Commit 9a7ef036 by Jaxon

feat(backButton): 新增 全局组件 返回按钮

1 parent 1e109536
<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>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!