kun-galgame-vue/src/components/BackToPrevious.vue

30 lines
551 B
Vue
Raw Normal View History

2023-05-31 07:49:54 +00:00
<script setup lang="ts">
// Vue 中不允许在 template 中用 '<' 这个符号,换成 msg
2023-05-31 16:16:19 +00:00
import { useRouter } from 'vue-router'
const router = useRouter()
const msg = '< 返回上一页'
2023-05-31 07:49:54 +00:00
</script>
<template>
2023-05-31 16:16:19 +00:00
<!-- 返回主页 -->
<div class="return" @click="router.back()">
<span>{{ msg }}</span>
</div>
2023-05-31 07:49:54 +00:00
</template>
<style lang="scss" scoped>
/* 返回主页 */
.return {
position: absolute;
bottom: 1%;
left: 2%;
color: $kungalgame-font-color-0;
cursor: pointer;
}
.return:hover {
color: $kungalgame-blue-4;
}
</style>