mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-12-26 10:05:57 +08:00
feat(ui): 管理后台新增权限及部分组合式函数优化
This commit is contained in:
10
new-ui/projects/admin/src/components/PermissionRender.vue
Normal file
10
new-ui/projects/admin/src/components/PermissionRender.vue
Normal file
@@ -0,0 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
import { hasPermission } from "@/directives/permission";
|
||||
defineProps<{
|
||||
permission: string | string[] | true;
|
||||
}>();
|
||||
</script>
|
||||
<template>
|
||||
<slot v-if="hasPermission(permission)" />
|
||||
<slot v-else name="none" />
|
||||
</template>
|
||||
Reference in New Issue
Block a user