vsoft-ui 1.0.3 → 1.0.4
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/README.md +240 -214
- package/dist/vsoft-ui.css +1 -0
- package/dist/vsoft-ui.es.js +53925 -145
- package/dist/vsoft-ui.umd.js +50 -1
- package/package.json +29 -44
- package/dist/components/button/index.d.ts +0 -3
- package/dist/components/button/src/Button.vue.d.ts +0 -24
- package/dist/components/input/index.d.ts +0 -3
- package/dist/components/input/src/Input.vue.d.ts +0 -27
- package/dist/directives/permission.d.ts +0 -11
- package/dist/hooks/usePermission.d.ts +0 -12
- package/dist/index.d.ts +0 -10
- package/dist/utils/permission.d.ts +0 -33
package/package.json
CHANGED
|
@@ -1,67 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vsoft-ui",
|
|
3
|
-
"version": "1.0.3",
|
|
4
|
-
"description": "基于Element Plus的二次封装组件库,支持全局按钮级权限控制",
|
|
5
3
|
"type": "module",
|
|
4
|
+
"version": "1.0.4",
|
|
5
|
+
"description": "基于Element Plus的二次封装组件库,包含全局权限控制功能",
|
|
6
6
|
"main": "dist/vsoft-ui.umd.js",
|
|
7
7
|
"module": "dist/vsoft-ui.es.js",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"import": "./dist/vsoft-ui.es.js",
|
|
13
|
-
"require": "./dist/vsoft-ui.umd.js"
|
|
14
|
-
},
|
|
15
|
-
"./dist/*": "./dist/*",
|
|
16
|
-
"./package.json": "./package.json"
|
|
17
|
-
},
|
|
8
|
+
"types": "dist/src/index.d.ts",
|
|
18
9
|
"files": [
|
|
19
|
-
"dist"
|
|
20
|
-
"README.md",
|
|
21
|
-
"LICENSE"
|
|
10
|
+
"dist"
|
|
22
11
|
],
|
|
23
12
|
"scripts": {
|
|
24
|
-
"dev": "vite
|
|
13
|
+
"dev": "vite",
|
|
25
14
|
"build": "vite build",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
15
|
+
"build:types": "vue-tsc --declaration --emitDeclarationOnly --outDir dist",
|
|
16
|
+
"preview": "vite preview",
|
|
17
|
+
"lint": "eslint . --ext .vue,.js,.ts,.jsx,.tsx --fix",
|
|
18
|
+
"docs:dev": "vitepress dev docs --port 8081",
|
|
19
|
+
"docs:build": "vitepress build docs",
|
|
20
|
+
"docs:preview": "vitepress preview docs"
|
|
32
21
|
},
|
|
33
22
|
"keywords": [
|
|
34
|
-
"
|
|
23
|
+
"vue3",
|
|
35
24
|
"element-plus",
|
|
36
|
-
"component",
|
|
37
|
-
"permission"
|
|
38
|
-
"ui",
|
|
39
|
-
"vsoft-ui"
|
|
25
|
+
"component-library",
|
|
26
|
+
"permission-control"
|
|
40
27
|
],
|
|
41
28
|
"author": "",
|
|
42
29
|
"license": "MIT",
|
|
43
30
|
"packageManager": "pnpm@10.20.0",
|
|
44
31
|
"peerDependencies": {
|
|
45
|
-
"vue": "^3.3.0"
|
|
46
|
-
"element-plus": "^2.13.0"
|
|
32
|
+
"vue": "^3.3.0"
|
|
47
33
|
},
|
|
48
34
|
"dependencies": {
|
|
49
|
-
"vue
|
|
35
|
+
"@element-plus/icons-vue": "^2.3.2",
|
|
36
|
+
"element-plus": "^2.13.0"
|
|
50
37
|
},
|
|
51
38
|
"devDependencies": {
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"eslint": "^8.
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
39
|
+
"@types/node": "^25.0.3",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^8.51.0",
|
|
41
|
+
"@typescript-eslint/parser": "^8.51.0",
|
|
42
|
+
"@vitejs/plugin-vue": "^6.0.3",
|
|
43
|
+
"eslint": "^9.39.2",
|
|
44
|
+
"eslint-plugin-vue": "^10.6.2",
|
|
45
|
+
"typescript": "^5.9.3",
|
|
46
|
+
"vite": "^7.3.0",
|
|
59
47
|
"vitepress": "^1.6.4",
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"url": "git+https://github.com/your-username/vsoft-ui.git"
|
|
65
|
-
},
|
|
66
|
-
"homepage": "https://your-username.github.io/vsoft-ui/"
|
|
48
|
+
"vitepress-theme-demoblock": "^3.1.3",
|
|
49
|
+
"vue": "^3.5.26",
|
|
50
|
+
"vue-tsc": "^3.2.1"
|
|
51
|
+
}
|
|
67
52
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
permission?: string | string[];
|
|
3
|
-
permissionMode?: 'any' | 'all';
|
|
4
|
-
}
|
|
5
|
-
declare function __VLS_template(): {
|
|
6
|
-
attrs: Partial<{}>;
|
|
7
|
-
slots: {
|
|
8
|
-
default?(_: {}): any;
|
|
9
|
-
};
|
|
10
|
-
refs: {};
|
|
11
|
-
rootEl: any;
|
|
12
|
-
};
|
|
13
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
-
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
15
|
-
permission: string | string[];
|
|
16
|
-
permissionMode: "any" | "all";
|
|
17
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
|
-
export default _default;
|
|
20
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
-
new (): {
|
|
22
|
-
$slots: S;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
permission?: string | string[];
|
|
3
|
-
permissionMode?: 'any' | 'all';
|
|
4
|
-
}
|
|
5
|
-
declare function __VLS_template(): {
|
|
6
|
-
attrs: Partial<{}>;
|
|
7
|
-
slots: {
|
|
8
|
-
prepend?(_: {}): any;
|
|
9
|
-
append?(_: {}): any;
|
|
10
|
-
prefix?(_: {}): any;
|
|
11
|
-
suffix?(_: {}): any;
|
|
12
|
-
};
|
|
13
|
-
refs: {};
|
|
14
|
-
rootEl: any;
|
|
15
|
-
};
|
|
16
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
-
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
18
|
-
permission: string | string[];
|
|
19
|
-
permissionMode: "any" | "all";
|
|
20
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
22
|
-
export default _default;
|
|
23
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
-
new (): {
|
|
25
|
-
$slots: S;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
export interface UsePermissionOptions {
|
|
3
|
-
mode?: 'any' | 'all';
|
|
4
|
-
}
|
|
5
|
-
export declare function usePermission(): {
|
|
6
|
-
permissions: Ref<string[], string[]>;
|
|
7
|
-
hasPermission: (requiredPermissions: string | string[]) => boolean;
|
|
8
|
-
hasAnyPermission: (requiredPermissions: string | string[]) => boolean;
|
|
9
|
-
hasAllPermissions: (requiredPermissions: string | string[]) => boolean;
|
|
10
|
-
createPermissionComputed: (requiredPermissions: Ref<string | string[]> | string | string[], options?: UsePermissionOptions) => import('vue').ComputedRef<boolean>;
|
|
11
|
-
setPermissions: (permissions: string[]) => void;
|
|
12
|
-
};
|
package/dist/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
|
-
import { default as Button } from './components/button';
|
|
3
|
-
import { default as Input } from './components/input';
|
|
4
|
-
import { permission } from './utils/permission';
|
|
5
|
-
import { usePermission } from './hooks/usePermission';
|
|
6
|
-
declare const VSoftUI: {
|
|
7
|
-
install(app: App): void;
|
|
8
|
-
};
|
|
9
|
-
export { Button, Input, permission, usePermission, VSoftUI };
|
|
10
|
-
export default VSoftUI;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
declare class Permission {
|
|
2
|
-
private permissions;
|
|
3
|
-
/**
|
|
4
|
-
* 设置用户权限
|
|
5
|
-
* @param permissions 权限数组
|
|
6
|
-
*/
|
|
7
|
-
setPermissions(permissions: string[]): void;
|
|
8
|
-
/**
|
|
9
|
-
* 获取当前用户权限
|
|
10
|
-
* @returns 权限数组
|
|
11
|
-
*/
|
|
12
|
-
getPermissions(): string[];
|
|
13
|
-
/**
|
|
14
|
-
* 检查是否拥有任一权限
|
|
15
|
-
* @param requiredPermissions 需要的权限
|
|
16
|
-
* @returns 是否拥有权限
|
|
17
|
-
*/
|
|
18
|
-
hasAny(requiredPermissions: string | string[]): boolean;
|
|
19
|
-
/**
|
|
20
|
-
* 检查是否拥有所有权限
|
|
21
|
-
* @param requiredPermissions 需要的权限
|
|
22
|
-
* @returns 是否拥有权限
|
|
23
|
-
*/
|
|
24
|
-
hasAll(requiredPermissions: string | string[]): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* 检查是否拥有指定权限
|
|
27
|
-
* @param requiredPermissions 需要的权限
|
|
28
|
-
* @returns 是否拥有权限
|
|
29
|
-
*/
|
|
30
|
-
hasPermission(requiredPermissions: string | string[]): boolean;
|
|
31
|
-
}
|
|
32
|
-
export declare const permission: Permission;
|
|
33
|
-
export {};
|