cosey 0.1.1 → 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/audio-card.vue.js +1 -1
- package/components/audio-card/style/index.d.ts +1 -1
- package/components/audio-viewer/style/index.d.ts +1 -1
- package/components/close/close.vue.js +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/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/config-provider.vue.js +8 -4
- package/components/config-provider/index.d.ts +1 -1
- 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/content.vue.js +1 -1
- package/components/context-menu/context-menu.vue.js +2 -2
- 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 +1 -2
- package/components/copy/index.d.ts +3 -19
- package/components/copy/style/index.d.ts +1 -1
- package/components/cssinjs/parser.js +8 -25
- package/components/dnd-sort/dnd-sort-item.vue.js +3 -4
- package/components/dnd-sort/dnd-sort.vue.js +1 -2
- package/components/dnd-sort/index.d.ts +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/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.style.d.ts +1 -1
- 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/list/list.style.d.ts +1 -1
- package/components/editor/components/picker/picker.style.d.ts +1 -1
- 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.d.ts +1 -1
- 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.style.d.ts +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.style.d.ts +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/editor.d.ts +0 -2
- package/components/editor/editor.vue.js +1 -11
- 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.d.ts +1 -1
- package/components/editor/modules/image-uploader/formats/image-loading.style.js +4 -4
- 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/hljs.d.ts +1 -1
- package/components/editor/style/index.d.ts +1 -1
- 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/file-card/style/index.d.ts +1 -1
- package/components/form/form-item.vue.js +1 -1
- package/components/form/style/index.d.ts +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-list/style/index.d.ts +1 -1
- package/components/form-query/form-query.vue.js +5 -5
- 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/horizontal-tree.vue.js +16 -12
- package/components/horizontal-tree/style/index.d.ts +1 -1
- package/components/icon/style/index.d.ts +1 -1
- 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/image-card/style/index.d.ts +1 -1
- package/components/index.js +4 -2
- package/components/long-text/style/index.d.ts +1 -1
- package/components/mask/style/index.d.ts +1 -1
- package/components/media-card-group/media-card-group.vue.js +4 -3
- 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/scroll-view.vue.js +1 -2
- package/components/scroll-view/style/index.d.ts +1 -1
- package/components/snug-menu/snug-menu.vue.js +1 -2
- package/components/snug-menu/style/index.d.ts +1 -1
- 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.d.ts +1 -1
- package/components/table/style/index.js +2 -2
- package/components/table/table-column/renderer.js +22 -18
- 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 +5 -8
- 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-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/style/index.d.ts +1 -1
- 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/style/index.d.ts +1 -1
- 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.d.ts +2 -3
- package/components/theme/getGlobalStyleHook.js +5 -13
- 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 +4 -11
- package/components/theme/getStyleHook.d.ts +2 -2
- package/components/theme/getStyleHook.js +4 -11
- package/components/theme/index.d.ts +2 -1
- package/components/theme/index.js +1 -0
- package/components/theme/interface/index.d.ts +1 -1
- package/components/theme/theme-context.d.ts +11 -2
- package/components/theme/theme-context.js +36 -6
- package/components/theme/themes/shared/genColorMapToken.js +1 -4
- package/components/theme/useStyleRegister.d.ts +1 -7
- package/components/theme/useStyleRegister.js +3 -6
- 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.d.ts +4 -4
- package/components/theme/util/useToken.js +7 -10
- package/components/toggle/toggle.vue.js +1 -1
- package/components/transition/style/index.d.ts +1 -1
- package/components/transition/transition.vue.js +1 -2
- 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-item.vue.js +8 -8
- 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 +1 -5
- 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 +23 -22
- 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 +15 -16
- package/hooks/useUpsert.js +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-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 +9 -9
- 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/layout-change-password.vue.js +8 -8
- package/layout/layout-change-password/style/index.d.ts +1 -1
- 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 +2 -5
- package/layout/layout-color-scheme/style/index.js +26 -44
- package/layout/layout-content/layout-content.vue.d.ts +2 -13
- package/layout/layout-content/style/index.d.ts +1 -1
- package/layout/layout-exception/style/index.d.ts +1 -1
- package/layout/layout-forbidden/layout-forbidden.vue.js +2 -2
- package/layout/layout-header/layout-header.vue.d.ts +2 -14
- package/layout/layout-header/style/index.d.ts +1 -1
- package/layout/layout-iframe/style/index.d.ts +1 -1
- 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.d.ts +1 -1
- package/layout/layout-login/style/index.js +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-mask/style/index.js +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-not-found/layout-not-found.vue.js +2 -2
- package/layout/layout-search/layout-search.vue.js +37 -34
- package/layout/layout-search/style/index.d.ts +1 -1
- package/layout/layout-sidebar/layout-sidebar.vue.d.ts +2 -15
- package/layout/layout-sidebar/style/index.d.ts +1 -1
- package/layout/layout-sidebar/style/index.js +1 -1
- package/layout/layout-snug-aside/style/index.d.ts +1 -1
- package/layout/layout-switch-effect/layout-switch-effect.vue.d.ts +2 -7
- package/layout/layout-switch-effect/style/index.d.ts +1 -1
- package/layout/layout-tabbar/layout-tabbar.vue.js +8 -3
- package/layout/layout-tabbar/reload.vue.js +1 -1
- package/layout/layout-tabbar/style/index.d.ts +1 -1
- package/layout/layout-tabbar/style/index.js +6 -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-topbar/style/index.d.ts +1 -1
- 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.d.ts +1 -1
- 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 +2 -2
- package/router/guard/pageTitle.d.ts +2 -0
- package/router/guard/pageTitle.js +11 -0
- package/router/guard/progress.js +11 -1
- package/router/index.d.ts +22 -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 +4 -10
- package/store/layout.js +19 -31
- package/store/user.d.ts +4 -4
- package/store/user.js +2 -1
- package/utils/array.js +3 -0
- package/utils/dynamicCSS.d.ts +3 -2
- package/utils/dynamicCSS.js +12 -1
- package/utils/excel/index.js +1 -3
- package/utils/excel/utils.js +1 -5
- package/utils/file.js +1 -3
- package/utils/index.js +1 -1
- 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/merged/{layout-user.d.ts → layout-user-menu.d.ts} +0 -0
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import { ComputedRef } from 'vue';
|
|
2
2
|
import { type CSSInterpolation } from '../cssinjs';
|
|
3
|
-
|
|
4
|
-
export declare function useStyleRegister(info: ComputedRef<{
|
|
5
|
-
path: string[];
|
|
6
|
-
token: GlobalToken;
|
|
7
|
-
hashId: string;
|
|
8
|
-
global?: boolean;
|
|
9
|
-
}>, styleFn: () => CSSInterpolation): void;
|
|
3
|
+
export declare function useStyleRegister(path: ComputedRef<string[]>, styleFn: () => CSSInterpolation): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, watch } from 'vue';
|
|
1
|
+
import { computed, unref, watch } from 'vue';
|
|
2
2
|
import { parseStyle } from '../cssinjs/parser.js';
|
|
3
3
|
import hash from '@emotion/hash';
|
|
4
4
|
import { normalizeStyle } from './util/normalizeStyle.js';
|
|
@@ -6,10 +6,8 @@ import stdin_default from './useHMR.js';
|
|
|
6
6
|
import { useStyleInection } from './StyleContext.js';
|
|
7
7
|
import { updateCSS } from '../../utils/dynamicCSS.js';
|
|
8
8
|
|
|
9
|
-
function useStyleRegister(
|
|
10
|
-
const pathHash = computed(
|
|
11
|
-
() => hash([...info.value.path, info.value.hashId].join("|"))
|
|
12
|
-
);
|
|
9
|
+
function useStyleRegister(path, styleFn) {
|
|
10
|
+
const pathHash = computed(() => hash(unref(path).filter(Boolean).join("|")));
|
|
13
11
|
const HMRUpdate = stdin_default();
|
|
14
12
|
const { cache } = useStyleInection();
|
|
15
13
|
watch(
|
|
@@ -18,7 +16,6 @@ function useStyleRegister(info, styleFn) {
|
|
|
18
16
|
if (!cache.has(pathHash.value) || HMRUpdate.value) {
|
|
19
17
|
const styleInterpolation = styleFn();
|
|
20
18
|
const [parsedStr, effectStyle] = parseStyle(styleInterpolation, {
|
|
21
|
-
// hashId: info.value.global ? '' : info.value.hashId,
|
|
22
19
|
// hashPriority: 'low',
|
|
23
20
|
});
|
|
24
21
|
const styleStr = normalizeStyle(parsedStr);
|
|
@@ -33,10 +33,7 @@ function formatToken(derivativeToken) {
|
|
|
33
33
|
colorBgContainerDisabled: mergedToken.colorFillTertiary,
|
|
34
34
|
// ============== Split ============== //
|
|
35
35
|
colorBorderBg: mergedToken.colorBgContainer,
|
|
36
|
-
colorSplit: stdin_default$1(
|
|
37
|
-
mergedToken.colorBorderSecondary,
|
|
38
|
-
mergedToken.colorBgContainer
|
|
39
|
-
),
|
|
36
|
+
colorSplit: stdin_default$1(mergedToken.colorBorderSecondary, mergedToken.colorBgContainer),
|
|
40
37
|
// ============== Text ============== //
|
|
41
38
|
colorTextPlaceholder: mergedToken.colorTextQuaternary,
|
|
42
39
|
colorTextDisabled: mergedToken.colorTextQuaternary,
|
|
@@ -49,14 +46,8 @@ function formatToken(derivativeToken) {
|
|
|
49
46
|
colorBgTextActive: mergedToken.colorFill,
|
|
50
47
|
colorIcon: mergedToken.colorTextTertiary,
|
|
51
48
|
colorIconHover: mergedToken.colorText,
|
|
52
|
-
colorErrorOutline: stdin_default$1(
|
|
53
|
-
|
|
54
|
-
mergedToken.colorBgContainer
|
|
55
|
-
),
|
|
56
|
-
colorWarningOutline: stdin_default$1(
|
|
57
|
-
mergedToken.colorWarningBg,
|
|
58
|
-
mergedToken.colorBgContainer
|
|
59
|
-
),
|
|
49
|
+
colorErrorOutline: stdin_default$1(mergedToken.colorErrorBg, mergedToken.colorBgContainer),
|
|
50
|
+
colorWarningOutline: stdin_default$1(mergedToken.colorWarningBg, mergedToken.colorBgContainer),
|
|
60
51
|
// Font
|
|
61
52
|
fontSizeIcon: mergedToken.fontSizeSM,
|
|
62
53
|
// Line
|
|
@@ -71,10 +62,7 @@ function formatToken(derivativeToken) {
|
|
|
71
62
|
controlItemBgActiveHover: mergedToken.colorPrimaryBgHover,
|
|
72
63
|
controlItemBgActiveDisabled: mergedToken.colorFill,
|
|
73
64
|
controlTmpOutline: mergedToken.colorFillQuaternary,
|
|
74
|
-
controlOutline: stdin_default$1(
|
|
75
|
-
mergedToken.colorPrimaryBg,
|
|
76
|
-
mergedToken.colorBgContainer
|
|
77
|
-
),
|
|
65
|
+
controlOutline: stdin_default$1(mergedToken.colorPrimaryBg, mergedToken.colorBgContainer),
|
|
78
66
|
lineType: mergedToken.lineType,
|
|
79
67
|
borderRadius: mergedToken.borderRadius,
|
|
80
68
|
borderRadiusXS: mergedToken.borderRadiusXS,
|
|
@@ -4,12 +4,7 @@ function isStableColor(color) {
|
|
|
4
4
|
return color >= 0 && color <= 255;
|
|
5
5
|
}
|
|
6
6
|
function getAlphaColor(frontColor, backgroundColor) {
|
|
7
|
-
const {
|
|
8
|
-
r: fR,
|
|
9
|
-
g: fG,
|
|
10
|
-
b: fB,
|
|
11
|
-
a: originAlpha
|
|
12
|
-
} = new TinyColor(frontColor).toRgb();
|
|
7
|
+
const { r: fR, g: fG, b: fB, a: originAlpha } = new TinyColor(frontColor).toRgb();
|
|
13
8
|
if (originAlpha < 1) {
|
|
14
9
|
return frontColor;
|
|
15
10
|
}
|
|
@@ -2,7 +2,7 @@ import { serialize, compile, stringify } from 'stylis';
|
|
|
2
2
|
|
|
3
3
|
function normalizeStyle(styleStr) {
|
|
4
4
|
const serialized = serialize(compile(styleStr), stringify);
|
|
5
|
-
return serialized.replace(/\{
|
|
5
|
+
return serialized.replace(/\{%%%:[^;];}/g, ";");
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export { normalizeStyle };
|
|
@@ -38,7 +38,10 @@ function statisticToken(token) {
|
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
flush = (componentName, componentToken) => {
|
|
41
|
-
statistic[componentName] = {
|
|
41
|
+
statistic[componentName] = {
|
|
42
|
+
global: Array.from(tokenKeys),
|
|
43
|
+
component: componentToken
|
|
44
|
+
};
|
|
42
45
|
};
|
|
43
46
|
}
|
|
44
47
|
return { token: proxy, keys: tokenKeys, flush };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type ThemeConfig } from '../theme-context';
|
|
1
|
+
import { ThemeManager } from '../theme-context';
|
|
3
2
|
import type { AliasToken } from '../interface';
|
|
4
3
|
export declare const cacheToken: {
|
|
5
4
|
cache: [token: Partial<AliasToken> | undefined, algorithm: import("../theme-context").MappingAlgorithm | import("../theme-context").MappingAlgorithm[] | undefined, components: import("../interface").OverrideToken | undefined, token: import("..").GlobalToken][];
|
|
6
5
|
getToken(token?: Partial<AliasToken>, algorithm?: import("../theme-context").MappingAlgorithm | import("../theme-context").MappingAlgorithm[], components?: import("../interface").OverrideToken): import("..").GlobalToken;
|
|
7
6
|
};
|
|
8
|
-
export declare function useToken(
|
|
9
|
-
readonly token: ComputedRef<import("..").GlobalToken>;
|
|
7
|
+
export declare function useToken(themeManager?: ThemeManager): {
|
|
8
|
+
readonly token: import("vue").ComputedRef<import("..").GlobalToken>;
|
|
10
9
|
readonly hashId: import("vue").Ref<string, string>;
|
|
10
|
+
readonly themeManager: ThemeManager;
|
|
11
11
|
};
|
|
@@ -7,7 +7,6 @@ import stdin_default from './unitless.js';
|
|
|
7
7
|
import { normalizeStyle } from './normalizeStyle.js';
|
|
8
8
|
import { useStyleInection } from '../StyleContext.js';
|
|
9
9
|
import { useConfig } from '../../config-provider/config-provider.js';
|
|
10
|
-
import { updateCSS } from '../../../utils/dynamicCSS.js';
|
|
11
10
|
|
|
12
11
|
function stringifyToken(token) {
|
|
13
12
|
return Object.keys(token).map((key) => {
|
|
@@ -26,10 +25,10 @@ function stringifyTokenToCssVar(token, prefix) {
|
|
|
26
25
|
return styleStr;
|
|
27
26
|
}
|
|
28
27
|
const cacheToken = createCacheToken();
|
|
29
|
-
function useToken(
|
|
30
|
-
|
|
28
|
+
function useToken(themeManager) {
|
|
29
|
+
themeManager = useTheme(themeManager);
|
|
31
30
|
const token = computed(() => {
|
|
32
|
-
const { token: token2, algorithm, components } = unref(theme
|
|
31
|
+
const { token: token2, algorithm, components } = unref(themeManager?.theme) || {};
|
|
33
32
|
return cacheToken.getToken(token2, algorithm, components);
|
|
34
33
|
});
|
|
35
34
|
const hashId = ref("");
|
|
@@ -48,12 +47,9 @@ function useToken(theme) {
|
|
|
48
47
|
if (cache.has(hashId.value)) {
|
|
49
48
|
return;
|
|
50
49
|
}
|
|
51
|
-
let styleStr = stringifyTokenToCssVar(
|
|
52
|
-
token.value,
|
|
53
|
-
configContext.prefixCls.value
|
|
54
|
-
);
|
|
50
|
+
let styleStr = stringifyTokenToCssVar(token.value, configContext.prefixCls.value);
|
|
55
51
|
styleStr = normalizeStyle(`.${hashId.value}{${styleStr}}`);
|
|
56
|
-
|
|
52
|
+
themeManager.setStyle(styleStr, hashId.value);
|
|
57
53
|
cache.set(hashId.value, styleStr);
|
|
58
54
|
},
|
|
59
55
|
{
|
|
@@ -62,7 +58,8 @@ function useToken(theme) {
|
|
|
62
58
|
);
|
|
63
59
|
return {
|
|
64
60
|
token,
|
|
65
|
-
hashId
|
|
61
|
+
hashId,
|
|
62
|
+
themeManager
|
|
66
63
|
};
|
|
67
64
|
}
|
|
68
65
|
|
|
@@ -38,7 +38,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
38
38
|
}, {
|
|
39
39
|
default: withCtx(() => [createTextVNode(toDisplayString(text.value) + " ", 1
|
|
40
40
|
/* TEXT */), createVNode(stdin_default$1, {
|
|
41
|
-
name: innerValue.value ? "
|
|
41
|
+
name: innerValue.value ? "co:chevron-down" : "co:chevron-up",
|
|
42
42
|
size: "xl"
|
|
43
43
|
}, null, 8, ["name"])]),
|
|
44
44
|
_: 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("../../theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, computed, createBlock, openBlock, Transition, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';
|
|
2
2
|
import stdin_default$1 from './style/index.js';
|
|
3
3
|
import { reactiveOmit } from '@vueuse/core';
|
|
4
4
|
import { useComponentConfig } from '../config-provider/config-provider.js';
|
|
@@ -126,7 +126,6 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
126
126
|
},
|
|
127
127
|
setup(__props) {
|
|
128
128
|
const props = __props;
|
|
129
|
-
useSlots();
|
|
130
129
|
const {
|
|
131
130
|
prefixCls
|
|
132
131
|
} = useComponentConfig("transition");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export * from './transition-group';
|
|
2
2
|
declare const _TransitionGroup: {
|
|
3
3
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./transition-group").TransitionGroupProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
4
|
-
effect: "slide" | "flip" | "fade" | (string & {});
|
|
5
4
|
css: boolean;
|
|
5
|
+
effect: "slide" | "flip" | "fade" | (string & {});
|
|
6
6
|
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
7
7
|
P: {};
|
|
8
8
|
B: {};
|
|
@@ -11,15 +11,15 @@ declare const _TransitionGroup: {
|
|
|
11
11
|
M: {};
|
|
12
12
|
Defaults: {};
|
|
13
13
|
}, Readonly<import("./transition-group").TransitionGroupProps> & Readonly<{}>, {}, {}, {}, {}, {
|
|
14
|
-
effect: "slide" | "flip" | "fade" | (string & {});
|
|
15
14
|
css: boolean;
|
|
15
|
+
effect: "slide" | "flip" | "fade" | (string & {});
|
|
16
16
|
}>;
|
|
17
17
|
__isFragment?: never;
|
|
18
18
|
__isTeleport?: never;
|
|
19
19
|
__isSuspense?: never;
|
|
20
20
|
} & import("vue").ComponentOptionsBase<Readonly<import("./transition-group").TransitionGroupProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
21
|
-
effect: "slide" | "flip" | "fade" | (string & {});
|
|
22
21
|
css: boolean;
|
|
22
|
+
effect: "slide" | "flip" | "fade" | (string & {});
|
|
23
23
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
24
24
|
$slots: import("./transition-group").TransitionGroupSlots;
|
|
25
25
|
}) & import("vue").Plugin;
|
|
@@ -3,7 +3,7 @@ export interface ComponentToken {
|
|
|
3
3
|
}
|
|
4
4
|
export interface TransitionGroupToken extends FullToken<'TransitionGroup'> {
|
|
5
5
|
}
|
|
6
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
6
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../theme/theme-context").ThemeManager) => {
|
|
7
7
|
hashId: import("vue").Ref<string, string>;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type TransitionGroupProps, type TransitionGroupSlots } from './transition-group';
|
|
2
2
|
type __VLS_Slots = TransitionGroupSlots;
|
|
3
3
|
declare const __VLS_component: import("vue").DefineComponent<TransitionGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TransitionGroupProps> & Readonly<{}>, {
|
|
4
|
-
effect: "slide" | "flip" | "fade" | (string & {});
|
|
5
4
|
css: boolean;
|
|
5
|
+
effect: "slide" | "flip" | "fade" | (string & {});
|
|
6
6
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
7
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
8
8
|
export default _default;
|
|
@@ -14,7 +14,6 @@ declare const _Upload: {
|
|
|
14
14
|
accept: string;
|
|
15
15
|
validateEvent: boolean;
|
|
16
16
|
limit: number;
|
|
17
|
-
action: string;
|
|
18
17
|
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
19
18
|
P: {};
|
|
20
19
|
B: {};
|
|
@@ -31,7 +30,6 @@ declare const _Upload: {
|
|
|
31
30
|
accept: string;
|
|
32
31
|
validateEvent: boolean;
|
|
33
32
|
limit: number;
|
|
34
|
-
action: string;
|
|
35
33
|
}>;
|
|
36
34
|
__isFragment?: never;
|
|
37
35
|
__isTeleport?: never;
|
|
@@ -49,7 +47,6 @@ declare const _Upload: {
|
|
|
49
47
|
accept: string;
|
|
50
48
|
validateEvent: boolean;
|
|
51
49
|
limit: number;
|
|
52
|
-
action: string;
|
|
53
50
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
54
51
|
$slots: import("./upload").UploadSlots;
|
|
55
52
|
}) & import("vue").Plugin;
|
|
@@ -3,7 +3,7 @@ export interface ComponentToken {
|
|
|
3
3
|
}
|
|
4
4
|
export interface UploadToken extends FullToken<'Upload'> {
|
|
5
5
|
}
|
|
6
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
6
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../theme/theme-context").ThemeManager) => {
|
|
7
7
|
hashId: import("vue").Ref<string, string>;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -72,7 +72,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
72
72
|
percentage
|
|
73
73
|
}) => [_ctx.file.status === "error" ? (openBlock(), createBlock(stdin_default$1, {
|
|
74
74
|
key: 0,
|
|
75
|
-
name: "
|
|
75
|
+
name: "co:close-filled",
|
|
76
76
|
size: "lg"
|
|
77
77
|
})) : (openBlock(), createElementBlock("span", {
|
|
78
78
|
key: 1,
|
|
@@ -91,8 +91,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
91
91
|
onClick: _cache[0] || (_cache[0] = $event => emit("cancel"))
|
|
92
92
|
}, {
|
|
93
93
|
default: withCtx(() => _cache[4] || (_cache[4] = [createTextVNode(" \u53D6\u6D88\u4E0A\u4F20 ")])),
|
|
94
|
-
_: 1
|
|
95
|
-
|
|
94
|
+
_: 1,
|
|
95
|
+
__: [4]
|
|
96
96
|
})) : createCommentVNode("v-if", true), _ctx.file.status === "error" ? (openBlock(), createBlock(unref(ElButton), {
|
|
97
97
|
key: 1,
|
|
98
98
|
link: "",
|
|
@@ -104,8 +104,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
104
104
|
onClick: _cache[1] || (_cache[1] = $event => emit("re-upload"))
|
|
105
105
|
}, {
|
|
106
106
|
default: withCtx(() => _cache[5] || (_cache[5] = [createTextVNode(" \u91CD\u65B0\u4E0A\u4F20 ")])),
|
|
107
|
-
_: 1
|
|
108
|
-
|
|
107
|
+
_: 1,
|
|
108
|
+
__: [5]
|
|
109
109
|
})) : createCommentVNode("v-if", true), createVNode(unref(ElButton), {
|
|
110
110
|
link: "",
|
|
111
111
|
size: "small",
|
|
@@ -116,8 +116,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
116
116
|
onClick: _cache[2] || (_cache[2] = $event => emit("remove"))
|
|
117
117
|
}, {
|
|
118
118
|
default: withCtx(() => _cache[6] || (_cache[6] = [createTextVNode(" \u5220\u9664 ")])),
|
|
119
|
-
_: 1
|
|
120
|
-
|
|
119
|
+
_: 1,
|
|
120
|
+
__: [6]
|
|
121
121
|
})], 2
|
|
122
122
|
/* CLASS */)], 2
|
|
123
123
|
/* CLASS */)) : createCommentVNode("v-if", true)]),
|
|
@@ -129,7 +129,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
129
129
|
class: normalizeClass(`${unref(prefixCls)}-remove`),
|
|
130
130
|
onClick: _cache[3] || (_cache[3] = $event => emit("remove"))
|
|
131
131
|
}, [createVNode(stdin_default$1, {
|
|
132
|
-
name: "
|
|
132
|
+
name: "co:close-large"
|
|
133
133
|
})], 2
|
|
134
134
|
/* CLASS */)) : createCommentVNode("v-if", true)], 2
|
|
135
135
|
/* CLASS */);
|
|
@@ -22,7 +22,6 @@ export interface UploadProps {
|
|
|
22
22
|
single?: boolean;
|
|
23
23
|
readonly?: boolean;
|
|
24
24
|
disabled?: boolean;
|
|
25
|
-
action?: string;
|
|
26
25
|
selectOnly?: boolean;
|
|
27
26
|
size?: MediaCardBaseProps['size'];
|
|
28
27
|
request?: UploadContext['request'];
|
|
@@ -31,7 +30,6 @@ export declare const defaultUploadProps: {
|
|
|
31
30
|
accept: string;
|
|
32
31
|
limit: number;
|
|
33
32
|
validateEvent: boolean;
|
|
34
|
-
action: string;
|
|
35
33
|
size: "large";
|
|
36
34
|
};
|
|
37
35
|
export interface UploadSlots {
|
|
@@ -13,7 +13,6 @@ declare const __VLS_component: import("vue").DefineComponent<UploadProps, {}, {}
|
|
|
13
13
|
accept: string;
|
|
14
14
|
validateEvent: boolean;
|
|
15
15
|
limit: number;
|
|
16
|
-
action: string;
|
|
17
16
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
17
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
19
18
|
export default _default;
|
|
@@ -52,10 +52,6 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
52
52
|
type: Boolean,
|
|
53
53
|
required: false
|
|
54
54
|
},
|
|
55
|
-
action: {
|
|
56
|
-
type: String,
|
|
57
|
-
required: false
|
|
58
|
-
},
|
|
59
55
|
selectOnly: {
|
|
60
56
|
type: Boolean,
|
|
61
57
|
required: false
|
|
@@ -248,7 +244,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
248
244
|
class: normalizeClass([`${unref(prefixCls)}-select`, `is-${_ctx.size}`]),
|
|
249
245
|
onClick: onSelect
|
|
250
246
|
}, [createVNode(stdin_default$3, {
|
|
251
|
-
name: "
|
|
247
|
+
name: "co:add-large",
|
|
252
248
|
size: "24"
|
|
253
249
|
})], 2
|
|
254
250
|
/* CLASS */)) : createCommentVNode("v-if", true)]),
|
|
@@ -3,7 +3,7 @@ export interface ComponentToken {
|
|
|
3
3
|
}
|
|
4
4
|
export interface VideoCardToken extends FullToken<'VideoCard'> {
|
|
5
5
|
}
|
|
6
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
6
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../theme/theme-context").ThemeManager) => {
|
|
7
7
|
hashId: import("vue").Ref<string, string>;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -91,7 +91,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
91
91
|
}, null, 10, _hoisted_2), createElementVNode("div", {
|
|
92
92
|
class: normalizeClass(`${unref(prefixCls)}-play-mask`)
|
|
93
93
|
}, [createVNode(stdin_default$2, {
|
|
94
|
-
name: "
|
|
94
|
+
name: "co:play-circle-outline",
|
|
95
95
|
class: normalizeClass(`${unref(prefixCls)}-play-icon`)
|
|
96
96
|
}, null, 8, ["class"])], 2
|
|
97
97
|
/* CLASS */)], 16, _hoisted_1), viewerVisible.value ? (openBlock(), createBlock(stdin_default$3, {
|
|
@@ -3,7 +3,7 @@ export interface ComponentToken {
|
|
|
3
3
|
}
|
|
4
4
|
export interface VideoViewerToken extends FullToken<'VideoViewer'> {
|
|
5
5
|
}
|
|
6
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string,
|
|
6
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../theme/theme-context").ThemeManager) => {
|
|
7
7
|
hashId: import("vue").Ref<string, string>;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
package/config/http.d.ts
CHANGED
package/config/http.js
CHANGED
package/config/index.d.ts
CHANGED
|
@@ -9,39 +9,40 @@ 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;
|
|
44
44
|
authWidget?: () => VNodeChild;
|
|
45
|
+
userMenu?: () => VNodeChild;
|
|
45
46
|
}
|
|
46
47
|
export type CoseyOptions = {
|
|
47
48
|
router?: CoseyRouterOptions & RouterConfig;
|
package/config/index.js
CHANGED
|
@@ -8,9 +8,7 @@ import { defaultsDeep } from 'lodash-es';
|
|
|
8
8
|
import { inject } from 'vue';
|
|
9
9
|
import { createPersist } from '../hooks/usePersist.js';
|
|
10
10
|
|
|
11
|
-
const globalConfigContextKey = Symbol(
|
|
12
|
-
"globalConfigContext"
|
|
13
|
-
);
|
|
11
|
+
const globalConfigContextKey = Symbol("globalConfigContext");
|
|
14
12
|
function provideGlobalConfig(app, options) {
|
|
15
13
|
const {
|
|
16
14
|
router: { homePath, loginPath, changePasswordPath } = {},
|
|
@@ -27,10 +25,7 @@ function provideGlobalConfig(app, options) {
|
|
|
27
25
|
const persistConfig = defaultsDeep(persist, defaultPersistConfig);
|
|
28
26
|
app.provide(globalConfigContextKey, {
|
|
29
27
|
persist: createPersist(persistConfig.name, persistConfig.type),
|
|
30
|
-
router: defaultsDeep(
|
|
31
|
-
{ homePath, loginPath, changePasswordPath },
|
|
32
|
-
defaultRouterConfig
|
|
33
|
-
),
|
|
28
|
+
router: defaultsDeep({ homePath, loginPath, changePasswordPath }, defaultRouterConfig),
|
|
34
29
|
http: defaultsDeep(http, defaultHttpConfig),
|
|
35
30
|
layout: defaultsDeep(layout, defaultLayoutConfig),
|
|
36
31
|
site: defaultsDeep(site, defaultSiteConfig),
|
package/config/layout.d.ts
CHANGED
|
@@ -11,6 +11,42 @@ export declare const defaultLayoutConfig: {
|
|
|
11
11
|
* 是否启用标签页缓存
|
|
12
12
|
*/
|
|
13
13
|
keepAlive: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 是否默认显示侧边栏
|
|
16
|
+
*/
|
|
17
|
+
sidebarVisible: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* 是否默认折叠收起垂直菜单
|
|
20
|
+
*/
|
|
21
|
+
collapse: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* 菜单类型
|
|
24
|
+
*/
|
|
25
|
+
menuType: "vertical" | "biserial" | "horizontal" | "horizontal-vertical" | "horizontal-biserial";
|
|
26
|
+
/**
|
|
27
|
+
* 是否显示标签页
|
|
28
|
+
*/
|
|
29
|
+
tabbarVisible: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* 侧边菜单宽度
|
|
32
|
+
*/
|
|
33
|
+
asideWidth: number;
|
|
34
|
+
/**
|
|
35
|
+
* 折叠时侧边栏菜单宽度
|
|
36
|
+
*/
|
|
37
|
+
collapsedAsideWidth: number;
|
|
38
|
+
/**
|
|
39
|
+
* 紧凑侧边菜单宽度
|
|
40
|
+
*/
|
|
41
|
+
snugAsideWidth: number;
|
|
42
|
+
/**
|
|
43
|
+
* 顶部栏高度
|
|
44
|
+
*/
|
|
45
|
+
topbarHeight: number;
|
|
46
|
+
/**
|
|
47
|
+
* 标签栏高度
|
|
48
|
+
*/
|
|
49
|
+
tabbarHeight: number;
|
|
14
50
|
};
|
|
15
51
|
export type LayoutConfig = DeepPartial<typeof defaultLayoutConfig>;
|
|
16
52
|
export type RequiredLayoutConfig = typeof defaultLayoutConfig;
|
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 };
|