perf: Improve the use of store in the app

This commit is contained in:
vince
2024-07-05 23:15:46 +08:00
parent ad6ae1d21d
commit 8042e2b044
39 changed files with 387 additions and 224 deletions

View File

@@ -0,0 +1,26 @@
<!--
Access control component for fine-grained access control.
-->
<script lang="ts" setup>
interface Props {
/**
* Specified role is visible
* - When the permission mode is 'frontend', the value can be a role value.
* - When the permission mode is 'backend', the value can be a code permission value.
* @default ''
*/
roles?: string[];
}
defineOptions({
name: 'FrontendAuthority',
});
withDefaults(defineProps<Props>(), {
roles: undefined,
});
</script>
<template>
<slot></slot>
</template>