vsoft-ui 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/install.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import { App } from 'vue';
2
- import { PermissionChecker } from './components/table/types';
3
-
4
- export interface InstallOptions {
5
- /** 初始权限列表 */
6
- permissions?: string[];
7
- /** 自定义权限检查函数 */
8
- permissionChecker?: PermissionChecker;
9
- }
10
- export declare function install(app: App, options?: InstallOptions): void;
@@ -1,6 +0,0 @@
1
- import { App } from 'vue';
2
-
3
- /**
4
- * 安装权限指令
5
- */
6
- export declare function installPermissionDirective(app: App): void;
@@ -1,66 +0,0 @@
1
- import { App, InjectionKey } from 'vue';
2
- import { PermissionChecker } from '../components/table/types';
3
-
4
- export { installPermissionDirective } from './directive';
5
- /**
6
- * 权限注入的 key
7
- */
8
- export declare const PERMISSION_KEY: InjectionKey<PermissionService>;
9
- /**
10
- * 权限服务类
11
- */
12
- export declare class PermissionService {
13
- private permissions;
14
- private checker;
15
- /**
16
- * 设置权限列表
17
- */
18
- setPermissions(permissions: string[]): void;
19
- /**
20
- * 添加权限
21
- */
22
- addPermission(permission: string): void;
23
- /**
24
- * 移除权限
25
- */
26
- removePermission(permission: string): void;
27
- /**
28
- * 检查权限
29
- */
30
- check(permission?: string | string[]): boolean;
31
- /**
32
- * 检查所有权限(需要全部满足)
33
- */
34
- checkAll(permissions: string[]): boolean;
35
- /**
36
- * 设置自定义权限检查函数
37
- */
38
- setChecker(checker: PermissionChecker): void;
39
- /**
40
- * 清空权限
41
- */
42
- clear(): void;
43
- /**
44
- * 获取所有权限
45
- */
46
- getAll(): string[];
47
- /**
48
- * 检查是否有权限
49
- */
50
- has(permission: string): boolean;
51
- }
52
- /**
53
- * 创建权限服务实例
54
- */
55
- export declare function createPermissionService(): PermissionService;
56
- /**
57
- * 安装权限插件
58
- */
59
- export declare function installPermission(app: App, options?: {
60
- permissions?: string[];
61
- checker?: PermissionChecker;
62
- }): void;
63
- /**
64
- * 使用权限服务(Composable)
65
- */
66
- export declare function usePermission(): PermissionService;