@maxtropy/v-components 0.0.1-beta.0
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 +24 -0
- package/dist/mx-vcomponents.es.js +9288 -0
- package/dist/style.css +1 -0
- package/dist/types/api/staff.d.ts +3 -0
- package/dist/types/api/tenant.d.ts +3 -0
- package/dist/types/api/user.d.ts +13 -0
- package/dist/types/common/const.d.ts +33 -0
- package/dist/types/common/entity.d.ts +112 -0
- package/dist/types/common/fetch.d.ts +13 -0
- package/dist/types/common/request.d.ts +30 -0
- package/dist/types/common/subject.d.ts +20 -0
- package/dist/types/components/headnavigation/HeadNavigation.vue.d.ts +45 -0
- package/dist/types/components/headnavigation/MenuBar.vue.d.ts +35 -0
- package/dist/types/components/headnavigation/index.d.ts +7 -0
- package/dist/types/components/index.d.ts +6 -0
- package/dist/types/components/sidermenu/HambShow.vue.d.ts +16 -0
- package/dist/types/components/sidermenu/SiderMenu.vue.d.ts +46 -0
- package/dist/types/components/sidermenu/index.d.ts +7 -0
- package/dist/types/components/switchstaff/CustomSvg.vue.d.ts +2 -0
- package/dist/types/components/switchstaff/SwitchStaff.vue.d.ts +32 -0
- package/dist/types/components/switchstaff/index.d.ts +7 -0
- package/dist/types/components/systemcontent/SystemContent.vue.d.ts +51 -0
- package/dist/types/components/systemcontent/index.d.ts +7 -0
- package/dist/types/components/usercontent/ArrowSvg.vue.d.ts +2 -0
- package/dist/types/components/usercontent/UserContent.vue.d.ts +32 -0
- package/dist/types/components/usercontent/UserSvg.vue.d.ts +2 -0
- package/dist/types/components/usercontent/index.d.ts +7 -0
- package/dist/types/constants/const.d.ts +1 -0
- package/dist/types/constants/index.d.ts +2 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/utils/hooks.d.ts +15 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/lib.d.ts +5 -0
- package/package.json +65 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Router } from 'vue-router';
|
|
2
|
+
interface Props {
|
|
3
|
+
title?: string;
|
|
4
|
+
showLogo?: boolean;
|
|
5
|
+
customClass?: string;
|
|
6
|
+
router?: Router;
|
|
7
|
+
linkEnable?: boolean;
|
|
8
|
+
linkPath?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
11
|
+
title: string;
|
|
12
|
+
showLogo: boolean;
|
|
13
|
+
customClass: string;
|
|
14
|
+
router: undefined;
|
|
15
|
+
linkEnable: boolean;
|
|
16
|
+
linkPath: string;
|
|
17
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
18
|
+
title: string;
|
|
19
|
+
showLogo: boolean;
|
|
20
|
+
customClass: string;
|
|
21
|
+
router: undefined;
|
|
22
|
+
linkEnable: boolean;
|
|
23
|
+
linkPath: string;
|
|
24
|
+
}>>> & {
|
|
25
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
title: string;
|
|
28
|
+
customClass: string;
|
|
29
|
+
router: Router;
|
|
30
|
+
showLogo: boolean;
|
|
31
|
+
linkEnable: boolean;
|
|
32
|
+
linkPath: string;
|
|
33
|
+
}>;
|
|
34
|
+
export default _default;
|
|
35
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
36
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
37
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
38
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
39
|
+
} : {
|
|
40
|
+
type: import('vue').PropType<T[K]>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
45
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
46
|
+
default: D[K];
|
|
47
|
+
}> : P[K];
|
|
48
|
+
};
|
|
49
|
+
declare type __VLS_Prettify<T> = {
|
|
50
|
+
[K in keyof T]: T[K];
|
|
51
|
+
} & {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
customClass?: string;
|
|
3
|
+
localEnv?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
6
|
+
customClass: string;
|
|
7
|
+
localEnv: string;
|
|
8
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
9
|
+
customClass: string;
|
|
10
|
+
localEnv: string;
|
|
11
|
+
}>>>, {
|
|
12
|
+
customClass: string;
|
|
13
|
+
localEnv: string;
|
|
14
|
+
}>;
|
|
15
|
+
export default _default;
|
|
16
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
17
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
18
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
19
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
20
|
+
} : {
|
|
21
|
+
type: import('vue').PropType<T[K]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
26
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
27
|
+
default: D[K];
|
|
28
|
+
}> : P[K];
|
|
29
|
+
};
|
|
30
|
+
declare type __VLS_Prettify<T> = {
|
|
31
|
+
[K in keyof T]: T[K];
|
|
32
|
+
} & {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MAGIC_NUM = 100;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { UserInfo } from '../api/user';
|
|
2
|
+
import { MenuItemProps } from '../common/entity';
|
|
3
|
+
export declare const getTenantCurrent: () => import("../common/subject").ISubjectHolder<UserInfo>;
|
|
4
|
+
export declare function refreshCurrrent(callback?: () => void): void;
|
|
5
|
+
export declare function useCurrent(callback?: (current?: UserInfo) => void): void;
|
|
6
|
+
export declare function useStaffList(callback?: (staffList?: any) => void): void;
|
|
7
|
+
export declare function useMenuList(callback: (menuList?: MenuItemProps[]) => void): void;
|
|
8
|
+
export declare function useLogout(): void;
|
|
9
|
+
declare const _default: {
|
|
10
|
+
useCurrent: typeof useCurrent;
|
|
11
|
+
useStaffList: typeof useStaffList;
|
|
12
|
+
useMenuList: typeof useMenuList;
|
|
13
|
+
useLogout: typeof useLogout;
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MenuItem, MenuItemProps } from '../common/entity';
|
|
2
|
+
export declare function getMenuMap(list: MenuItemProps[]): Record<string, MenuItem>;
|
|
3
|
+
export declare function inserDataOfWeight(list: MenuItem[], data: MenuItem): void;
|
|
4
|
+
export declare function getThirdLevelPathToNodeMap(list?: MenuItemProps[]): Record<string, MenuItemProps>;
|
|
5
|
+
export declare function list2Tree(list?: MenuItemProps[]): MenuItem[];
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxtropy/v-components",
|
|
3
|
+
"version": "0.0.1-beta.0",
|
|
4
|
+
"files": [
|
|
5
|
+
"dist"
|
|
6
|
+
],
|
|
7
|
+
"types": "./dist/types/index.d.ts",
|
|
8
|
+
"module": "./dist/mx-vcomponents.es.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/mx-vcomponents.es.js"
|
|
12
|
+
},
|
|
13
|
+
"./dist/style.css": "./dist/style.css"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "rimraf dist && vue-tsc && vite build",
|
|
20
|
+
"docs:dev": "vitepress dev docs",
|
|
21
|
+
"docs:build": "vitepress build docs",
|
|
22
|
+
"docs:serve": "vitepress serve docs",
|
|
23
|
+
"prepare": "husky install"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"element-plus": ">=2.3.4",
|
|
27
|
+
"lodash-es": ">=4",
|
|
28
|
+
"rxjs": ">=7.8.0",
|
|
29
|
+
"vue": ">=3.2.0",
|
|
30
|
+
"vue-router": ">=4"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/node": "^17.0.45",
|
|
34
|
+
"@typescript-eslint/eslint-plugin": "^5.59.5",
|
|
35
|
+
"@typescript-eslint/parser": "^5.59.5",
|
|
36
|
+
"@vitejs/plugin-vue": "^4.2.1",
|
|
37
|
+
"@vue/eslint-config-prettier": "^7.1.0",
|
|
38
|
+
"eslint": "^8.40.0",
|
|
39
|
+
"eslint-config-prettier": "^8.8.0",
|
|
40
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
41
|
+
"eslint-plugin-vue": "^9.11.1",
|
|
42
|
+
"husky": "^8.0.3",
|
|
43
|
+
"postcss": "^8.4.23",
|
|
44
|
+
"postcss-prefix-selector": "^1.16.0",
|
|
45
|
+
"prettier": "^2.8.8",
|
|
46
|
+
"rimraf": "^3.0.2",
|
|
47
|
+
"sass": "^1.49.7",
|
|
48
|
+
"typescript": "^4.4.4",
|
|
49
|
+
"unplugin-element-plus": "^0.7.1",
|
|
50
|
+
"vite": "^4.3.4",
|
|
51
|
+
"vitepress": "1.0.0-alpha.75",
|
|
52
|
+
"vitepress-theme-demoblock": "^2.0.2",
|
|
53
|
+
"vue-tsc": "^1.6.4",
|
|
54
|
+
"vue": "3.2.44",
|
|
55
|
+
"vue-router": "^4.0.16"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@types/lodash-es": "^4.17.7",
|
|
59
|
+
"element-plus": "^2.3.4",
|
|
60
|
+
"lodash-es": "^4.17.21",
|
|
61
|
+
"rxjs": ">=7.8.0",
|
|
62
|
+
"vue": ">=3.2.44",
|
|
63
|
+
"vue-router": "^4.0.16"
|
|
64
|
+
}
|
|
65
|
+
}
|