Compare commits

..

No commits in common. "6dc7114eea3b085512b8460b57fb6aa58146c8ea" and "db99bb9bc482982bbcb01084cff4207e21b7aa44" have entirely different histories.

5 changed files with 6 additions and 20 deletions

View File

@ -1,12 +1,3 @@
## [3.1.12](https://github.com/WeBankFinTech/fes.js/compare/v3.1.11...v3.1.12) (2024-05-30)
### Features
* plugin-access中导出hasAccessSync方法 ([56f6120](https://github.com/WeBankFinTech/fes.js/commit/56f6120f889a88b37760db029faa597597572831))
## [3.1.11](https://ssh.github.com:443/WeBankFinTech/fes.js/compare/v3.1.10...v3.1.11) (2024-05-24)

View File

@ -1,7 +1,7 @@
{
"name": "fes.js",
"type": "module",
"version": "3.1.12",
"version": "3.1.11",
"private": true,
"description": "一个好用的前端管理台快速开发框架",
"preferGlobal": true,

View File

@ -1,6 +1,6 @@
{
"name": "@fesjs/plugin-access",
"version": "3.1.6",
"version": "3.1.5",
"description": "@fesjs/plugin-access",
"main": "lib/index.js",
"files": [

View File

@ -145,13 +145,8 @@ export const install = (app) => {
app.component("Access", createComponent(useAccess));
};
export const hasAccessSync = (path) => {
return match(unref(path), getAllowAccessIds());
}
export const access = {
hasAccess,
hasAccessSync,
isDataReady,
setRole,
getRole: () => {
@ -163,6 +158,10 @@ export const access = {
setPresetAccess,
};
export const hasAccessSync = (path) => {
return match(unref(path), getAllowAccessIds());
}
export const useAccess = (path) => {
const allowPageIds = computed(getAllowAccessIds);
const result = computed(() => {

View File

@ -3,14 +3,10 @@ import type { Ref } from 'vue';
export const access: {
hasAccess: (accessId: string | number) => Promise<boolean>;
hasAccessSync: (accessId: string | number) => boolean;
isDataReady: () => boolean;
setRole: (roleId: string | Promise<string>) => void;
getRole: () => string;
setAccess: (accessIds: Array<string | number> | Promise<Array<string | number>>) => void;
getAccess: () => string[];
match: (path: string, accessIds: string[]) => boolean;
setPresetAccess: (accessId: string | string[]) => void;
};
export function useAccess(accessId: string | number): Ref<boolean>;