Files
admin-sjzx/src/components/icon/back/index.vue

37 lines
753 B
Vue
Raw Normal View History

2024-03-28 13:25:41 +08:00
<template>
2024-04-19 14:35:12 +08:00
<!-- <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>
2024-03-28 13:25:41 +08:00
</template>
<script setup lang='ts'>
import { useRouter } from 'vue-router'
2024-04-19 14:35:12 +08:00
import { Back } from '@element-plus/icons-vue'
2024-03-28 13:25:41 +08:00
const { go } = useRouter()
2024-04-19 14:35:12 +08:00
defineProps(['custom'])
2024-03-28 13:25:41 +08:00
</script>
<style scoped>
.backIcon {
2024-04-19 14:35:12 +08:00
position: absolute;
top: 0;
right: 0;
font-size: 25px;
cursor: pointer;
2024-03-28 13:25:41 +08:00
}
.backIcon:hover {
2024-04-19 14:35:12 +08:00
border-radius: 25px;
background-color: lightgrey;
}
.positionStyle {
position: absolute;
right: 20px;
top: 20px;
2024-03-28 13:25:41 +08:00
}
</style>