2022-04-21 18:20:39 +08:00
|
|
|
<script lang="ts" setup>
|
2022-04-22 01:16:02 +08:00
|
|
|
import { useRouter } from "vue-router"
|
2022-04-22 12:47:04 +08:00
|
|
|
import SwitchRoles from "./components/SwitchRoles.vue"
|
2022-04-21 18:20:39 +08:00
|
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
const handleRolesChange = () => {
|
2022-08-19 17:03:38 +08:00
|
|
|
router.push({ path: "/403" })
|
2022-04-21 18:20:39 +08:00
|
|
|
}
|
|
|
|
</script>
|
2022-04-22 12:47:04 +08:00
|
|
|
|
|
|
|
<template>
|
|
|
|
<div class="app-container">
|
2022-08-19 17:03:38 +08:00
|
|
|
<el-tag type="success" size="large"> 当前页面只有 admin 权限可见 </el-tag>
|
2022-04-22 12:47:04 +08:00
|
|
|
<SwitchRoles @change="handleRolesChange" />
|
|
|
|
</div>
|
|
|
|
</template>
|
2022-08-19 17:03:38 +08:00
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.el-tag {
|
|
|
|
margin-bottom: 15px;
|
|
|
|
}
|
|
|
|
</style>
|