mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2026-01-02 14:20:21 +08:00
chore: 重构权限路由守卫
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
<script setup>
|
||||
import { useUserStore, useAuthStore, usePermissionStore } from '@/store'
|
||||
import { RoleSelect } from '@/layouts/components'
|
||||
import { initUserAndPermissions } from '@/router'
|
||||
import api from '@/api'
|
||||
|
||||
const router = useRouter()
|
||||
@@ -60,9 +59,7 @@ function handleSelect(key) {
|
||||
case 'toggleRole':
|
||||
roleSelectRef.value?.open({
|
||||
onOk() {
|
||||
initUserAndPermissions().then(() => {
|
||||
router.replace('/')
|
||||
})
|
||||
location.reload()
|
||||
},
|
||||
})
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user