cosey 0.1.1 → 0.1.3
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/audio-card.vue.js +1 -1
- package/components/close/close.vue.js +1 -1
- package/components/components.d.ts +98 -44
- package/components/config-provider/config-provider.js +1 -3
- package/components/config-provider/config-provider.vue.d.ts +2 -7
- package/components/config-provider/index.d.ts +1 -1
- package/components/context-menu/content.vue.js +1 -1
- package/components/context-menu/context-menu.vue.js +2 -2
- package/components/copy/copy.vue.js +1 -1
- package/components/cssinjs/parser.js +8 -25
- package/components/dnd-sort/dnd-sort-item.vue.js +2 -3
- package/components/dnd-sort/dnd-sort.vue.js +1 -2
- package/components/dnd-sort/index.d.ts +1 -1
- package/components/editor/components/button-group.vue.d.ts +2 -7
- package/components/editor/components/button.vue.d.ts +2 -7
- package/components/editor/components/color-picker/color-picker.vue.d.ts +2 -43
- package/components/editor/components/color-picker/color-picker.vue.js +14 -11
- package/components/editor/components/picker/picker.vue.d.ts +2 -15
- package/components/editor/components/resize/resize.js +4 -4
- package/components/editor/components/resize/resize.style.js +9 -32
- package/components/editor/components/resize/resize.vue.js +21 -14
- package/components/editor/components/select-button.vue.d.ts +2 -9
- package/components/editor/components/select-button.vue.js +1 -1
- package/components/editor/components/split-button.vue.d.ts +2 -19
- package/components/editor/components/split-button.vue.js +1 -1
- package/components/editor/components/table-toolbar/table-toolbar.vue.js +9 -9
- package/components/editor/components/toolbar/formats/align.vue.js +4 -4
- package/components/editor/components/toolbar/formats/blockquote.vue.js +1 -1
- package/components/editor/components/toolbar/formats/bold.vue.js +1 -1
- package/components/editor/components/toolbar/formats/clean.vue.js +1 -1
- package/components/editor/components/toolbar/formats/code-block.vue.js +1 -1
- package/components/editor/components/toolbar/formats/code.vue.js +1 -1
- package/components/editor/components/toolbar/formats/formula.vue.js +4 -3
- package/components/editor/components/toolbar/formats/image.vue.js +1 -1
- package/components/editor/components/toolbar/formats/indent.vue.js +2 -2
- package/components/editor/components/toolbar/formats/italic.vue.js +1 -1
- package/components/editor/components/toolbar/formats/link.vue.js +15 -13
- package/components/editor/components/toolbar/formats/list.vue.js +3 -3
- package/components/editor/components/toolbar/formats/script.vue.js +2 -2
- package/components/editor/components/toolbar/formats/size-delta.vue.js +2 -2
- package/components/editor/components/toolbar/formats/strike.vue.js +1 -1
- package/components/editor/components/toolbar/formats/table.vue.js +1 -1
- package/components/editor/components/toolbar/formats/underline.vue.js +1 -1
- package/components/editor/components/toolbar/formats/video.vue.js +1 -1
- package/components/editor/components/toolbar/toolbar.d.ts +1 -2
- package/components/editor/components/toolbar/toolbar.js +17 -21
- package/components/editor/components/toolbar/toolbarContext.js +1 -3
- package/components/editor/formats/image.d.ts +13 -0
- package/components/editor/formats/image.js +46 -0
- package/components/editor/formats/indent.d.ts +2 -0
- package/components/editor/formats/indent.js +12 -7
- package/components/editor/formats/link.js +1 -5
- package/components/editor/formats/list.d.ts +0 -4
- package/components/editor/formats/list.js +10 -5
- package/components/editor/formats/video.js +6 -9
- package/components/editor/modules/custom-list.js +1 -6
- package/components/editor/modules/image-uploader/formats/image-loading.style.js +3 -3
- package/components/editor/modules/image-uploader/image-uploader.js +1 -3
- package/components/editor/quill.js +7 -4
- package/components/editor/quillContext.js +1 -3
- package/components/editor/style/index.js +1 -5
- package/components/field/components/checkbox-group/panel.vue.d.ts +2 -20
- package/components/field/components/checkbox-group/panel.vue.js +2 -2
- package/components/field/components/tree-select/tree-select.d.ts +1 -2
- package/components/field/components/tree-select/tree-select.js +69 -0
- package/components/file-card/file-card.vue.js +1 -1
- package/components/form/form-item.vue.js +1 -1
- package/components/form/useFormItemWidth.js +1 -1
- package/components/form/useFormTemplate.js +2 -10
- package/components/form-dialog/form-dialog.vue.d.ts +0 -1
- package/components/form-dialog/form-dialog.vue.js +1 -1
- package/components/form-dialog/index.d.ts +0 -3
- package/components/form-group/form-group.vue.js +1 -1
- package/components/form-list/form-list.js +1 -6
- package/components/form-list/form-list.vue.js +2 -2
- package/components/form-query/form-query.vue.js +5 -5
- package/components/horizontal-tree/horizontal-tree.vue.js +16 -12
- package/components/iconify-icon/iconify-icon.d.ts +3 -0
- package/components/iconify-icon/iconify-icon.js +9 -0
- package/components/iconify-icon/iconify-icon.vue.js +2 -5
- package/components/iconify-icon/index.js +1 -0
- package/components/index.js +3 -2
- package/components/media-card-group/media-card-group.vue.js +4 -3
- package/components/scroll-view/scroll-view.vue.js +1 -2
- package/components/snug-menu/snug-menu.vue.js +1 -2
- package/components/style/animation.d.ts +5 -0
- package/components/style/animation.js +33 -0
- package/components/style/index.d.ts +1 -1
- package/components/style/index.js +2 -2
- package/components/style/mixins.d.ts +2 -0
- package/components/style/mixins.js +10 -1
- package/components/table/index.d.ts +0 -8
- package/components/table/style/index.js +2 -2
- package/components/table/table-column/renderer.js +22 -18
- package/components/table/table-column-editor/item.vue.js +4 -7
- package/components/table/table-column-editor/table-column-editor.vue.d.ts +2 -246
- package/components/table/table-column-editor/table-column-editor.vue.js +9 -9
- package/components/table/table-export/table-export.vue.js +2 -2
- package/components/table/table-query/table-query.d.ts +0 -4
- package/components/table/table-query/table-query.js +0 -4
- package/components/table/table-query/table-query.vue.d.ts +0 -9
- package/components/table/table-query/table-query.vue.js +14 -12
- package/components/table/table.js +1 -3
- package/components/table/table.vue.js +22 -24
- package/components/table/useTable.js +1 -4
- package/components/table/utils.js +1 -3
- package/components/table-action/item.vue.js +5 -5
- package/components/table-action/table-action.vue.js +4 -3
- package/components/theme/StyleContext.js +1 -3
- package/components/theme/createCacheToken.js +1 -4
- package/components/theme/getGlobalStyleHook.js +2 -5
- package/components/theme/getSimpleStyleHook.js +1 -4
- package/components/theme/getStyleHook.js +1 -4
- package/components/theme/interface/index.d.ts +1 -1
- package/components/theme/themes/shared/genColorMapToken.js +1 -4
- package/components/theme/useStyleRegister.js +1 -3
- package/components/theme/util/alias.js +4 -16
- package/components/theme/util/getAlphaColor.js +1 -6
- package/components/theme/util/normalizeStyle.js +1 -1
- package/components/theme/util/statistic.js +4 -1
- package/components/theme/util/useToken.js +1 -4
- package/components/toggle/toggle.vue.js +1 -1
- package/components/transition/transition.vue.js +1 -2
- package/components/upload/upload-item.vue.js +8 -8
- package/components/upload/upload.vue.js +1 -1
- package/components/video-card/video-card.vue.js +1 -1
- package/config/index.d.ts +1 -0
- package/config/index.js +2 -7
- package/config/layout.d.ts +36 -0
- package/config/layout.js +37 -1
- package/config/nprogress.style.d.ts +2 -0
- package/config/nprogress.style.js +51 -0
- package/config/root-config-provider.vue.d.ts +2 -20
- package/config/root-config-provider.vue.js +2 -0
- package/hooks/useColorScheme.js +5 -9
- package/hooks/useEcharts.js +2 -4
- package/hooks/useFetch.d.ts +1 -1
- package/hooks/useFetch.js +1 -7
- package/hooks/useFullPage.js +7 -9
- package/hooks/useLocale.js +1 -3
- package/hooks/useLockscreenObserver.js +1 -1
- package/hooks/usePersist.js +1 -3
- package/hooks/useTreeCheck.js +13 -26
- package/hooks/useUpsert.d.ts +3 -3
- package/index.d.ts +1 -0
- package/index.js +5 -4
- package/layout/index.js +2 -2
- package/layout/layout-aside/layout-aside.vue.js +2 -1
- package/layout/layout-base/layout-base.vue.js +1 -1
- package/layout/layout-change-password/layout-change-password.vue.js +8 -8
- package/layout/layout-change-password/style/index.js +1 -1
- package/layout/layout-color-scheme/layout-color-scheme.vue.js +8 -14
- package/layout/layout-color-scheme/style/index.d.ts +0 -3
- package/layout/layout-color-scheme/style/index.js +26 -44
- package/layout/layout-content/layout-content.vue.d.ts +2 -13
- package/layout/layout-forbidden/layout-forbidden.vue.js +2 -2
- package/layout/layout-header/layout-header.vue.d.ts +2 -14
- package/layout/layout-internal-server-error/layout-internal-server-error.vue.js +2 -2
- package/layout/layout-login/layout-login.vue.js +5 -5
- package/layout/layout-login/style/index.js +1 -1
- package/layout/layout-mask/style/index.js +1 -1
- package/layout/layout-not-found/layout-not-found.vue.js +2 -2
- package/layout/layout-search/layout-search.vue.js +37 -34
- package/layout/layout-sidebar/layout-sidebar.vue.d.ts +2 -15
- package/layout/layout-sidebar/style/index.js +1 -1
- package/layout/layout-switch-effect/layout-switch-effect.vue.d.ts +2 -7
- package/layout/layout-tabbar/layout-tabbar.vue.js +2 -2
- package/layout/layout-tabbar/reload.vue.js +1 -1
- package/layout/layout-tabbar/style/index.js +2 -2
- package/layout/layout-toggle/layout-toggle.vue.js +1 -1
- package/layout/layout-top-snug-menu/layout-top-snug-menu.vue.js +4 -3
- package/layout/layout-topbar/layout-topbar.vue.d.ts +2 -1217
- package/layout/layout-user-menu/index.d.ts +1 -0
- package/layout/layout-user-menu/index.js +1 -0
- package/layout/{layout-user/layout-user.vue.js → layout-user-menu/layout-user-menu.vue.js} +18 -13
- package/layout/{layout-user → layout-user-menu}/style/index.js +9 -5
- package/layout/layout.d.ts +1 -1
- package/layout/layout.js +1 -1
- package/layout/merged/index.d.ts +1 -1
- package/layout/merged/index.js +1 -1
- package/layout/merged/{layout-user.js → layout-user-menu.js} +1 -1
- package/layout/utils.js +1 -4
- package/package.json +16 -6
- package/request/useRequest.js +1 -1
- package/router/guard/auth.js +2 -5
- package/router/guard/index.js +0 -2
- package/router/guard/progress.js +11 -1
- package/router/index.d.ts +22 -0
- package/store/layout.d.ts +2 -8
- package/store/layout.js +19 -31
- package/store/user.d.ts +1 -1
- package/store/user.js +1 -1
- package/utils/array.js +3 -0
- package/utils/excel/index.js +1 -3
- package/utils/excel/utils.js +1 -5
- package/utils/file.js +1 -3
- package/utils/object.js +1 -3
- package/utils/tree.js +2 -11
- package/utils/vue.js +1 -1
- package/components/global.d.js +0 -1
- package/components/style/motion/index.d.ts +0 -1
- package/components/style/motion/index.js +0 -1
- package/components/style/motion/loading.d.ts +0 -3
- package/components/style/motion/loading.js +0 -23
- package/layout/layout-user/index.d.ts +0 -1
- package/layout/layout-user/index.js +0 -1
- package/router/guard/popup.d.ts +0 -2
- package/router/guard/popup.js +0 -6
- package/types/vue-router.d.js +0 -1
- package/types/vue.d.js +0 -1
- /package/layout/{layout-user/layout-user.vue.d.ts → layout-user-menu/layout-user-menu.vue.d.ts} +0 -0
- /package/layout/{layout-user → layout-user-menu}/style/index.d.ts +0 -0
- /package/layout/merged/{layout-user.d.ts → layout-user-menu.d.ts} +0 -0
package/config/layout.js
CHANGED
|
@@ -6,7 +6,43 @@ const defaultLayoutConfig = {
|
|
|
6
6
|
/**
|
|
7
7
|
* 是否启用标签页缓存
|
|
8
8
|
*/
|
|
9
|
-
keepAlive: true
|
|
9
|
+
keepAlive: true,
|
|
10
|
+
/**
|
|
11
|
+
* 是否默认显示侧边栏
|
|
12
|
+
*/
|
|
13
|
+
sidebarVisible: true,
|
|
14
|
+
/**
|
|
15
|
+
* 是否默认折叠收起垂直菜单
|
|
16
|
+
*/
|
|
17
|
+
collapse: false,
|
|
18
|
+
/**
|
|
19
|
+
* 菜单类型
|
|
20
|
+
*/
|
|
21
|
+
menuType: "vertical",
|
|
22
|
+
/**
|
|
23
|
+
* 是否显示标签页
|
|
24
|
+
*/
|
|
25
|
+
tabbarVisible: true,
|
|
26
|
+
/**
|
|
27
|
+
* 侧边菜单宽度
|
|
28
|
+
*/
|
|
29
|
+
asideWidth: 220,
|
|
30
|
+
/**
|
|
31
|
+
* 折叠时侧边栏菜单宽度
|
|
32
|
+
*/
|
|
33
|
+
collapsedAsideWidth: 64,
|
|
34
|
+
/**
|
|
35
|
+
* 紧凑侧边菜单宽度
|
|
36
|
+
*/
|
|
37
|
+
snugAsideWidth: 85,
|
|
38
|
+
/**
|
|
39
|
+
* 顶部栏高度
|
|
40
|
+
*/
|
|
41
|
+
topbarHeight: 48,
|
|
42
|
+
/**
|
|
43
|
+
* 标签栏高度
|
|
44
|
+
*/
|
|
45
|
+
tabbarHeight: 41
|
|
10
46
|
};
|
|
11
47
|
|
|
12
48
|
export { defaultLayoutConfig };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { rotation } from '../components/style/animation.js';
|
|
2
|
+
import { getGlobalStyleHook } from '../components/theme/getGlobalStyleHook.js';
|
|
3
|
+
|
|
4
|
+
var stdin_default = getGlobalStyleHook("co-editor-image-loading", (token) => {
|
|
5
|
+
return {
|
|
6
|
+
"#nprogress": {
|
|
7
|
+
pointerEvents: "none",
|
|
8
|
+
".bar": {
|
|
9
|
+
position: "fixed",
|
|
10
|
+
top: 0,
|
|
11
|
+
left: 0,
|
|
12
|
+
zIndex: 1030,
|
|
13
|
+
width: "100%",
|
|
14
|
+
height: "2px",
|
|
15
|
+
background: token.colorPrimary
|
|
16
|
+
},
|
|
17
|
+
".peg": {
|
|
18
|
+
display: "block",
|
|
19
|
+
position: "absolute",
|
|
20
|
+
right: 0,
|
|
21
|
+
width: 100,
|
|
22
|
+
height: "100%",
|
|
23
|
+
boxShadow: `0 0 10px ${token.colorPrimary}, 0 0 5px ${token.colorPrimary}`,
|
|
24
|
+
opacity: 1,
|
|
25
|
+
transform: `rotate(3deg) translate(0px, -4px)`
|
|
26
|
+
},
|
|
27
|
+
".spinner": {
|
|
28
|
+
position: "fixed",
|
|
29
|
+
top: 15,
|
|
30
|
+
right: 15,
|
|
31
|
+
zIndex: 1030,
|
|
32
|
+
display: "block"
|
|
33
|
+
},
|
|
34
|
+
".spinner-icon": {
|
|
35
|
+
width: 18,
|
|
36
|
+
height: 18,
|
|
37
|
+
boxSizing: "border-box",
|
|
38
|
+
border: `solid 2px transparent`,
|
|
39
|
+
borderTopColor: token.colorPrimary,
|
|
40
|
+
borderLeftColor: token.colorPrimary,
|
|
41
|
+
borderRadius: "50%",
|
|
42
|
+
animationName: rotation,
|
|
43
|
+
animationDuration: "0.4s",
|
|
44
|
+
animationTimingFunction: "linear",
|
|
45
|
+
animationIterationCount: "infinite"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export { stdin_default as default };
|
|
@@ -1,28 +1,10 @@
|
|
|
1
1
|
import { RootConfigProviderProps } from './root-config-provider';
|
|
2
|
-
import { ConfigProvider } from '../components';
|
|
3
2
|
import 'element-plus/dist/index.css';
|
|
4
3
|
import 'element-plus/theme-chalk/dark/css-vars.css';
|
|
5
|
-
declare const mergedConfigProviderProps: import("vue").ComputedRef<{
|
|
6
|
-
theme: {
|
|
7
|
-
algorithm: import("../components/theme/theme-context").MappingAlgorithm | import("../components/theme/theme-context").MappingAlgorithm[];
|
|
8
|
-
token?: Partial<import("../components").AliasToken>;
|
|
9
|
-
components?: import("../components/theme/interface").OverrideToken;
|
|
10
|
-
inherit?: boolean;
|
|
11
|
-
};
|
|
12
|
-
prefixCls: string;
|
|
13
|
-
table: import("../components").TableConfig;
|
|
14
|
-
}>;
|
|
15
|
-
declare const locale: import("vue").Ref<any, any>;
|
|
16
|
-
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
17
4
|
declare var __VLS_10: {};
|
|
18
|
-
type __VLS_Slots =
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
19
6
|
default?: (props: typeof __VLS_10) => any;
|
|
20
|
-
}
|
|
21
|
-
declare const __VLS_self: import("vue").DefineComponent<RootConfigProviderProps, {
|
|
22
|
-
ConfigProvider: typeof ConfigProvider;
|
|
23
|
-
mergedConfigProviderProps: typeof mergedConfigProviderProps;
|
|
24
|
-
locale: typeof locale;
|
|
25
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RootConfigProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
};
|
|
26
8
|
declare const __VLS_component: import("vue").DefineComponent<RootConfigProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RootConfigProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
9
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
28
10
|
export default _default;
|
|
@@ -2,6 +2,7 @@ import { defineComponent, computed, provide, reactive, resolveComponent, createB
|
|
|
2
2
|
import { getAlgorithm } from './root-config-provider.js';
|
|
3
3
|
import { useLayoutStore } from '../store/layout.js';
|
|
4
4
|
import { useGlobalConfig } from './index.js';
|
|
5
|
+
import stdin_default$1 from './nprogress.style.js';
|
|
5
6
|
import 'element-plus/dist/index.css';
|
|
6
7
|
import 'element-plus/theme-chalk/dark/css-vars.css';
|
|
7
8
|
import { useColorSchemeProvide } from '../hooks/useColorScheme.js';
|
|
@@ -31,6 +32,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
31
32
|
},
|
|
32
33
|
setup(__props) {
|
|
33
34
|
const props = __props;
|
|
35
|
+
stdin_default$1();
|
|
34
36
|
const {
|
|
35
37
|
appliedColorScheme
|
|
36
38
|
} = useColorSchemeProvide();
|
package/hooks/useColorScheme.js
CHANGED
|
@@ -5,9 +5,9 @@ import { isClient } from '../utils/env.js';
|
|
|
5
5
|
const colorSchemeContextSymbol = Symbol("colorScheme");
|
|
6
6
|
const colorSchemeKey = "colorScheme";
|
|
7
7
|
const colorSchemeOptions = [
|
|
8
|
-
{ label: "\u8DDF\u968F\u7CFB\u7EDF", icon: "
|
|
9
|
-
{ label: "\u6D45\u8272", icon: "
|
|
10
|
-
{ label: "\u6DF1\u8272", icon: "
|
|
8
|
+
{ label: "\u8DDF\u968F\u7CFB\u7EDF", icon: "co:circle-half-full", value: "auto" },
|
|
9
|
+
{ label: "\u6D45\u8272", icon: "co:sun", value: "light" },
|
|
10
|
+
{ label: "\u6DF1\u8272", icon: "co:moon", value: "dark" }
|
|
11
11
|
];
|
|
12
12
|
function useColorSchemeProvide() {
|
|
13
13
|
const persist = usePersist();
|
|
@@ -15,9 +15,7 @@ function useColorSchemeProvide() {
|
|
|
15
15
|
const colorScheme = ref(defaultColorScheme);
|
|
16
16
|
const appliedColorScheme = ref("light");
|
|
17
17
|
const colorSchemeOption = computed(() => {
|
|
18
|
-
return colorSchemeOptions.find(
|
|
19
|
-
(option) => option.value === colorScheme.value
|
|
20
|
-
);
|
|
18
|
+
return colorSchemeOptions.find((option) => option.value === colorScheme.value);
|
|
21
19
|
});
|
|
22
20
|
const mediaQueryList = window.matchMedia("(prefers-color-scheme: dark)");
|
|
23
21
|
const handleChange = (event) => {
|
|
@@ -70,9 +68,7 @@ function useColorSchemeProvide() {
|
|
|
70
68
|
return context;
|
|
71
69
|
}
|
|
72
70
|
function useColorScheme() {
|
|
73
|
-
return inject(
|
|
74
|
-
colorSchemeContextSymbol
|
|
75
|
-
);
|
|
71
|
+
return inject(colorSchemeContextSymbol);
|
|
76
72
|
}
|
|
77
73
|
|
|
78
74
|
export { colorSchemeOptions, useColorScheme, useColorSchemeProvide };
|
package/hooks/useEcharts.js
CHANGED
|
@@ -14,16 +14,14 @@ function useEcharts(elRef, options = {}) {
|
|
|
14
14
|
onBeforeUnmount(() => {
|
|
15
15
|
dispose();
|
|
16
16
|
});
|
|
17
|
-
const optionQueue = ref(
|
|
18
|
-
options.option ? [[options.option]] : []
|
|
19
|
-
);
|
|
17
|
+
const optionQueue = ref(options.option ? [[options.option]] : []);
|
|
20
18
|
const setOption = (...args) => {
|
|
21
19
|
optionQueue.value = [...optionQueue.value, args];
|
|
22
20
|
};
|
|
23
21
|
const doSetOption = () => {
|
|
24
22
|
if (chart && optionQueue.value.length) {
|
|
25
23
|
for (const option of optionQueue.value) {
|
|
26
|
-
chart.setOption
|
|
24
|
+
chart.setOption(...option);
|
|
27
25
|
}
|
|
28
26
|
optionQueue.value = [];
|
|
29
27
|
}
|
package/hooks/useFetch.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export interface UseFetchOptions<T> {
|
|
|
5
5
|
immediate?: boolean;
|
|
6
6
|
initialData?: T;
|
|
7
7
|
}
|
|
8
|
-
export declare function useFetch<T =
|
|
8
|
+
export declare function useFetch<T = any, U = any>(fetcher: (params: U) => Promise<any> | any, options?: UseFetchOptions<T>): {
|
|
9
9
|
isFetching: import("vue").ShallowRef<boolean, boolean>;
|
|
10
10
|
data: import("vue").Ref<any, any> extends T | undefined ? import("vue").ShallowRef<undefined, undefined> | (T extends T & import("vue").Ref<any, any> ? import("@vue/shared").IfAny<T, import("vue").ShallowRef<T, T>, T> : import("vue").ShallowRef<T, T>) : import("vue").ShallowRef<T | undefined, T | undefined>;
|
|
11
11
|
error: import("vue").ShallowRef<any, any>;
|
package/hooks/useFetch.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { shallowRef } from 'vue';
|
|
2
2
|
|
|
3
3
|
function useFetch(fetcher, options = {}) {
|
|
4
|
-
const {
|
|
5
|
-
immediate = true,
|
|
6
|
-
initialData,
|
|
7
|
-
onSuccess,
|
|
8
|
-
onError,
|
|
9
|
-
onFinally
|
|
10
|
-
} = options;
|
|
4
|
+
const { immediate = true, initialData, onSuccess, onError, onFinally } = options;
|
|
11
5
|
const isFetching = shallowRef(false);
|
|
12
6
|
const data = shallowRef(initialData);
|
|
13
7
|
const error = shallowRef();
|
package/hooks/useFullPage.js
CHANGED
|
@@ -11,16 +11,10 @@ function useFullPage(options = {}) {
|
|
|
11
11
|
};
|
|
12
12
|
onMounted(() => {
|
|
13
13
|
target.value = document.documentElement;
|
|
14
|
-
document.documentElement.addEventListener(
|
|
15
|
-
"fullscreenchange",
|
|
16
|
-
onFullscreenChange
|
|
17
|
-
);
|
|
14
|
+
document.documentElement.addEventListener("fullscreenchange", onFullscreenChange);
|
|
18
15
|
});
|
|
19
16
|
onBeforeUnmount(() => {
|
|
20
|
-
document.documentElement.removeEventListener(
|
|
21
|
-
"fullscreenchange",
|
|
22
|
-
onFullscreenChange
|
|
23
|
-
);
|
|
17
|
+
document.documentElement.removeEventListener("fullscreenchange", onFullscreenChange);
|
|
24
18
|
});
|
|
25
19
|
const isFullPage = ref(false);
|
|
26
20
|
const enter = () => {
|
|
@@ -40,7 +34,11 @@ function useFullPage(options = {}) {
|
|
|
40
34
|
}
|
|
41
35
|
};
|
|
42
36
|
const toggle = () => {
|
|
43
|
-
isFullPage.value
|
|
37
|
+
if (isFullPage.value) {
|
|
38
|
+
exit();
|
|
39
|
+
} else {
|
|
40
|
+
enter();
|
|
41
|
+
}
|
|
44
42
|
};
|
|
45
43
|
return {
|
|
46
44
|
isFullPage,
|
package/hooks/useLocale.js
CHANGED
|
@@ -6,7 +6,7 @@ function useLockscreenObserver() {
|
|
|
6
6
|
let observer;
|
|
7
7
|
onMounted(() => {
|
|
8
8
|
observer = new MutationObserver((mutationsList) => {
|
|
9
|
-
for (
|
|
9
|
+
for (const mutation of mutationsList) {
|
|
10
10
|
if (mutation.type === "attributes" && mutation.attributeName === "class") {
|
|
11
11
|
locked.value = document.body.classList.contains(hiddenCls);
|
|
12
12
|
}
|
package/hooks/usePersist.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import Persist from '@gunny/persist';
|
|
2
2
|
import { inject } from 'vue';
|
|
3
3
|
|
|
4
|
-
const persistContextKey = Symbol(
|
|
5
|
-
"persistContext"
|
|
6
|
-
);
|
|
4
|
+
const persistContextKey = Symbol("persistContext");
|
|
7
5
|
const createPersist = (name, type) => {
|
|
8
6
|
return new Persist(name, { type });
|
|
9
7
|
};
|
package/hooks/useTreeCheck.js
CHANGED
|
@@ -1,25 +1,16 @@
|
|
|
1
1
|
import { ref, shallowReactive, computed, provide, inject } from 'vue';
|
|
2
2
|
import { walkTreeNode, mapTree, mapTreeExtra, walkAncestor } from '../utils/tree.js';
|
|
3
3
|
|
|
4
|
-
const treeCheckContextKey = Symbol(
|
|
5
|
-
"treeCheckContext"
|
|
6
|
-
);
|
|
4
|
+
const treeCheckContextKey = Symbol("treeCheckContext");
|
|
7
5
|
function useTreeCheck(options) {
|
|
8
|
-
const {
|
|
9
|
-
childrenKey = "children",
|
|
10
|
-
initialChecked,
|
|
11
|
-
mergeLast,
|
|
12
|
-
checkStrictly
|
|
13
|
-
} = options || {};
|
|
6
|
+
const { childrenKey = "children", initialChecked, mergeLast, checkStrictly } = options || {};
|
|
14
7
|
const initialCheckedStatus = initialChecked ? "checked" : "unchecked";
|
|
15
8
|
const tree = ref([]);
|
|
16
9
|
const rootNode = shallowReactive({
|
|
17
10
|
checkedStatus: initialCheckedStatus
|
|
18
11
|
});
|
|
19
12
|
const checkAllValue = computed(() => rootNode.checkedStatus === "checked");
|
|
20
|
-
const checkAllIndeterminate = computed(
|
|
21
|
-
() => rootNode.checkedStatus === "indeterminate"
|
|
22
|
-
);
|
|
13
|
+
const checkAllIndeterminate = computed(() => rootNode.checkedStatus === "indeterminate");
|
|
23
14
|
const updateAncestorChecked = (node) => {
|
|
24
15
|
walkAncestor(node, "parent", (node2) => {
|
|
25
16
|
const children = node2.children || [];
|
|
@@ -43,21 +34,17 @@ function useTreeCheck(options) {
|
|
|
43
34
|
setCheckedByNode(rootNode, !!value);
|
|
44
35
|
};
|
|
45
36
|
const initialize = (rawTree) => {
|
|
46
|
-
rootNode.children = tree.value = mapTreeExtra(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
...node,
|
|
56
|
-
checkedStatus: initialCheckedStatus
|
|
57
|
-
});
|
|
58
|
-
}
|
|
37
|
+
rootNode.children = tree.value = mapTreeExtra(rawTree, (rawNode) => rawNode, {
|
|
38
|
+
childrenKey,
|
|
39
|
+
parent: rootNode,
|
|
40
|
+
mergeLast,
|
|
41
|
+
customNode(node) {
|
|
42
|
+
return shallowReactive({
|
|
43
|
+
...node,
|
|
44
|
+
checkedStatus: initialCheckedStatus
|
|
45
|
+
});
|
|
59
46
|
}
|
|
60
|
-
);
|
|
47
|
+
});
|
|
61
48
|
rootNode.checkedStatus = initialCheckedStatus;
|
|
62
49
|
};
|
|
63
50
|
const getRawTree = () => {
|
package/hooks/useUpsert.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface UseUpsertExposeOptions {
|
|
2
2
|
success?: () => any;
|
|
3
3
|
}
|
|
4
|
-
export interface UseUpsertExpose<Row extends Record<string, any>, Data
|
|
4
|
+
export interface UseUpsertExpose<Row extends Record<string, any>, Data> {
|
|
5
5
|
edit: (row: Row) => any;
|
|
6
6
|
add: () => any;
|
|
7
7
|
setData: (data: Data) => UseUpsertExpose<Row, Data>;
|
|
@@ -22,7 +22,7 @@ export interface UseUpsertOptions<Model, Row = Model, Data = Model> {
|
|
|
22
22
|
addSuccessText?: string;
|
|
23
23
|
editSuccessText?: string;
|
|
24
24
|
}
|
|
25
|
-
export declare function useUpsert<Model extends Record<string, any>, Row extends Record<string, any> = Model, Data
|
|
25
|
+
export declare function useUpsert<Model extends Record<string, any>, Row extends Record<string, any> = Model, Data = any>(options: UseUpsertOptions<Model, Row>): {
|
|
26
26
|
expose: UseUpsertExpose<Row, Data>;
|
|
27
27
|
edit: (row: Row) => any;
|
|
28
28
|
add: () => any;
|
|
@@ -44,7 +44,7 @@ export declare function useUpsert<Model extends Record<string, any>, Row extends
|
|
|
44
44
|
export interface UseExternalUpsertOptions {
|
|
45
45
|
success?: () => any;
|
|
46
46
|
}
|
|
47
|
-
export declare function useOuterUpsert<Row extends Record<string, any>, Data
|
|
47
|
+
export declare function useOuterUpsert<Row extends Record<string, any>, Data>(options: UseExternalUpsertOptions): {
|
|
48
48
|
add: () => void;
|
|
49
49
|
edit: (row: Row) => void;
|
|
50
50
|
setData: (data: Data) => /*elided*/ any;
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -40,7 +40,7 @@ export { default as LayoutTabbar } from './layout/layout-tabbar/layout-tabbar.vu
|
|
|
40
40
|
export { default as LayoutToggle } from './layout/layout-toggle/layout-toggle.vue.js';
|
|
41
41
|
export { default as LayoutTopSnugMenu } from './layout/layout-top-snug-menu/layout-top-snug-menu.vue.js';
|
|
42
42
|
export { default as LayoutTopbar } from './layout/layout-topbar/layout-topbar.vue.js';
|
|
43
|
-
export { default as
|
|
43
|
+
export { default as LayoutUserMenu } from './layout/layout-user-menu/layout-user-menu.vue.js';
|
|
44
44
|
export { default as MergedLayoutAside } from './layout/merged/layout-aside.js';
|
|
45
45
|
export { default as MergedLayoutAuth } from './layout/merged/layout-auth.js';
|
|
46
46
|
export { default as MergedLayoutBase } from './layout/merged/layout-base.js';
|
|
@@ -69,22 +69,23 @@ export { default as MergedLayoutTabbar } from './layout/merged/layout-tabbar.js'
|
|
|
69
69
|
export { default as MergedLayoutToggle } from './layout/merged/layout-toggle.js';
|
|
70
70
|
export { default as MergedLayoutTopSnugMenu } from './layout/merged/layout-top-snug-menu.js';
|
|
71
71
|
export { default as MergedLayoutTopbar } from './layout/merged/layout-topbar.js';
|
|
72
|
-
export { default as
|
|
72
|
+
export { default as MergedLayoutUserMenu } from './layout/merged/layout-user-menu.js';
|
|
73
73
|
export { defineRoute, defineRoutes, mergeRouteModules } from './router/utils.js';
|
|
74
74
|
export { getBreadcrumbRoutes, getMenuPathKeys, getMenus, getMenusMap } from './router/menus/index.js';
|
|
75
75
|
|
|
76
76
|
const createCosey = (options = {}) => {
|
|
77
77
|
const store = createStore();
|
|
78
|
+
const router = createCoseyRouter(options.router);
|
|
78
79
|
return {
|
|
79
80
|
install(app) {
|
|
80
81
|
provideGlobalConfig(app, options);
|
|
81
|
-
const router = createCoseyRouter(options.router);
|
|
82
82
|
app.use(router);
|
|
83
83
|
registerRouterGuard(router);
|
|
84
84
|
app.use(store);
|
|
85
85
|
registerGlobalComponents(app);
|
|
86
86
|
},
|
|
87
|
-
store
|
|
87
|
+
store,
|
|
88
|
+
router
|
|
88
89
|
};
|
|
89
90
|
};
|
|
90
91
|
|
package/layout/index.js
CHANGED
|
@@ -28,7 +28,7 @@ export { default as LayoutTabbar } from './layout-tabbar/layout-tabbar.vue.js';
|
|
|
28
28
|
export { default as LayoutToggle } from './layout-toggle/layout-toggle.vue.js';
|
|
29
29
|
export { default as LayoutTopSnugMenu } from './layout-top-snug-menu/layout-top-snug-menu.vue.js';
|
|
30
30
|
export { default as LayoutTopbar } from './layout-topbar/layout-topbar.vue.js';
|
|
31
|
-
export { default as
|
|
31
|
+
export { default as LayoutUserMenu } from './layout-user-menu/layout-user-menu.vue.js';
|
|
32
32
|
export { default as MergedLayoutAside } from './merged/layout-aside.js';
|
|
33
33
|
export { default as MergedLayoutAuth } from './merged/layout-auth.js';
|
|
34
34
|
export { default as MergedLayoutBase } from './merged/layout-base.js';
|
|
@@ -57,7 +57,7 @@ export { default as MergedLayoutTabbar } from './merged/layout-tabbar.js';
|
|
|
57
57
|
export { default as MergedLayoutToggle } from './merged/layout-toggle.js';
|
|
58
58
|
export { default as MergedLayoutTopSnugMenu } from './merged/layout-top-snug-menu.js';
|
|
59
59
|
export { default as MergedLayoutTopbar } from './merged/layout-topbar.js';
|
|
60
|
-
export { default as
|
|
60
|
+
export { default as MergedLayoutUserMenu } from './merged/layout-user-menu.js';
|
|
61
61
|
|
|
62
62
|
function registerGlobalComponents(app) {
|
|
63
63
|
app.use(ElementPlus);
|
|
@@ -57,7 +57,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
57
57
|
onClick: _cache[0] || (_cache[0] = $event => unref(layoutStore).collapse = !unref(layoutStore).collapse)
|
|
58
58
|
}, {
|
|
59
59
|
default: withCtx(() => [createVNode(unref(_Icon), {
|
|
60
|
-
|
|
60
|
+
size: "lg",
|
|
61
|
+
name: unref(layoutStore).collapse ? "co:chevron-right" : "co:chevron-left"
|
|
61
62
|
}, null, 8, ["name"])]),
|
|
62
63
|
_: 1
|
|
63
64
|
/* STABLE */
|
|
@@ -15,7 +15,7 @@ import stdin_default$e 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';
|
|
18
|
-
import stdin_default$b from '../merged/layout-user.js';
|
|
18
|
+
import stdin_default$b from '../merged/layout-user-menu.js';
|
|
19
19
|
import stdin_default$1 from './style/index.js';
|
|
20
20
|
import { useLayoutStore } from '../../store/layout.js';
|
|
21
21
|
import { useGlobalConfig } from '../../config/index.js';
|
|
@@ -52,7 +52,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
52
52
|
ref_key: "formRef",
|
|
53
53
|
ref: formRef,
|
|
54
54
|
model: formState,
|
|
55
|
-
onKeyup: withKeys(withModifiers(onSubmit, ["prevent"]), ["enter"
|
|
55
|
+
onKeyup: withKeys(withModifiers(onSubmit, ["prevent"]), ["enter"])
|
|
56
56
|
}, {
|
|
57
57
|
default: withCtx(() => [createVNode(_component_el_form_item, {
|
|
58
58
|
prop: "oldPassword",
|
|
@@ -70,7 +70,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
70
70
|
placeholder: "\u539F\u5BC6\u7801"
|
|
71
71
|
}, {
|
|
72
72
|
prefix: withCtx(() => [createVNode(_component_co_icon, {
|
|
73
|
-
name: "
|
|
73
|
+
name: "co:password",
|
|
74
74
|
class: normalizeClass(`${unref(prefixCls)}-icon`)
|
|
75
75
|
}, null, 8, ["class"])]),
|
|
76
76
|
_: 1
|
|
@@ -94,7 +94,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
94
94
|
placeholder: "\u65B0\u5BC6\u7801"
|
|
95
95
|
}, {
|
|
96
96
|
prefix: withCtx(() => [createVNode(_component_co_icon, {
|
|
97
|
-
name: "
|
|
97
|
+
name: "co:password",
|
|
98
98
|
class: normalizeClass(`${unref(prefixCls)}-icon`)
|
|
99
99
|
}, null, 8, ["class"])]),
|
|
100
100
|
_: 1
|
|
@@ -124,7 +124,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
124
124
|
placeholder: "\u786E\u8BA4\u5BC6\u7801"
|
|
125
125
|
}, {
|
|
126
126
|
prefix: withCtx(() => [createVNode(_component_co_icon, {
|
|
127
|
-
name: "
|
|
127
|
+
name: "co:password",
|
|
128
128
|
class: normalizeClass(`${unref(prefixCls)}-icon`)
|
|
129
129
|
}, null, 8, ["class"])]),
|
|
130
130
|
_: 1
|
|
@@ -141,8 +141,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
141
141
|
onClick: onSubmit
|
|
142
142
|
}, {
|
|
143
143
|
default: withCtx(() => _cache[4] || (_cache[4] = [createTextVNode(" \u4FEE\u6539\u5BC6\u7801 ")])),
|
|
144
|
-
_: 1
|
|
145
|
-
|
|
144
|
+
_: 1,
|
|
145
|
+
__: [4]
|
|
146
146
|
}, 8, ["class", "loading"])]),
|
|
147
147
|
_: 1
|
|
148
148
|
/* STABLE */
|
|
@@ -153,8 +153,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
153
153
|
onClick: _cache[3] || (_cache[3] = $event => unref(router).back())
|
|
154
154
|
}, {
|
|
155
155
|
default: withCtx(() => _cache[5] || (_cache[5] = [createTextVNode(" \u8FD4\u56DE ")])),
|
|
156
|
-
_: 1
|
|
157
|
-
|
|
156
|
+
_: 1,
|
|
157
|
+
__: [5]
|
|
158
158
|
}, 8, ["class"])]),
|
|
159
159
|
_: 1
|
|
160
160
|
/* STABLE */
|
|
@@ -5,7 +5,7 @@ var stdin_default = getSimpleStyleHook("LayoutChangePassword", (token) => {
|
|
|
5
5
|
return {
|
|
6
6
|
[componentCls]: {
|
|
7
7
|
[`${componentCls}-title`]: {
|
|
8
|
-
marginBlockEnd: token.
|
|
8
|
+
marginBlockEnd: token.marginXL,
|
|
9
9
|
textAlign: "center",
|
|
10
10
|
fontSize: token.fontSizeHeading2,
|
|
11
11
|
lineHeight: token.lineHeightHeading2,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, useTemplateRef, createElementBlock, openBlock, createVNode, unref, normalizeClass, withCtx,
|
|
1
|
+
import { defineComponent, computed, useTemplateRef, createElementBlock, openBlock, createVNode, unref, normalizeClass, withCtx, nextTick } from 'vue';
|
|
2
2
|
import stdin_default$1, { useGlobalStyle } from './style/index.js';
|
|
3
3
|
import { ElButton } from 'element-plus';
|
|
4
4
|
import { useColorScheme } from '../../hooks/useColorScheme.js';
|
|
@@ -32,9 +32,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
32
32
|
await nextTick();
|
|
33
33
|
};
|
|
34
34
|
const startViewTransition = el => {
|
|
35
|
-
const isAppearanceTransition =
|
|
36
|
-
// @ts-expect-error
|
|
37
|
-
document.startViewTransition && !window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
35
|
+
const isAppearanceTransition = !!document.startViewTransition && !window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
38
36
|
if (!isAppearanceTransition) {
|
|
39
37
|
updateCallback();
|
|
40
38
|
return;
|
|
@@ -67,17 +65,13 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
67
65
|
class: normalizeClass([unref(hashId), unref(prefixCls)]),
|
|
68
66
|
onClick
|
|
69
67
|
}, {
|
|
70
|
-
default: withCtx(() => [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
default: withCtx(() => [createVNode(unref(_Icon), {
|
|
69
|
+
class: normalizeClass([`${unref(prefixCls)}-icon`, {
|
|
70
|
+
["is-light"]: !isDark.value
|
|
71
|
+
}]),
|
|
72
|
+
name: `${isDark.value ? "co:moon" : "co:sun"}`,
|
|
74
73
|
size: "xl"
|
|
75
|
-
}, null, 8, ["class"]))
|
|
76
|
-
key: 1,
|
|
77
|
-
class: normalizeClass([`${unref(prefixCls)}-icon`, `${unref(prefixCls)}-icon-sunny`]),
|
|
78
|
-
name: "mdi:white-balance-sunny",
|
|
79
|
-
size: "xl"
|
|
80
|
-
}, null, 8, ["class"]))]),
|
|
74
|
+
}, null, 8, ["class", "name"])]),
|
|
81
75
|
_: 1
|
|
82
76
|
/* STABLE */
|
|
83
77
|
}, 8, ["class"])]);
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { Keyframes } from '../../../components';
|
|
2
|
-
export declare const sunnyIn: Keyframes;
|
|
3
|
-
export declare const sunnyOut: Keyframes;
|
|
4
1
|
export declare const useGlobalStyle: (theme?: import("vue").ComputedRef<import("../../../components").ThemeConfig | undefined>) => void;
|
|
5
2
|
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, theme?: import("vue").ComputedRef<import("../../../components").ThemeConfig | undefined>) => {
|
|
6
3
|
hashId: import("vue").Ref<string, string>;
|