export function createPermissionGuard(router) { | export function createPermissionGuard(router) { | ||||
const userStore = useUserStore() | const userStore = useUserStore() | ||||
userStore.getUserInfos() | |||||
const permissionStore = usePermissionStore() | const permissionStore = usePermissionStore() | ||||
router.beforeEach(async(to, from, next) => { | router.beforeEach(async(to, from, next) => { | ||||
const oidcUser = await getUserInfo() | const oidcUser = await getUserInfo() |
<n-tabs type="line" animated> | <n-tabs type="line" animated> | ||||
<n-tab-pane display-directive="show" name="pc" tab="管理端菜单"> | <n-tab-pane display-directive="show" name="pc" tab="管理端菜单"> | ||||
<n-tree | <n-tree | ||||
v-if="tabsTreeVisible" | |||||
v-show="tabsTreeVisible" | |||||
ref="adminTreeRef" | ref="adminTreeRef" | ||||
block-line | block-line | ||||
cascade | cascade | ||||
</n-tab-pane> | </n-tab-pane> | ||||
<n-tab-pane display-directive="show" name="mp" tab="小程序菜单"> | <n-tab-pane display-directive="show" name="mp" tab="小程序菜单"> | ||||
<n-tree | <n-tree | ||||
v-if="tabsTreeVisible" | |||||
v-show="tabsTreeVisible" | |||||
ref="miniTreeRef" | ref="miniTreeRef" | ||||
block-line | block-line | ||||
cascade | cascade |