refactor: ♻️ 提取 ROLE_ROOT 常量到 constants 目录并全局统一引用

This commit is contained in:
Ray.Hao
2025-05-20 10:34:44 +08:00
parent 2a3d2543ee
commit 7df7e1f47b
16 changed files with 63 additions and 64 deletions

View File

@@ -103,8 +103,12 @@ const parseDynamicRoutes = (rawRoutes: RouteVO[]): RouteRecordRaw[] => {
return parsedRoutes;
};
/**
* 在组件外使用 Pinia store 实例 @see https://pinia.vuejs.org/core-concepts/outside-component-usage.html
* 导出此hook函数用于在非组件环境(如其他store、工具函数等)中获取权限store实例
*
* 在组件中可直接使用usePermissionStore()但在组件外部需要传入store实例
* 此函数简化了这个过程避免每次都手动传入store参数
*/
export function usePermissionStoreHook() {
return usePermissionStore(store);