cosey 0.1.3 → 0.1.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/components/audio-card/style/index.d.ts +1 -1
- package/components/audio-viewer/style/index.d.ts +1 -1
- package/components/close/style/index.d.ts +1 -1
- package/components/col/style/index.d.ts +1 -1
- package/components/col/style/index.js +1 -1
- package/components/config-provider/config-provider.vue.js +8 -4
- package/components/config-provider/override-element-plus.d.ts +3 -2
- package/components/config-provider/override-element-plus.js +2 -2
- package/components/container/container.d.ts +0 -1
- package/components/container/container.vue.js +0 -4
- package/components/container/style/index.d.ts +1 -1
- package/components/context-menu/style/index.d.ts +1 -1
- package/components/copy/copy.d.ts +0 -2
- package/components/copy/copy.vue.d.ts +1 -7
- package/components/copy/copy.vue.js +0 -1
- package/components/copy/index.d.ts +3 -19
- package/components/copy/style/index.d.ts +1 -1
- package/components/dnd-sort/dnd-sort-item.vue.js +1 -1
- package/components/dnd-sort/style/index.d.ts +1 -1
- package/components/dnd-sort/style/index.js +1 -0
- package/components/editor/components/color-picker/color-picker.style.d.ts +1 -1
- package/components/editor/components/list/list.style.d.ts +1 -1
- package/components/editor/components/picker/picker.style.d.ts +1 -1
- package/components/editor/components/resize/resize.style.d.ts +1 -1
- package/components/editor/components/table-toolbar/table-toolbar.style.d.ts +1 -1
- package/components/editor/components/toolbar/formats/table.style.d.ts +1 -1
- package/components/editor/editor.d.ts +0 -2
- package/components/editor/editor.vue.js +1 -11
- package/components/editor/modules/image-uploader/formats/image-loading.style.d.ts +1 -1
- package/components/editor/modules/image-uploader/formats/image-loading.style.js +3 -3
- package/components/editor/style/hljs.d.ts +1 -1
- package/components/editor/style/index.d.ts +1 -1
- package/components/file-card/style/index.d.ts +1 -1
- package/components/form/style/index.d.ts +1 -1
- package/components/form-list/style/index.d.ts +1 -1
- package/components/form-query/style/index.d.ts +1 -1
- package/components/highlight/highlight.d.ts +1 -1
- package/components/highlight/highlight.vue.js +11 -4
- package/components/highlight/style/index.d.ts +1 -1
- package/components/highlight/style/index.js +15 -5
- package/components/horizontal-tree/style/index.d.ts +1 -1
- package/components/icon/style/index.d.ts +1 -1
- package/components/image-card/style/index.d.ts +1 -1
- package/components/index.js +1 -0
- package/components/long-text/style/index.d.ts +1 -1
- package/components/mask/style/index.d.ts +1 -1
- package/components/media-card-group/style/index.d.ts +1 -1
- package/components/panel/style/index.d.ts +1 -1
- package/components/row/style/index.d.ts +1 -1
- package/components/scroll-view/style/index.d.ts +1 -1
- package/components/snug-menu/style/index.d.ts +1 -1
- package/components/table/style/index.d.ts +1 -1
- package/components/table/table-column/style/index.d.ts +1 -1
- package/components/table/table-column/table-column.vue.d.ts +3 -3
- package/components/table/table-column-editor/item.vue.js +1 -1
- package/components/table/table-column-editor/style/index.d.ts +1 -1
- package/components/table/table-column-editor/style/index.js +1 -0
- package/components/table/table-export/style/index.d.ts +1 -1
- package/components/table-action/style/index.d.ts +1 -1
- package/components/theme/getGlobalStyleHook.d.ts +2 -3
- package/components/theme/getGlobalStyleHook.js +3 -8
- package/components/theme/getOverrideStyleHook.d.ts +8 -0
- package/components/theme/getOverrideStyleHook.js +39 -0
- package/components/theme/getSimpleStyleHook.d.ts +2 -2
- package/components/theme/getSimpleStyleHook.js +3 -7
- package/components/theme/getStyleHook.d.ts +2 -2
- package/components/theme/getStyleHook.js +3 -7
- package/components/theme/index.d.ts +2 -1
- package/components/theme/index.js +1 -0
- package/components/theme/theme-context.d.ts +11 -2
- package/components/theme/theme-context.js +36 -6
- package/components/theme/useStyleRegister.d.ts +1 -7
- package/components/theme/useStyleRegister.js +3 -4
- package/components/theme/util/useToken.d.ts +4 -4
- package/components/theme/util/useToken.js +6 -6
- package/components/transition/style/index.d.ts +1 -1
- package/components/transition-group/index.d.ts +3 -3
- package/components/transition-group/style/index.d.ts +1 -1
- package/components/transition-group/transition-group.vue.d.ts +1 -1
- package/components/upload/index.d.ts +0 -3
- package/components/upload/style/index.d.ts +1 -1
- package/components/upload/upload.d.ts +0 -2
- package/components/upload/upload.js +0 -1
- package/components/upload/upload.vue.d.ts +0 -1
- package/components/upload/upload.vue.js +0 -4
- package/components/video-card/style/index.d.ts +1 -1
- package/components/video-card/video-card.vue.js +1 -1
- package/components/video-viewer/style/index.d.ts +1 -1
- package/config/http.d.ts +1 -1
- package/config/http.js +1 -1
- package/config/index.d.ts +22 -22
- package/config/nprogress.style.d.ts +1 -1
- package/config/nprogress.style.js +1 -1
- package/hooks/useUpsert.d.ts +15 -16
- package/hooks/useUpsert.js +3 -3
- package/layout/layout-aside/style/index.d.ts +1 -1
- package/layout/layout-auth/style/index.d.ts +1 -1
- package/layout/layout-base/layout-base.vue.js +8 -8
- package/layout/layout-base/style/index.d.ts +1 -1
- package/layout/layout-brand/style/index.d.ts +1 -1
- package/layout/layout-change-password/style/index.d.ts +1 -1
- package/layout/layout-color-scheme/style/index.d.ts +2 -2
- package/layout/layout-content/style/index.d.ts +1 -1
- package/layout/layout-exception/style/index.d.ts +1 -1
- package/layout/layout-header/style/index.d.ts +1 -1
- package/layout/layout-iframe/style/index.d.ts +1 -1
- package/layout/layout-login/style/index.d.ts +1 -1
- package/layout/layout-main/style/index.d.ts +1 -1
- package/layout/layout-mask/style/index.d.ts +1 -1
- package/layout/layout-menu/layout-menu.vue.js +5 -0
- package/layout/layout-menu/style/index.d.ts +1 -1
- package/layout/layout-search/style/index.d.ts +1 -1
- package/layout/layout-sidebar/style/index.d.ts +1 -1
- package/layout/layout-snug-aside/style/index.d.ts +1 -1
- package/layout/layout-switch-effect/style/index.d.ts +1 -1
- package/layout/layout-tabbar/layout-tabbar.vue.js +6 -1
- package/layout/layout-tabbar/style/index.d.ts +1 -1
- package/layout/layout-tabbar/style/index.js +4 -0
- package/layout/layout-topbar/style/index.d.ts +1 -1
- package/layout/layout-user-menu/style/index.d.ts +1 -1
- package/package.json +3 -3
- package/router/guard/index.js +2 -0
- package/router/guard/pageTitle.d.ts +2 -0
- package/router/guard/pageTitle.js +11 -0
- package/router/index.js +1 -1
- package/router/routes/static/auth.js +5 -6
- package/router/routes/static/exception.js +3 -3
- package/router/utils.js +11 -3
- package/store/layout.d.ts +2 -2
- package/store/user.d.ts +3 -3
- package/store/user.js +1 -0
- package/utils/dynamicCSS.d.ts +3 -2
- package/utils/dynamicCSS.js +12 -1
- package/utils/index.js +1 -1
package/config/http.js
CHANGED
package/config/index.d.ts
CHANGED
|
@@ -9,35 +9,35 @@ import { type App, type Component, type VNodeChild } from 'vue';
|
|
|
9
9
|
import { type CoseyRouterOptions } from '../router';
|
|
10
10
|
import { type RouteRecordRaw } from 'vue-router';
|
|
11
11
|
export interface LayoutComponents {
|
|
12
|
-
aside?: string | Component;
|
|
13
|
-
auth?: string | Component;
|
|
14
12
|
base?: string | Component;
|
|
15
|
-
brand?: string | Component;
|
|
16
|
-
breadcrumb?: string | Component;
|
|
17
|
-
changePassword?: string | Component;
|
|
18
|
-
colorScheme?: string | Component;
|
|
19
|
-
content?: string | Component;
|
|
20
|
-
empty?: string | Component;
|
|
21
|
-
exception?: string | Component;
|
|
22
|
-
forbidden?: string | Component;
|
|
23
|
-
header?: string | Component;
|
|
24
|
-
iframe?: string | Component;
|
|
25
|
-
internalServerError?: string | Component;
|
|
26
|
-
login?: string | Component;
|
|
27
|
-
main?: string | Component;
|
|
28
|
-
mask?: string | Component;
|
|
29
|
-
menu?: string | Component;
|
|
30
|
-
notFound?: string | Component;
|
|
31
|
-
search?: string | Component;
|
|
32
13
|
sidebar?: string | Component;
|
|
33
14
|
snugAside?: string | Component;
|
|
34
15
|
snugMenu?: string | Component;
|
|
35
|
-
|
|
36
|
-
|
|
16
|
+
aside?: string | Component;
|
|
17
|
+
menu?: string | Component;
|
|
18
|
+
mask?: string | Component;
|
|
19
|
+
content?: string | Component;
|
|
20
|
+
header?: string | Component;
|
|
21
|
+
topbar?: string | Component;
|
|
22
|
+
brand?: string | Component;
|
|
37
23
|
toggle?: string | Component;
|
|
38
24
|
topSnugMenu?: string | Component;
|
|
39
|
-
|
|
25
|
+
breadcrumb?: string | Component;
|
|
26
|
+
search?: string | Component;
|
|
27
|
+
colorScheme?: string | Component;
|
|
40
28
|
user?: string | Component;
|
|
29
|
+
tabbar?: string | Component;
|
|
30
|
+
main?: string | Component;
|
|
31
|
+
iframe?: string | Component;
|
|
32
|
+
switchEffect?: string | Component;
|
|
33
|
+
auth?: string | Component;
|
|
34
|
+
login?: string | Component;
|
|
35
|
+
changePassword?: string | Component;
|
|
36
|
+
exception?: string | Component;
|
|
37
|
+
forbidden?: string | Component;
|
|
38
|
+
notFound?: string | Component;
|
|
39
|
+
internalServerError?: string | Component;
|
|
40
|
+
empty?: string | Component;
|
|
41
41
|
}
|
|
42
42
|
export interface LayoutSlots {
|
|
43
43
|
topbarRight?: () => VNodeChild;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (
|
|
1
|
+
declare const _default: (themeManager?: import("../components/theme/theme-context").ThemeManager) => void;
|
|
2
2
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { rotation } from '../components/style/animation.js';
|
|
2
2
|
import { getGlobalStyleHook } from '../components/theme/getGlobalStyleHook.js';
|
|
3
3
|
|
|
4
|
-
var stdin_default = getGlobalStyleHook("
|
|
4
|
+
var stdin_default = getGlobalStyleHook("NProgress", (token) => {
|
|
5
5
|
return {
|
|
6
6
|
"#nprogress": {
|
|
7
7
|
pointerEvents: "none",
|
package/hooks/useUpsert.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { Ref, ShallowRef } from 'vue';
|
|
1
2
|
export interface UseUpsertExposeOptions {
|
|
2
3
|
success?: () => any;
|
|
3
4
|
}
|
|
4
|
-
export interface UseUpsertExpose<Row extends Record<string, any>, Data> {
|
|
5
|
+
export interface UseUpsertExpose<Row extends Record<string, any>, Data = any> {
|
|
5
6
|
edit: (row: Row) => any;
|
|
6
7
|
add: () => any;
|
|
7
8
|
setData: (data: Data) => UseUpsertExpose<Row, Data>;
|
|
@@ -22,32 +23,30 @@ export interface UseUpsertOptions<Model, Row = Model, Data = Model> {
|
|
|
22
23
|
addSuccessText?: string;
|
|
23
24
|
editSuccessText?: string;
|
|
24
25
|
}
|
|
25
|
-
export
|
|
26
|
-
expose: UseUpsertExpose<Row, Data>;
|
|
27
|
-
edit: (row: Row) => any;
|
|
28
|
-
add: () => any;
|
|
29
|
-
setData: (data: Data) => UseUpsertExpose<Row, Data>;
|
|
30
|
-
setOptions: (options: UseUpsertExposeOptions) => any;
|
|
26
|
+
export interface UseUpsertReturn<Model extends Record<string, any>, Row extends Record<string, any> = Model, Data = any> extends UseUpsertExpose<Row, Data> {
|
|
31
27
|
dialogProps: {
|
|
32
|
-
|
|
28
|
+
modelvalue: boolean;
|
|
33
29
|
'onUpdate:modelValue': (value: boolean) => void;
|
|
34
30
|
title: string;
|
|
35
31
|
};
|
|
36
32
|
formProps: {
|
|
37
|
-
model:
|
|
33
|
+
model: Model;
|
|
38
34
|
ref: string;
|
|
39
35
|
submit: () => Promise<void>;
|
|
40
36
|
};
|
|
41
|
-
formRef:
|
|
42
|
-
data:
|
|
43
|
-
|
|
37
|
+
formRef: any;
|
|
38
|
+
data: Ref<Data | undefined>;
|
|
39
|
+
expose: UseUpsertExpose<Row, Data>;
|
|
40
|
+
}
|
|
41
|
+
export declare function useUpsert<Model extends Record<string, any>, Row extends Record<string, any> = Model, Data = any>(options: UseUpsertOptions<Model, Row>): UseUpsertReturn<Model, Row>;
|
|
44
42
|
export interface UseExternalUpsertOptions {
|
|
45
43
|
success?: () => any;
|
|
46
44
|
}
|
|
47
|
-
export
|
|
45
|
+
export interface UseExternalUpsertReturn<Row extends Record<string, any>, Data> {
|
|
48
46
|
add: () => void;
|
|
49
47
|
edit: (row: Row) => void;
|
|
50
|
-
setData: (data: Data) =>
|
|
51
|
-
expose: Readonly<
|
|
48
|
+
setData: (data: Data) => void;
|
|
49
|
+
expose: Readonly<ShallowRef<UseUpsertExpose<Row, Data> | null>>;
|
|
52
50
|
ref: string;
|
|
53
|
-
}
|
|
51
|
+
}
|
|
52
|
+
export declare function useOuterUpsert<Row extends Record<string, any>, Data>(options: UseExternalUpsertOptions): UseExternalUpsertReturn<Row, Data>;
|
package/hooks/useUpsert.js
CHANGED
|
@@ -87,14 +87,15 @@ function useUpsert(options) {
|
|
|
87
87
|
exposeOptions = options2;
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
|
-
|
|
90
|
+
const result = {
|
|
91
|
+
...expose,
|
|
91
92
|
dialogProps,
|
|
92
93
|
formProps,
|
|
93
94
|
formRef,
|
|
94
95
|
data,
|
|
95
|
-
...expose,
|
|
96
96
|
expose
|
|
97
97
|
};
|
|
98
|
+
return result;
|
|
98
99
|
}
|
|
99
100
|
function useOuterUpsert(options) {
|
|
100
101
|
const refKey = uuid();
|
|
@@ -107,7 +108,6 @@ function useOuterUpsert(options) {
|
|
|
107
108
|
};
|
|
108
109
|
const setData = (data) => {
|
|
109
110
|
expose.value?.setData(data);
|
|
110
|
-
return result;
|
|
111
111
|
};
|
|
112
112
|
onMounted(() => {
|
|
113
113
|
expose.value?.setOptions(options);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineComponent, createElementBlock, openBlock, normalizeClass, unref, createBlock, createCommentVNode, createVNode, withCtx, resolveDynamicComponent } from 'vue';
|
|
2
2
|
import stdin_default$4 from '../merged/layout-aside.js';
|
|
3
3
|
import stdin_default$c from '../merged/layout-brand.js';
|
|
4
|
-
import stdin_default$
|
|
4
|
+
import stdin_default$e from '../merged/layout-breadcrumb.js';
|
|
5
5
|
import stdin_default$6 from '../merged/layout-content.js';
|
|
6
6
|
import stdin_default$7 from '../merged/layout-header.js';
|
|
7
7
|
import stdin_default$i from '../merged/layout-main.js';
|
|
8
8
|
import stdin_default$5 from '../merged/layout-mask.js';
|
|
9
|
-
import stdin_default$
|
|
9
|
+
import stdin_default$g from '../merged/layout-menu.js';
|
|
10
10
|
import stdin_default$2 from '../merged/layout-sidebar.js';
|
|
11
11
|
import stdin_default$3 from '../merged/layout-snug-aside.js';
|
|
12
12
|
import stdin_default$h from '../merged/layout-tabbar.js';
|
|
13
13
|
import stdin_default$d from '../merged/layout-toggle.js';
|
|
14
|
-
import stdin_default$
|
|
14
|
+
import stdin_default$f from '../merged/layout-top-snug-menu.js';
|
|
15
15
|
import stdin_default$8 from '../merged/layout-topbar.js';
|
|
16
16
|
import stdin_default$a from '../merged/layout-color-scheme.js';
|
|
17
17
|
import stdin_default$9 from '../merged/layout-search.js';
|
|
@@ -60,16 +60,16 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
60
60
|
"is-horizontal": ""
|
|
61
61
|
})) : createCommentVNode("v-if", true), unref(layoutStore).isMobile || unref(layoutStore).isVertical || unref(layoutStore).isBiserial ? (openBlock(), createBlock(unref(stdin_default$d), {
|
|
62
62
|
key: 1
|
|
63
|
-
})) : createCommentVNode("v-if", true), !unref(layoutStore).isMobile && (unref(layoutStore).
|
|
63
|
+
})) : createCommentVNode("v-if", true), !unref(layoutStore).isMobile && (unref(layoutStore).isVertical || unref(layoutStore).isBiserial) ? (openBlock(), createBlock(unref(stdin_default$e), {
|
|
64
64
|
key: 2
|
|
65
|
-
})) : createCommentVNode("v-if", true), !unref(layoutStore).isMobile && unref(layoutStore).
|
|
66
|
-
key: 3
|
|
65
|
+
})) : createCommentVNode("v-if", true), !unref(layoutStore).isMobile && (unref(layoutStore).isHorizontalVertical || unref(layoutStore).isHorizontalBiserial) ? (openBlock(), createBlock(unref(stdin_default$f), {
|
|
66
|
+
key: 3
|
|
67
|
+
})) : createCommentVNode("v-if", true), !unref(layoutStore).isMobile && unref(layoutStore).isHorizontal ? (openBlock(), createBlock(unref(stdin_default$g), {
|
|
68
|
+
key: 4,
|
|
67
69
|
mode: "horizontal",
|
|
68
70
|
style: {
|
|
69
71
|
"flex": "1"
|
|
70
72
|
}
|
|
71
|
-
})) : createCommentVNode("v-if", true), !unref(layoutStore).isMobile && (unref(layoutStore).isVertical || unref(layoutStore).isBiserial) ? (openBlock(), createBlock(unref(stdin_default$g), {
|
|
72
|
-
key: 4
|
|
73
73
|
})) : createCommentVNode("v-if", true)]),
|
|
74
74
|
right: withCtx(() => [createVNode(unref(stdin_default$9)), (openBlock(), createBlock(resolveDynamicComponent(unref(TopbarRight)))), createVNode(unref(stdin_default$a)), createVNode(unref(stdin_default$b))]),
|
|
75
75
|
_: 1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const useGlobalStyle: (
|
|
2
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
export declare const useGlobalStyle: (themeManager?: import("../../../components/theme/theme-context").ThemeManager) => void;
|
|
2
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
3
3
|
hashId: import("vue").Ref<string, string>;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -74,9 +74,14 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
74
74
|
"index": item.name
|
|
75
75
|
}, slots);
|
|
76
76
|
}
|
|
77
|
+
const menuRoute = item.route;
|
|
78
|
+
const active = menuRoute.children?.length && menuRoute.meta.hideChildrenInMenu && route.matched.some(item2 => item2.name === menuRoute.name);
|
|
77
79
|
return createVNode(ElMenuItem, {
|
|
78
80
|
"key": item.name,
|
|
79
81
|
"index": item.name,
|
|
82
|
+
"class": {
|
|
83
|
+
"is-active": active
|
|
84
|
+
},
|
|
80
85
|
"onClick": () => onMenuItemClick(item)
|
|
81
86
|
}, {
|
|
82
87
|
title: titleVNode,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -7,6 +7,7 @@ import stdin_default$1 from './style/index.js';
|
|
|
7
7
|
import { useToken } from '../../components/theme/util/useToken.js';
|
|
8
8
|
import { ContextMenu as _ContextMenu, ContextMenuItem as _ContextMenuItem } from '../../components/context-menu/index.js';
|
|
9
9
|
import { useComponentConfig } from '../../components/config-provider/config-provider.js';
|
|
10
|
+
import { Icon as _Icon } from '../../components/icon/index.js';
|
|
10
11
|
|
|
11
12
|
var stdin_default = /* @__PURE__ */defineComponent({
|
|
12
13
|
...{
|
|
@@ -115,7 +116,11 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
115
116
|
name: item.name,
|
|
116
117
|
closable: item.meta.closable
|
|
117
118
|
}, {
|
|
118
|
-
label: withCtx(() => [
|
|
119
|
+
label: withCtx(() => [item.meta.icon ? (openBlock(), createBlock(unref(_Icon), {
|
|
120
|
+
key: 0,
|
|
121
|
+
name: item.meta.icon,
|
|
122
|
+
class: normalizeClass(`${unref(prefixCls)}-icon`)
|
|
123
|
+
}, null, 8, ["name", "class"])) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(item.meta.title) + " ", 1
|
|
119
124
|
/* TEXT */), createVNode(unref(_ContextMenu), null, {
|
|
120
125
|
reference: withCtx(() => [createElementVNode("div", {
|
|
121
126
|
class: normalizeClass(`${unref(prefixCls)}-context-menu-reference`)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -15,6 +15,10 @@ var stdin_default = getSimpleStyleHook("LayoutTabbar", (token) => {
|
|
|
15
15
|
width: 8,
|
|
16
16
|
borderBlockEnd: `${token.lineWidth} ${token.lineType} ${token.colorBorder}`
|
|
17
17
|
},
|
|
18
|
+
[`${componentCls}-icon`]: {
|
|
19
|
+
marginInlineEnd: token.marginXXS,
|
|
20
|
+
fontSize: 18
|
|
21
|
+
},
|
|
18
22
|
".el-tabs": {
|
|
19
23
|
"--el-tabs-header-height": 32
|
|
20
24
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../components/theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cosey",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "基于 Vue3 的后台管理框架",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@casl/ability": "^6.7.3",
|
|
13
|
-
"@cosey/icons": "^0.1.
|
|
13
|
+
"@cosey/icons": "^0.1.5",
|
|
14
14
|
"@ctrl/tinycolor": "^4.1.0",
|
|
15
15
|
"@element-plus/icons-vue": "^2.3.1",
|
|
16
16
|
"@emotion/hash": "^0.9.2",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@casl/ability": "^6.7.3",
|
|
44
|
-
"@cosey/icons": "^0.1.
|
|
44
|
+
"@cosey/icons": "^0.1.5",
|
|
45
45
|
"@ctrl/tinycolor": "^4.1.0",
|
|
46
46
|
"@element-plus/icons-vue": "^2.3.1",
|
|
47
47
|
"@emotion/hash": "^0.9.2",
|
package/router/guard/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { registerProgressGuard } from './progress.js';
|
|
2
2
|
import { registerAuthGuard } from './auth.js';
|
|
3
|
+
import { registerPageTitleGuard } from './pageTitle.js';
|
|
3
4
|
|
|
4
5
|
function registerRouterGuard(router) {
|
|
5
6
|
registerProgressGuard(router);
|
|
6
7
|
registerAuthGuard(router);
|
|
8
|
+
registerPageTitleGuard(router);
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
export { registerRouterGuard };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useGlobalConfig } from '../../config/index.js';
|
|
2
|
+
|
|
3
|
+
function registerPageTitleGuard(router) {
|
|
4
|
+
router.afterEach((to) => {
|
|
5
|
+
const siteConfig = useGlobalConfig().site;
|
|
6
|
+
const title = to.meta.title ? to.meta.title + " - " + siteConfig.name : siteConfig.name;
|
|
7
|
+
document.title = title;
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { registerPageTitleGuard };
|
package/router/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { defineRoutes } from '../../utils.js';
|
|
2
|
-
import stdin_default$3 from '../../../layout/
|
|
3
|
-
import stdin_default$2 from '../../../layout/
|
|
4
|
-
import stdin_default$1 from '../../../layout/
|
|
2
|
+
import stdin_default$3 from '../../../layout/merged/layout-auth.js';
|
|
3
|
+
import stdin_default$2 from '../../../layout/merged/layout-change-password.js';
|
|
4
|
+
import stdin_default$1 from '../../../layout/merged/layout-login.js';
|
|
5
5
|
|
|
6
6
|
var stdin_default = defineRoutes({
|
|
7
7
|
path: "/auth",
|
|
8
8
|
name: "Auth",
|
|
9
9
|
component: stdin_default$3,
|
|
10
|
-
redirect: "/auth/login",
|
|
11
10
|
meta: {
|
|
12
11
|
hideInMenu: true
|
|
13
12
|
},
|
|
@@ -23,10 +22,10 @@ var stdin_default = defineRoutes({
|
|
|
23
22
|
},
|
|
24
23
|
{
|
|
25
24
|
path: "change-password",
|
|
26
|
-
name: "
|
|
25
|
+
name: "ChangePassword",
|
|
27
26
|
component: stdin_default$2,
|
|
28
27
|
meta: {
|
|
29
|
-
title: "\
|
|
28
|
+
title: "\u4FEE\u6539\u5BC6\u7801"
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineRoutes } from '../../utils.js';
|
|
2
|
-
import stdin_default$3 from '../../../layout/
|
|
3
|
-
import stdin_default$1 from '../../../layout/
|
|
4
|
-
import stdin_default$2 from '../../../layout/
|
|
2
|
+
import stdin_default$3 from '../../../layout/merged/layout-exception.js';
|
|
3
|
+
import stdin_default$1 from '../../../layout/merged/layout-forbidden.js';
|
|
4
|
+
import stdin_default$2 from '../../../layout/merged/layout-internal-server-error.js';
|
|
5
5
|
import { NotFoundRoute } from '../../not-found.js';
|
|
6
6
|
|
|
7
7
|
var stdin_default = defineRoutes([
|
package/router/utils.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { uuid } from '../utils/string.js';
|
|
2
2
|
|
|
3
3
|
function defineRoute(route) {
|
|
4
|
-
function recur(route2) {
|
|
4
|
+
function recur(route2, index = 0, parent) {
|
|
5
5
|
const meta = route2.meta || {};
|
|
6
|
-
|
|
6
|
+
const newRoute = {
|
|
7
7
|
...route2,
|
|
8
8
|
name: route2.name || uuid(),
|
|
9
|
-
children: Array.isArray(route2.children) ? route2.children.map(recur) : void 0,
|
|
10
9
|
meta: {
|
|
11
10
|
...meta,
|
|
12
11
|
closable: meta.closable ?? true,
|
|
@@ -14,6 +13,15 @@ function defineRoute(route) {
|
|
|
14
13
|
authentication: meta.authentication ?? true
|
|
15
14
|
}
|
|
16
15
|
};
|
|
16
|
+
if (Array.isArray(route2.children)) {
|
|
17
|
+
newRoute.children = route2.children.map((item, index2) => recur(item, index2, newRoute));
|
|
18
|
+
}
|
|
19
|
+
if (parent && !parent.redirect && index === 0) {
|
|
20
|
+
parent.redirect = {
|
|
21
|
+
name: newRoute.name
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return newRoute;
|
|
17
25
|
}
|
|
18
26
|
return recur(route);
|
|
19
27
|
}
|
package/store/layout.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RouteMeta } from 'vue-router';
|
|
2
2
|
import { type MenuItem } from '../router';
|
|
3
3
|
export type LayoutMenuType = 'vertical' | 'biserial' | 'horizontal' | 'horizontal-vertical' | 'horizontal-biserial';
|
|
4
4
|
export interface LayoutTab {
|
|
5
5
|
name: string;
|
|
6
|
-
meta:
|
|
6
|
+
meta: RouteMeta;
|
|
7
7
|
}
|
|
8
8
|
export declare const useLayoutStore: import("pinia").StoreDefinition<"cosey-layout", Pick<{
|
|
9
9
|
sidebarVisible: import("vue").Ref<boolean, boolean>;
|
package/store/user.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const useUserStore: import("pinia").StoreDefinition<"cosey-user",
|
|
|
10
10
|
userInfo: import("vue").Ref<UserInfo | undefined, UserInfo | undefined>;
|
|
11
11
|
requestedUserInfo: import("vue").Ref<boolean, boolean>;
|
|
12
12
|
login: (data: any) => Promise<void>;
|
|
13
|
-
getUserInfo: () => Promise<
|
|
13
|
+
getUserInfo: () => Promise<UserInfo | undefined>;
|
|
14
14
|
changePassword: (data: any) => Promise<void>;
|
|
15
15
|
setAuthorization: () => Promise<void | undefined>;
|
|
16
16
|
addDynamicRoutes: () => Promise<void>;
|
|
@@ -20,7 +20,7 @@ export declare const useUserStore: import("pinia").StoreDefinition<"cosey-user",
|
|
|
20
20
|
userInfo: import("vue").Ref<UserInfo | undefined, UserInfo | undefined>;
|
|
21
21
|
requestedUserInfo: import("vue").Ref<boolean, boolean>;
|
|
22
22
|
login: (data: any) => Promise<void>;
|
|
23
|
-
getUserInfo: () => Promise<
|
|
23
|
+
getUserInfo: () => Promise<UserInfo | undefined>;
|
|
24
24
|
changePassword: (data: any) => Promise<void>;
|
|
25
25
|
setAuthorization: () => Promise<void | undefined>;
|
|
26
26
|
addDynamicRoutes: () => Promise<void>;
|
|
@@ -30,7 +30,7 @@ export declare const useUserStore: import("pinia").StoreDefinition<"cosey-user",
|
|
|
30
30
|
userInfo: import("vue").Ref<UserInfo | undefined, UserInfo | undefined>;
|
|
31
31
|
requestedUserInfo: import("vue").Ref<boolean, boolean>;
|
|
32
32
|
login: (data: any) => Promise<void>;
|
|
33
|
-
getUserInfo: () => Promise<
|
|
33
|
+
getUserInfo: () => Promise<UserInfo | undefined>;
|
|
34
34
|
changePassword: (data: any) => Promise<void>;
|
|
35
35
|
setAuthorization: () => Promise<void | undefined>;
|
|
36
36
|
addDynamicRoutes: () => Promise<void>;
|
package/store/user.js
CHANGED
package/utils/dynamicCSS.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare function insertCSS(styleStr: string, styleId?: string): HTMLStyleElement;
|
|
2
|
-
export declare function findCSSNode(styleId: string):
|
|
3
|
-
export declare function updateCSS(styleStr: string, styleId: string):
|
|
2
|
+
export declare function findCSSNode(styleId: string): HTMLStyleElement | null;
|
|
3
|
+
export declare function updateCSS(styleStr: string, styleId: string): HTMLStyleElement | undefined;
|
|
4
|
+
export declare function updateCSSByStyle(style: HTMLStyleElement | undefined | null, styleStr: string, styleId: string): HTMLStyleElement | undefined;
|
|
4
5
|
export declare function removeCSS(styleId: string): void;
|