Files
admin-sjzx/src/components/icon/back/index.vue
2024-11-22 08:45:42 +08:00

37 lines
754 B
Vue

<template>
<!-- <div style='width: 12px;'></div>-->
<!-- <el-icon color='black' class='backIcon'>-->
<!-- <close @click='go(-1)' />-->
<!-- </el-icon>-->
<el-button @click='go(-1)' :class='{positionStyle:custom,ml10:true}' :icon='Back'>返回</el-button>
</template>
<script setup lang='ts'>
import { useRouter } from 'vue-router'
import { Back } from '@element-plus/icons-vue'
const { go } = useRouter()
defineProps(['custom'])
</script>
<style scoped>
.backIcon {
position: absolute;
top: 0;
right: 0;
font-size: 25px;
cursor: pointer;
}
.backIcon:hover {
border-radius: 25px;
background-color: lightgrey;
}
.positionStyle {
position: absolute;
right: 20px;
top: 20px;
}
</style>