@kengic/vue 0.27.2-beta.0 → 0.27.2-beta.2
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/dist/index.css +1 -1
- package/dist/kengic-vue.js +59326 -56601
- package/dist/project/build/vite/plugin/index.ts +1 -1
- package/dist/project/types/global.d.ts +0 -1
- package/dist/src/component/KgModal/KgModal.d.ts +6 -6
- package/dist/src/component/KgSubmit/KgSubmit.hooks.d.ts +4 -8
- package/dist/src/component/KgWarehouse/KgWarehouse.hooks.d.ts +1 -7
- package/dist/src/config/{index.hooks.d.ts → config.hooks.d.ts} +2 -6
- package/dist/src/config/index.d.ts +30 -3
- package/dist/src/const/index.d.ts +2 -3
- package/dist/src/{config/setup/setupKgLocale.d.ts → i18n/i18n.setup.d.ts} +2 -2
- package/dist/src/i18n/index.d.ts +3 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/project/src/components/Application/src/useAppContext.d.ts +9 -0
- package/dist/src/project/src/components/index.d.ts +1 -0
- package/dist/src/project/src/hooks/component/useFormItem.d.ts +2 -0
- package/dist/src/project/src/hooks/component/usePageContext.d.ts +10 -0
- package/dist/src/project/src/hooks/core/onMountedOrActivated.d.ts +1 -0
- package/dist/src/project/src/hooks/core/useAttrs.d.ts +9 -0
- package/dist/src/project/src/hooks/core/useContext.d.ts +11 -0
- package/dist/src/project/src/hooks/core/useRefs.d.ts +2 -0
- package/dist/src/project/src/hooks/core/useTimeout.d.ts +10 -0
- package/dist/src/project/src/hooks/event/useBreakpoint.d.ts +22 -0
- package/dist/src/project/src/hooks/event/useEventListener.d.ts +14 -0
- package/dist/src/project/src/hooks/event/useIntersectionObserver.d.ts +13 -0
- package/dist/src/project/src/hooks/event/useScrollTo.d.ts +10 -0
- package/dist/src/project/src/hooks/event/useWindowSizeFn.d.ts +7 -0
- package/dist/src/project/src/hooks/index.d.ts +21 -0
- package/dist/src/project/src/hooks/jeecg/useAdaptiveWidth.d.ts +18 -0
- package/dist/src/project/src/hooks/setting/index.d.ts +2 -0
- package/dist/src/project/src/hooks/web/useAppInject.d.ts +3 -0
- package/dist/src/project/src/hooks/web/useContentHeight.d.ts +24 -0
- package/dist/src/project/src/hooks/web/useCopyToClipboard.d.ts +10 -0
- package/dist/src/project/src/hooks/web/useDesign.d.ts +4 -0
- package/dist/src/project/src/hooks/web/usePage.d.ts +10 -0
- package/dist/src/project/src/hooks/web/usePagination.d.ts +7 -0
- package/dist/src/project/src/hooks/web/useWebSocket.d.ts +18 -0
- package/dist/src/project/src/index.d.ts +3 -7
- package/dist/src/project/src/layouts/default/content/useContentContext.d.ts +9 -0
- package/dist/src/project/src/layouts/default/content/useContentViewHeight.d.ts +7 -0
- package/dist/src/project/src/layouts/index.d.ts +2 -0
- package/dist/src/project/src/router/constant2.d.ts +3 -0
- package/dist/src/project/src/router/index.d.ts +2 -0
- package/dist/src/project/src/settings/index.d.ts +1 -0
- package/dist/src/project/src/settings/projectSetting.d.ts +3 -0
- package/dist/src/project/src/utils/auth/index.d.ts +19 -0
- package/dist/src/project/src/utils/bem.d.ts +15 -0
- package/dist/src/project/src/utils/color.d.ts +29 -0
- package/dist/src/project/src/utils/common/compUtils.d.ts +87 -0
- package/dist/src/project/src/utils/common/functionUtils.d.ts +6 -0
- package/dist/src/project/src/utils/dateUtil.d.ts +4 -0
- package/dist/src/project/src/utils/domUtils.d.ts +28 -0
- package/dist/src/project/src/utils/encryption/signMd5Utils.d.ts +29 -0
- package/dist/src/project/src/utils/env.d.ts +0 -2
- package/dist/src/project/src/utils/event/index.d.ts +3 -0
- package/dist/src/project/src/utils/factory/createAsyncComponent.d.ts +9 -0
- package/dist/src/project/src/utils/file/base64Conver.d.ts +4 -0
- package/dist/src/project/src/utils/file/download.d.ts +9 -0
- package/dist/src/project/src/utils/helper/treeHelper.d.ts +34 -0
- package/dist/src/project/src/utils/helper/tsxHelper.d.ts +13 -0
- package/dist/src/project/src/utils/index.d.ts +26 -0
- package/dist/src/project/src/utils/index.index.d.ts +42 -0
- package/dist/src/project/src/utils/is.d.ts +17 -0
- package/dist/src/project/src/utils/mitt.d.ts +26 -0
- package/dist/src/project/src/utils/propTypes.d.ts +9 -0
- package/dist/src/project/src/utils/props.d.ts +68 -0
- package/dist/src/project/src/utils/uuid.d.ts +2 -0
- package/dist/src/project/types/config.d.ts +0 -3
- package/dist/src/store/index.d.ts +8 -0
- package/dist/src/util/kg-route.util.d.ts +0 -2
- package/dist/src/util/kg.util.d.ts +0 -6
- package/package.json +6 -2
- package/dist/src/config/setup/index.d.ts +0 -3
- package/dist/src/config/setup/setup.d.ts +0 -28
- package/dist/src/config/setup/setupKgStore.d.ts +0 -18
- package/dist/src/const/i18n/index.d.ts +0 -2
- /package/dist/src/config/{index.store.d.ts → config.store.d.ts} +0 -0
- /package/dist/src/const/{injection-keys.const.d.ts → const.injection-keys.d.ts} +0 -0
- /package/dist/src/const/{index.vm.d.ts → const.vm.d.ts} +0 -0
- /package/dist/src/{const/i18n → i18n}/en.d.ts +0 -0
- /package/dist/src/{const/i18n → i18n}/es_ES.d.ts +0 -0
- /package/dist/src/{const/i18n → i18n}/fr_FR.d.ts +0 -0
- /package/dist/src/{const/i18n → i18n}/km_KH.d.ts +0 -0
- /package/dist/src/{const/i18n → i18n}/ko_KR.d.ts +0 -0
- /package/dist/src/{const/i18n → i18n}/vi_VN.d.ts +0 -0
- /package/dist/src/{const/i18n → i18n}/zh_CN.d.ts +0 -0
- /package/dist/src/{helper → util}/ant-design-vue.d.ts +0 -0
- /package/dist/src/{helper → util}/tsx.helper.d.ts +0 -0
@@ -18,7 +18,7 @@ import { configThemePlugin } from './theme';
|
|
18
18
|
import { configVisualizerConfig } from './visualizer';
|
19
19
|
|
20
20
|
export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
|
21
|
-
const { VITE_USE_IMAGEMIN,
|
21
|
+
const { VITE_USE_IMAGEMIN, VITE_LEGACY, VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE } = viteEnv;
|
22
22
|
|
23
23
|
const vitePlugins: (PluginOption | PluginOption[])[] = [
|
24
24
|
// have to
|
@@ -136,7 +136,7 @@ export declare const getProps: () => {
|
|
136
136
|
htmlType: {
|
137
137
|
type: PropType<import("ant-design-vue/es/button/buttonTypes").ButtonHTMLType>;
|
138
138
|
default: string;
|
139
|
-
};
|
139
|
+
}; /** 页面上专门添加了一个特殊的元素, 通过它可以获取其他元素对象. */
|
140
140
|
shape: {
|
141
141
|
type: PropType<import("ant-design-vue/lib/button").ButtonShape>;
|
142
142
|
};
|
@@ -184,7 +184,7 @@ export declare const getProps: () => {
|
|
184
184
|
htmlType: {
|
185
185
|
type: PropType<import("ant-design-vue/es/button/buttonTypes").ButtonHTMLType>;
|
186
186
|
default: string;
|
187
|
-
};
|
187
|
+
}; /** 页面上专门添加了一个特殊的元素, 通过它可以获取其他元素对象. */
|
188
188
|
shape: {
|
189
189
|
type: PropType<import("ant-design-vue/lib/button").ButtonShape>;
|
190
190
|
};
|
@@ -400,7 +400,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
400
400
|
htmlType: {
|
401
401
|
type: PropType<import("ant-design-vue/es/button/buttonTypes").ButtonHTMLType>;
|
402
402
|
default: string;
|
403
|
-
};
|
403
|
+
}; /** 页面上专门添加了一个特殊的元素, 通过它可以获取其他元素对象. */
|
404
404
|
shape: {
|
405
405
|
type: PropType<import("ant-design-vue/lib/button").ButtonShape>;
|
406
406
|
};
|
@@ -448,7 +448,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
448
448
|
htmlType: {
|
449
449
|
type: PropType<import("ant-design-vue/es/button/buttonTypes").ButtonHTMLType>;
|
450
450
|
default: string;
|
451
|
-
};
|
451
|
+
}; /** 页面上专门添加了一个特殊的元素, 通过它可以获取其他元素对象. */
|
452
452
|
shape: {
|
453
453
|
type: PropType<import("ant-design-vue/lib/button").ButtonShape>;
|
454
454
|
};
|
@@ -662,7 +662,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
662
662
|
htmlType: {
|
663
663
|
type: PropType<import("ant-design-vue/es/button/buttonTypes").ButtonHTMLType>;
|
664
664
|
default: string;
|
665
|
-
};
|
665
|
+
}; /** 页面上专门添加了一个特殊的元素, 通过它可以获取其他元素对象. */
|
666
666
|
shape: {
|
667
667
|
type: PropType<import("ant-design-vue/lib/button").ButtonShape>;
|
668
668
|
};
|
@@ -710,7 +710,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
710
710
|
htmlType: {
|
711
711
|
type: PropType<import("ant-design-vue/es/button/buttonTypes").ButtonHTMLType>;
|
712
712
|
default: string;
|
713
|
-
};
|
713
|
+
}; /** 页面上专门添加了一个特殊的元素, 通过它可以获取其他元素对象. */
|
714
714
|
shape: {
|
715
715
|
type: PropType<import("ant-design-vue/lib/button").ButtonShape>;
|
716
716
|
};
|
@@ -147,10 +147,10 @@ export interface IUseKgSubmit {
|
|
147
147
|
varName?: string | null;
|
148
148
|
} | null): Array<VarSubmitDetail> | null;
|
149
149
|
/**
|
150
|
-
*
|
151
|
-
*
|
152
|
-
* @deprecated 请使用 {@link formModel}
|
150
|
+
* 是否处于加载状态.
|
153
151
|
*/
|
152
|
+
isLoading: ComputedRef<boolean>;
|
153
|
+
/** @deprecated 请使用 {@link formModel} */
|
154
154
|
model: ComputedRef<Record<string, any>>;
|
155
155
|
/**
|
156
156
|
* <p>监听事件: 点击确认按钮之后, 表单验证完成.</p>
|
@@ -264,11 +264,7 @@ export interface IUseKgSubmit {
|
|
264
264
|
properties: VarSubmitDetail;
|
265
265
|
varName: string | null | undefined;
|
266
266
|
}): Promise<void>;
|
267
|
-
/**
|
268
|
-
* 表单验证规则.
|
269
|
-
*
|
270
|
-
* @deprecated 请使用 {@link formRules}.
|
271
|
-
*/
|
267
|
+
/** @deprecated 请使用 {@link formRules}. */
|
272
268
|
rules: Ref<Record<string, RuleObject[]>>;
|
273
269
|
/**
|
274
270
|
* <p>「查询按钮」的「提交表单配置」.</p>
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { IRemoveEventListener } from '@kengic/core.core';
|
2
|
-
import { Pinia } from 'pinia';
|
3
2
|
import { ComputedRef } from 'vue';
|
4
3
|
import { IKgWarehouseOnMountedEventListener } from './KgWarehouse.event';
|
5
4
|
import { IKgWarehouseStore } from './KgWarehouse.store';
|
@@ -20,9 +19,4 @@ export declare type IUseKgWarehouse = {
|
|
20
19
|
*/
|
21
20
|
warehouse: ComputedRef<IKgWarehouseStore['getWarehouse']>;
|
22
21
|
};
|
23
|
-
|
24
|
-
* 在某些地方调用时(比如在路由守卫中), pinia 尚未设置, 此时需要手动传入 pinia 实例.
|
25
|
-
*
|
26
|
-
* @param pinia
|
27
|
-
*/
|
28
|
-
export declare function useKgWarehouse(pinia?: Pinia): IUseKgWarehouse;
|
22
|
+
export declare function useKgWarehouse(): IUseKgWarehouse;
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import { Pinia } from 'pinia';
|
2
1
|
import { ComputedRef } from 'vue';
|
3
2
|
import { Description } from '../api/WMS/models';
|
4
3
|
import { LocaleType } from '../project/types/config';
|
5
|
-
import { IKgStore, P, T } from './
|
4
|
+
import { IKgStore, P, T } from './config.store';
|
6
5
|
export interface IUseKg {
|
7
6
|
/**
|
8
7
|
* 获取当前语言下的某个描述.
|
@@ -30,7 +29,4 @@ export interface IUseKg {
|
|
30
29
|
/** 翻译. */
|
31
30
|
t: T;
|
32
31
|
}
|
33
|
-
|
34
|
-
* @param pinia 在某些地方调用时(比如在路由守卫中), pinia 尚未初始化, 此时需要手动传入 pinia 实例.
|
35
|
-
*/
|
36
|
-
export declare function useKg(pinia?: Pinia): IUseKg;
|
32
|
+
export declare function useKg(): IUseKg;
|
@@ -1,3 +1,30 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
import { StoreDefinition } from 'pinia';
|
2
|
+
import { App } from 'vue';
|
3
|
+
import { Router } from 'vue-router';
|
4
|
+
import { IKgOption, P } from './config.store';
|
5
|
+
import '@kengic/core.react/index.css';
|
6
|
+
export declare type IKgOptions = {
|
7
|
+
/**
|
8
|
+
* 语言数据.
|
9
|
+
*/
|
10
|
+
I18N: Record<string, any>;
|
11
|
+
app: App;
|
12
|
+
i18n: any;
|
13
|
+
/** 配置参数. */
|
14
|
+
option?: IKgOption;
|
15
|
+
/** 权限方法, 用来判断是否具有某个(某些)权限. */
|
16
|
+
pFunction: P;
|
17
|
+
router: Router;
|
18
|
+
/** 状态数据: 权限. */
|
19
|
+
usePermissionStore: StoreDefinition<any, any, any, any>;
|
20
|
+
/** 状态数据: 用户. */
|
21
|
+
useUserStore: StoreDefinition<any, any, any, any>;
|
22
|
+
};
|
23
|
+
/**
|
24
|
+
* 初始.
|
25
|
+
*
|
26
|
+
* @param options 选项参数.
|
27
|
+
*/
|
28
|
+
export declare function setup(options: IKgOptions): Promise<void>;
|
29
|
+
export * from './config.hooks';
|
30
|
+
export * from './config.store';
|
@@ -1,3 +1,2 @@
|
|
1
|
-
export * from './
|
2
|
-
export * from './
|
3
|
-
export * from './injection-keys.const';
|
1
|
+
export * from './const.vm';
|
2
|
+
export * from './const.injection-keys';
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { DropMenu } from '
|
2
|
-
import { LocaleSetting, LocaleType } from '
|
1
|
+
import { DropMenu } from '../project/src/components/Dropdown/src/typing';
|
2
|
+
import { LocaleSetting, LocaleType } from '../project/types/config';
|
3
3
|
export declare const LOCALE: {
|
4
4
|
KO_KR: LocaleType;
|
5
5
|
EN: LocaleType;
|
package/dist/src/index.d.ts
CHANGED
@@ -5,7 +5,9 @@ export * from './api/WMS/models';
|
|
5
5
|
export * from './component';
|
6
6
|
export * from './config';
|
7
7
|
export * from './const';
|
8
|
+
export * from './i18n';
|
8
9
|
export * from './page';
|
9
10
|
export * from './service';
|
11
|
+
export * from './store';
|
10
12
|
export * from './util';
|
11
13
|
export * from './project';
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { Ref } from 'vue';
|
2
|
+
export interface AppProviderContextProps {
|
3
|
+
prefixCls: Ref<string>;
|
4
|
+
isMobile: Ref<boolean>;
|
5
|
+
}
|
6
|
+
export declare function createAppProviderContext(context: AppProviderContextProps): {
|
7
|
+
state: any;
|
8
|
+
};
|
9
|
+
export declare function useAppProviderContext(): AppProviderContextProps;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
2
|
+
export interface PageContextProps {
|
3
|
+
contentHeight: ComputedRef<number>;
|
4
|
+
pageHeight: Ref<number>;
|
5
|
+
setPageHeight: (height: number) => Promise<void>;
|
6
|
+
}
|
7
|
+
export declare function createPageContext(context: PageContextProps): {
|
8
|
+
state: any;
|
9
|
+
};
|
10
|
+
export declare function usePageContext(): PageContextProps;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function onMountedOrActivated(hook: Fn): void;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { Ref } from 'vue';
|
2
|
+
interface Params {
|
3
|
+
excludeListeners?: boolean;
|
4
|
+
excludeKeys?: string[];
|
5
|
+
excludeDefaultKeys?: boolean;
|
6
|
+
}
|
7
|
+
export declare function entries<T>(obj: Recordable<T>): [string, T][];
|
8
|
+
export declare function useAttrs(params?: Params): Ref<Recordable> | {};
|
9
|
+
export {};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { InjectionKey } from 'vue';
|
2
|
+
export interface CreateContextOptions {
|
3
|
+
readonly?: boolean;
|
4
|
+
createProvider?: boolean;
|
5
|
+
native?: boolean;
|
6
|
+
}
|
7
|
+
export declare function createContext<T>(context: any, key?: InjectionKey<T>, options?: CreateContextOptions): {
|
8
|
+
state: any;
|
9
|
+
};
|
10
|
+
export declare function useContext<T>(key: InjectionKey<T>, native?: boolean): T;
|
11
|
+
export declare function useContext<T>(key: InjectionKey<T>, defaultValue?: any, native?: boolean): T;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export declare function useTimeoutFn(handle: Fn<any>, wait: number, native?: boolean): {
|
2
|
+
readyRef: import("vue").Ref<boolean>;
|
3
|
+
stop: () => void;
|
4
|
+
start: () => void;
|
5
|
+
};
|
6
|
+
export declare function useTimeoutRef(wait: number): {
|
7
|
+
readyRef: import("vue").Ref<boolean>;
|
8
|
+
stop: () => void;
|
9
|
+
start: () => void;
|
10
|
+
};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { ComputedRef } from 'vue';
|
2
|
+
import { screenEnum, sizeEnum } from '../../enums';
|
3
|
+
export interface CreateCallbackParams {
|
4
|
+
screen: ComputedRef<sizeEnum | undefined>;
|
5
|
+
width: ComputedRef<number>;
|
6
|
+
realWidth: ComputedRef<number>;
|
7
|
+
screenEnum: typeof screenEnum;
|
8
|
+
screenMap: Map<sizeEnum, number>;
|
9
|
+
sizeEnum: typeof sizeEnum;
|
10
|
+
}
|
11
|
+
export declare function useBreakpoint(): {
|
12
|
+
screenRef: ComputedRef<sizeEnum | undefined>;
|
13
|
+
widthRef: ComputedRef<number>;
|
14
|
+
screenEnum: typeof screenEnum;
|
15
|
+
realWidthRef: ComputedRef<number>;
|
16
|
+
};
|
17
|
+
export declare function createBreakpointListen(fn?: (opt: CreateCallbackParams) => void): {
|
18
|
+
screenRef: ComputedRef<sizeEnum | undefined>;
|
19
|
+
screenEnum: typeof screenEnum;
|
20
|
+
widthRef: ComputedRef<number>;
|
21
|
+
realWidthRef: ComputedRef<number>;
|
22
|
+
};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { Ref } from 'vue';
|
2
|
+
export declare type RemoveEventFn = () => void;
|
3
|
+
export interface UseEventParams {
|
4
|
+
el?: Element | Ref<Element | undefined> | Window | any;
|
5
|
+
name: string;
|
6
|
+
listener: EventListener;
|
7
|
+
options?: boolean | AddEventListenerOptions;
|
8
|
+
autoRemove?: boolean;
|
9
|
+
isDebounce?: boolean;
|
10
|
+
wait?: number;
|
11
|
+
}
|
12
|
+
export declare function useEventListener({ el, name, listener, options, autoRemove, isDebounce, wait }: UseEventParams): {
|
13
|
+
removeEvent: RemoveEventFn;
|
14
|
+
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Ref } from 'vue';
|
2
|
+
interface IntersectionObserverProps {
|
3
|
+
target: Ref<Element | null | undefined>;
|
4
|
+
root?: Ref<any>;
|
5
|
+
onIntersect: IntersectionObserverCallback;
|
6
|
+
rootMargin?: string;
|
7
|
+
threshold?: number;
|
8
|
+
}
|
9
|
+
export declare function useIntersectionObserver({ target, root, onIntersect, rootMargin, threshold }: IntersectionObserverProps): {
|
10
|
+
observer: Ref<Nullable<IntersectionObserver>>;
|
11
|
+
stop: () => void;
|
12
|
+
};
|
13
|
+
export {};
|
@@ -1 +1,22 @@
|
|
1
|
+
export * from './component/usePageContext';
|
2
|
+
export * from './component/useFormItem';
|
3
|
+
export * from './core/onMountedOrActivated';
|
4
|
+
export * from './core/useAttrs';
|
5
|
+
export * from './core/useContext';
|
6
|
+
export * from './core/useRefs';
|
7
|
+
export * from './core/useTimeout';
|
8
|
+
export * from './event/useBreakpoint';
|
9
|
+
export * from './event/useEventListener';
|
10
|
+
export * from './event/useIntersectionObserver';
|
11
|
+
export * from './event/useScrollTo';
|
12
|
+
export * from './event/useWindowSizeFn';
|
13
|
+
export * from './jeecg/useAdaptiveWidth';
|
14
|
+
export * from './setting/index';
|
15
|
+
export * from './web/useAppInject';
|
16
|
+
export * from './web/useContentHeight';
|
17
|
+
export * from './web/useCopyToClipboard';
|
18
|
+
export * from './web/useDesign';
|
1
19
|
export * from './web/useI18n';
|
20
|
+
export * from './web/usePage';
|
21
|
+
export * from './web/usePagination';
|
22
|
+
export * from './web/useWebSocket';
|
@@ -0,0 +1,18 @@
|
|
1
|
+
declare type configType = Record<string, string | number>;
|
2
|
+
/**
|
3
|
+
* 自适应宽度
|
4
|
+
*
|
5
|
+
* @param widthConfig 宽度配置,可参考 defWidthConfig 配置
|
6
|
+
* @param assign 是否合并默认配置
|
7
|
+
* @param debounce 去抖毫秒数
|
8
|
+
*/
|
9
|
+
export declare function useAdaptiveWidth(widthConfig?: configType, assign?: boolean, debounce?: number): {
|
10
|
+
adaptiveWidth: import("vue").Ref<string | number | undefined>;
|
11
|
+
};
|
12
|
+
/**
|
13
|
+
* 抽屉自适应宽度
|
14
|
+
*/
|
15
|
+
export declare function useDrawerAdaptiveWidth(): {
|
16
|
+
adaptiveWidth: import("vue").Ref<string | number | undefined>;
|
17
|
+
};
|
18
|
+
export {};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
2
|
+
export interface CompensationHeight {
|
3
|
+
useLayoutFooter: boolean;
|
4
|
+
elements?: Ref[];
|
5
|
+
}
|
6
|
+
declare type Upward = number | string | null | undefined;
|
7
|
+
/**
|
8
|
+
* 动态计算内容高度,根据锚点dom最下坐标到屏幕最下坐标,根据传入dom的高度、padding、margin等值进行动态计算
|
9
|
+
* 最终获取合适的内容高度
|
10
|
+
*
|
11
|
+
* @param flag 用于开启计算的响应式标识
|
12
|
+
* @param anchorRef 锚点组件 Ref<ElRef | ComponentRef>
|
13
|
+
* @param subtractHeightRefs 待减去高度的组件列表 Ref<ElRef | ComponentRef>
|
14
|
+
* @param substractSpaceRefs 待减去空闲空间(margins/paddings)的组件列表 Ref<ElRef | ComponentRef>
|
15
|
+
* @param offsetHeightRef 计算偏移的响应式高度,计算高度时将直接减去此值
|
16
|
+
* @param upwardSpace 向上递归减去空闲空间的 层级 或 直到指定class为止 数值为2代表向上递归两次|数值为ant-layout表示向上递归直到碰见.ant-layout为止
|
17
|
+
* @returns 响应式高度
|
18
|
+
*/
|
19
|
+
export declare function useContentHeight(flag: ComputedRef<Boolean>, anchorRef: Ref, subtractHeightRefs: Ref[], substractSpaceRefs: Ref[], upwardSpace?: Ref<Upward> | ComputedRef<Upward> | Upward, offsetHeightRef?: Ref<number>): {
|
20
|
+
redoHeight: () => void;
|
21
|
+
setCompensation: (params: CompensationHeight) => void;
|
22
|
+
contentHeight: Ref<Nullable<number>>;
|
23
|
+
};
|
24
|
+
export {};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
interface Options {
|
2
|
+
target?: HTMLElement;
|
3
|
+
}
|
4
|
+
export declare function useCopyToClipboard(initial?: string): {
|
5
|
+
clipboardRef: import("vue").Ref<string>;
|
6
|
+
isSuccessRef: import("vue").Ref<boolean>;
|
7
|
+
copiedRef: import("vue").Ref<boolean>;
|
8
|
+
};
|
9
|
+
export declare function copyTextToClipboard(input: string, { target }?: Options): boolean;
|
10
|
+
export {};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { RouteLocationRaw, Router } from 'vue-router';
|
2
|
+
import { PageEnum } from '../../enums/pageEnum';
|
3
|
+
export declare type RouteLocationRawEx = Omit<RouteLocationRaw, 'path'> & {
|
4
|
+
path: PageEnum;
|
5
|
+
};
|
6
|
+
export declare function useGo(_router?: Router): (opt?: PageEnum | RouteLocationRawEx | string, isReplace?: boolean) => void;
|
7
|
+
/**
|
8
|
+
* @description: redo current page
|
9
|
+
*/
|
10
|
+
export declare const useRedo: (_router?: Router) => () => Promise<boolean>;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { Ref } from 'vue';
|
2
|
+
export declare function usePagination<T = any>(list: Ref<T[]>, pageSize: number): {
|
3
|
+
setCurrentPage: (page: number) => void;
|
4
|
+
getTotal: import("vue").ComputedRef<number>;
|
5
|
+
setPageSize: (pageSize: number) => void;
|
6
|
+
getPaginationList: import("vue").ComputedRef<T[]>;
|
7
|
+
};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { WebSocketResult } from '@vueuse/core';
|
2
|
+
/**
|
3
|
+
* 开启 WebSocket 链接,全局只需执行一次
|
4
|
+
* @param url
|
5
|
+
*/
|
6
|
+
export declare function connectWebSocket(url: string): void;
|
7
|
+
/**
|
8
|
+
* 添加 WebSocket 消息监听
|
9
|
+
* @param callback
|
10
|
+
*/
|
11
|
+
export declare function onWebSocket(callback: (data: object) => any): void;
|
12
|
+
/**
|
13
|
+
* 解除 WebSocket 消息监听
|
14
|
+
*
|
15
|
+
* @param callback
|
16
|
+
*/
|
17
|
+
export declare function offWebSocket(callback: (data: object) => any): void;
|
18
|
+
export declare function useMyWebSocket(): WebSocketResult<any>;
|
@@ -2,13 +2,9 @@ export * from './api';
|
|
2
2
|
export * from './components';
|
3
3
|
export * from './enums';
|
4
4
|
export * from './hooks';
|
5
|
+
export * from './layouts';
|
5
6
|
export * from './locales';
|
7
|
+
export * from './router';
|
6
8
|
export * from './settings';
|
7
9
|
export * from './store';
|
8
|
-
export * from './
|
9
|
-
export * from './utils/cache/index';
|
10
|
-
export * from './utils/cache/memory';
|
11
|
-
export * from './utils/cache/persistent';
|
12
|
-
export * from './utils/cache/storageCache';
|
13
|
-
export * from './utils/cipher';
|
14
|
-
export * from './utils/env';
|
10
|
+
export * from './utils';
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
2
|
+
export interface ContentContextProps {
|
3
|
+
contentHeight: ComputedRef<number>;
|
4
|
+
setPageHeight: (height: number) => Promise<void>;
|
5
|
+
}
|
6
|
+
export declare function createContentContext(context: ContentContextProps): {
|
7
|
+
state: any;
|
8
|
+
};
|
9
|
+
export declare function useContentContext(): ContentContextProps;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export declare function useLayoutHeight(): {
|
2
|
+
headerHeightRef: import("vue").Ref<number>;
|
3
|
+
footerHeightRef: import("vue").Ref<number>;
|
4
|
+
setHeaderHeight: (val: any) => void;
|
5
|
+
setFooterHeight: (val: any) => void;
|
6
|
+
};
|
7
|
+
export declare function useContentViewHeight(): void;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { BasicKeys } from '../cache/persistent';
|
2
|
+
/**
|
3
|
+
* 获取token
|
4
|
+
*/
|
5
|
+
export declare function getToken(): string;
|
6
|
+
/**
|
7
|
+
* 获取租户id
|
8
|
+
*/
|
9
|
+
export declare function getTenantId(): string;
|
10
|
+
export declare function getAuthCache<T>(key: BasicKeys): T;
|
11
|
+
export declare function setAuthCache(key: BasicKeys, value: any): void;
|
12
|
+
/**
|
13
|
+
* 移除缓存中的某个属性
|
14
|
+
* @param key
|
15
|
+
* @update:移除缓存中的某个属性
|
16
|
+
* @updateBy:lsq
|
17
|
+
* @updateDate:2021-09-07
|
18
|
+
*/
|
19
|
+
export declare function removeAuthCache<T>(key: BasicKeys): T;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
declare type Mod = string | {
|
2
|
+
[key: string]: any;
|
3
|
+
};
|
4
|
+
declare type Mods = Mod | Mod[];
|
5
|
+
/**
|
6
|
+
* bem helper
|
7
|
+
* b() // 'button'
|
8
|
+
* b('text') // 'button__text'
|
9
|
+
* b({ disabled }) // 'button button--disabled'
|
10
|
+
* b('text', { disabled }) // 'button__text button__text--disabled'
|
11
|
+
* b(['disabled', 'primary']) // 'button button--disabled button--primary'
|
12
|
+
*/
|
13
|
+
export declare function buildBEM(name: string): (el?: Mods, mods?: Mods) => Mods;
|
14
|
+
export declare function createBEM(name: string): ((el?: Mods | undefined, mods?: Mods | undefined) => Mods)[];
|
15
|
+
export {};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/**
|
2
|
+
* 判断是否 十六进制颜色值.
|
3
|
+
* 输入形式可为 #fff000 #f00
|
4
|
+
*
|
5
|
+
* @param String color 十六进制颜色值
|
6
|
+
* @return Boolean
|
7
|
+
*/
|
8
|
+
export declare function isHexColor(color: string): boolean;
|
9
|
+
/**
|
10
|
+
* Transform a HEX color to its RGB representation
|
11
|
+
* @param {string} hex The color to transform
|
12
|
+
* @returns The RGB representation of the passed color
|
13
|
+
*/
|
14
|
+
export declare function hexToRGB(hex: string): string;
|
15
|
+
export declare function colorIsDark(color: string): boolean | undefined;
|
16
|
+
/**
|
17
|
+
* Darkens a HEX color given the passed percentage
|
18
|
+
* @param {string} color The color to process
|
19
|
+
* @param {number} amount The amount to change the color by
|
20
|
+
* @returns {string} The HEX representation of the processed color
|
21
|
+
*/
|
22
|
+
export declare function darken(color: string, amount: number): string;
|
23
|
+
/**
|
24
|
+
* Lightens a 6 char HEX color according to the passed percentage
|
25
|
+
* @param {string} color The color to change
|
26
|
+
* @param {number} amount The amount to change the color by
|
27
|
+
* @returns {string} The processed color represented as HEX
|
28
|
+
*/
|
29
|
+
export declare function lighten(color: string, amount: number): string;
|