mamba-layout 0.43.0 → 0.45.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 +96 -47
- package/dist/index.css +1 -1
- package/dist/index.js +722 -971
- package/dist/layout/BaseLayout.vue.d.ts +1 -0
- package/dist/layout/components/index.d.ts +0 -1
- package/dist/layout/hooks/useLayoutState.d.ts +0 -72
- package/dist/layout/hooks/useSetting.d.ts +0 -2
- package/dist/layout.css +1 -1
- package/dist/layout.global.js +32 -32
- package/dist/standalone/data/applist.d.ts +2 -0
- package/dist/standalone/data/menu.d.ts +854 -0
- package/dist/standalone/data/user.d.ts +2 -0
- package/dist/standalone/utils.d.ts +25 -0
- package/dist/utils/repoUtils.d.ts +1 -1
- package/package.json +69 -68
- package/dist/layout/components/LayoutBreadcrumb.vue.d.ts +0 -29
- package/dist/utils/createContext.d.ts +0 -8
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RouteItem } from '../layout/hooks';
|
|
2
|
+
import { useRoute, RouteRecordRaw } from 'vue-router';
|
|
3
|
+
import { LayoutApp, LayoutMenuItem } from '../layout/hooks/useSetting';
|
|
4
|
+
/**
|
|
5
|
+
* 将菜单配置转换为 Vue Router 的 routes 配置
|
|
6
|
+
* @param menus 菜单配置数组
|
|
7
|
+
* @returns Vue Router 的 routes 配置
|
|
8
|
+
*/
|
|
9
|
+
export declare const menusToRoutes: (menus: LayoutMenuItem[]) => RouteRecordRaw[];
|
|
10
|
+
export declare const findMenu: (path: string, menus: RouteItem[]) => RouteItem | undefined;
|
|
11
|
+
export declare const getAppPath: (app: LayoutApp) => string;
|
|
12
|
+
export declare const toLayoutApp: (app: LayoutApp, icon?: string) => {
|
|
13
|
+
desc: string;
|
|
14
|
+
path: string;
|
|
15
|
+
icon: string | undefined;
|
|
16
|
+
children: never[];
|
|
17
|
+
appId: string;
|
|
18
|
+
displayAppId?: string;
|
|
19
|
+
name: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const getAppIcon: (appId: string) => "metisicon-moxingku" | "metisicon-wangluojiancedian";
|
|
22
|
+
export declare const findCurrent: (route: ReturnType<typeof useRoute>, menus: RouteItem[]) => {
|
|
23
|
+
currentAppId: import('vue').Ref<string, string>;
|
|
24
|
+
defaultParentActive: import('vue').Ref<any, any>;
|
|
25
|
+
};
|
package/package.json
CHANGED
|
@@ -1,68 +1,69 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mamba-layout",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Shared Mamba Vue layout shell and standalone browser layout.",
|
|
5
|
-
"private": false,
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "./dist/index.js",
|
|
8
|
-
"module": "./dist/index.js",
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
|
-
"style": "./dist/layout.css",
|
|
11
|
-
"files": [
|
|
12
|
-
"dist"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"*.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"./
|
|
25
|
-
"./layout.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"vue
|
|
50
|
-
"vue-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@vue
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"vite
|
|
63
|
-
"
|
|
64
|
-
"vue
|
|
65
|
-
"vue-
|
|
66
|
-
"vue-
|
|
67
|
-
|
|
68
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "mamba-layout",
|
|
3
|
+
"version": "0.45.0",
|
|
4
|
+
"description": "Shared Mamba Vue layout shell and standalone browser layout.",
|
|
5
|
+
"private": false,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"style": "./dist/layout.css",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"sideEffects": [
|
|
16
|
+
"*.css",
|
|
17
|
+
"*.scss"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./styles": "./dist/layout.css",
|
|
25
|
+
"./layout.css": "./dist/layout.css",
|
|
26
|
+
"./layout.global.js": "./dist/layout.global.js"
|
|
27
|
+
},
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "vite build && vite build -c vite.standalone.config.ts",
|
|
33
|
+
"prepack": "pnpm build",
|
|
34
|
+
"prepublishOnly": "pnpm type-check && pnpm build",
|
|
35
|
+
"type-check": "vue-tsc --noEmit -p tsconfig.app.json"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"mamba",
|
|
39
|
+
"layout",
|
|
40
|
+
"vue",
|
|
41
|
+
"element-plus"
|
|
42
|
+
],
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@element-plus/icons-vue": "^2.3.1"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"element-plus": "^2.11.5",
|
|
48
|
+
"tailwindcss": "^4.0.8",
|
|
49
|
+
"vue": "^3.5.13",
|
|
50
|
+
"vue-i18n": "11",
|
|
51
|
+
"vue-router": "^4.5.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@tailwindcss/vite": "^4.1.6",
|
|
55
|
+
"@types/node": "^22.15.18",
|
|
56
|
+
"@vitejs/plugin-vue": "^5.2.3",
|
|
57
|
+
"@vue/tsconfig": "^0.7.0",
|
|
58
|
+
"element-plus": "^2.11.5",
|
|
59
|
+
"sass": "^1.83.0",
|
|
60
|
+
"tailwindcss": "^4.1.7",
|
|
61
|
+
"typescript": "~5.8.3",
|
|
62
|
+
"vite": "^6.3.5",
|
|
63
|
+
"vite-plugin-dts": "^4.5.4",
|
|
64
|
+
"vue": "^3.5.13",
|
|
65
|
+
"vue-i18n": "11",
|
|
66
|
+
"vue-router": "^4.5.0",
|
|
67
|
+
"vue-tsc": "^2.2.8"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { RouteLocationRaw } from 'vue-router';
|
|
2
|
-
export interface LayoutBreadcrumbItem {
|
|
3
|
-
title: string;
|
|
4
|
-
path?: string;
|
|
5
|
-
to?: RouteLocationRaw;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
children?: LayoutBreadcrumbItem[];
|
|
8
|
-
}
|
|
9
|
-
type __VLS_Props = {
|
|
10
|
-
items?: LayoutBreadcrumbItem[];
|
|
11
|
-
currentTitle?: string;
|
|
12
|
-
parentPath?: string;
|
|
13
|
-
preserveQueryKeys?: string[];
|
|
14
|
-
showCurrent?: boolean;
|
|
15
|
-
showBack?: boolean;
|
|
16
|
-
backTo?: RouteLocationRaw;
|
|
17
|
-
backLabel?: string;
|
|
18
|
-
};
|
|
19
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
20
|
-
parentPath: string;
|
|
21
|
-
items: LayoutBreadcrumbItem[];
|
|
22
|
-
currentTitle: string;
|
|
23
|
-
preserveQueryKeys: string[];
|
|
24
|
-
showCurrent: boolean;
|
|
25
|
-
showBack: boolean;
|
|
26
|
-
backTo: RouteLocationRaw;
|
|
27
|
-
backLabel: string;
|
|
28
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param providerComponentName - The name(s) of the component(s) providing the context.
|
|
3
|
-
*
|
|
4
|
-
* There are situations where context can come from multiple components. In such cases, you might need to give an array of component names to provide your context, instead of just a single string.
|
|
5
|
-
*
|
|
6
|
-
* @param contextName The description for injection key symbol.
|
|
7
|
-
*/
|
|
8
|
-
export declare function createContext<ContextValue>(providerComponentName: string | string[], contextName?: string): readonly [<T extends ContextValue | null | undefined = ContextValue>(fallback?: T) => T extends null ? ContextValue | null : ContextValue, (contextValue: ContextValue) => ContextValue];
|