@kengic/vue 0.27.2-beta.1 → 0.27.2-beta.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/kengic-vue.js +11104 -9169
- package/dist/src/api/WMS/Controllers/VarConfigPossibilityController/ExecuteQuery.d.ts +1 -1
- package/dist/src/api/WMS/Controllers/VarGridMasterController/QueryByID.d.ts +1 -1
- package/dist/src/api/WMS/Controllers/VarProfileMasterController/QueryByID.d.ts +1 -1
- package/dist/src/api/WMS/models.d.ts +14 -0
- package/dist/src/component/KgButton/KgButton.hooks.d.ts +5 -1
- package/dist/src/component/KgForm/KgForm.hooks.d.ts +5 -1
- package/dist/src/component/KgSearch/KgSearch.hooks.d.ts +5 -1
- package/dist/src/component/KgSubmit/KgSubmit.hooks.d.ts +5 -1
- package/dist/src/component/KgTable/KgTable.hooks.d.ts +5 -1
- package/dist/src/component/KgVar/KgVar.hooks.d.ts +5 -1
- package/dist/src/component/KgWarehouse/KgWarehouse.hooks.d.ts +1 -7
- 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 +20 -0
- package/dist/src/project/src/hooks/jeecg/useAdaptiveWidth.d.ts +18 -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 -8
- 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/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/props.d.ts +68 -0
- package/dist/src/project/src/utils/uuid.d.ts +2 -0
- package/dist/src/util/event.util.d.ts +15 -0
- package/dist/src/util/index.d.ts +1 -0
- package/package.json +5 -2
@@ -1029,16 +1029,30 @@ export declare class WorkstationDTO {
|
|
1029
1029
|
devcodDsc?: string | null;
|
1030
1030
|
/** 主工作区. */
|
1031
1031
|
hmewrkare?: string | null;
|
1032
|
+
/** 主工作区描述. */
|
1033
|
+
hmewrkareDsc?: string | null;
|
1032
1034
|
/** 主键. */
|
1033
1035
|
id?: string | null;
|
1034
1036
|
/** 创建日期. */
|
1035
1037
|
insDt?: string | null;
|
1036
1038
|
/** 创建用户. */
|
1037
1039
|
insUsrId?: string | null;
|
1040
|
+
/** 标签打印机(Label Printer Address). */
|
1041
|
+
lblPrtadr?: string | null;
|
1042
|
+
/** 标签打印机名称. */
|
1043
|
+
lblPrtadrDsc?: string | null;
|
1044
|
+
/** 便携标签打印机(Mobile Printer Address). */
|
1045
|
+
mobPrtadr?: string | null;
|
1046
|
+
/** 便携标签打印机名称. */
|
1047
|
+
mobPrtadrDsc?: string | null;
|
1038
1048
|
/** 修改日期. */
|
1039
1049
|
modUsrId?: string | null;
|
1040
1050
|
/** 修改用户. */
|
1041
1051
|
moddte?: string | null;
|
1052
|
+
/** 纸张打印机(Paper Printer Address). */
|
1053
|
+
papPrtadr?: string | null;
|
1054
|
+
/** 纸张打印机名称. */
|
1055
|
+
papPrtadrDsc?: string | null;
|
1042
1056
|
/** 仓库. */
|
1043
1057
|
whId?: string | null;
|
1044
1058
|
/** 工作站与工作区域关系. */
|
@@ -2,7 +2,7 @@ import { IRemoveEventListener } from '@kengic/core.core';
|
|
2
2
|
import { ComputedRef } from 'vue';
|
3
3
|
import { VarButton, VarButtonConfig } from '../../api/WMS/models';
|
4
4
|
import { KG__VAR_BUTTON__TYPE } from '../../const';
|
5
|
-
import { IKgButtonOnAfterRequestEventListener, IKgButtonOnBeforeRequestEventListener, IKgButtonOnClickEventListener, IKgButtonOnImportOkEventListener, IKgButtonOnSubmitCancelEventListener, IKgButtonOnSubmitSaveEventListener } from './KgButton.event';
|
5
|
+
import { eventListeners, IKgButtonOnAfterRequestEventListener, IKgButtonOnBeforeRequestEventListener, IKgButtonOnClickEventListener, IKgButtonOnImportOkEventListener, IKgButtonOnSubmitCancelEventListener, IKgButtonOnSubmitSaveEventListener } from './KgButton.event';
|
6
6
|
import { IKgButtonStore } from './KgButton.store';
|
7
7
|
export interface IUseKgButton {
|
8
8
|
/**
|
@@ -20,6 +20,10 @@ export interface IUseKgButton {
|
|
20
20
|
* <p>「当前按钮」. 即当前提交表单所属的按钮.</p>
|
21
21
|
*/
|
22
22
|
currentButton: ComputedRef<VarButton | null>;
|
23
|
+
/**
|
24
|
+
* 所有事件监听函数.
|
25
|
+
*/
|
26
|
+
eventListeners: typeof eventListeners;
|
23
27
|
/**
|
24
28
|
* 界面标识.
|
25
29
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { IRemoveEventListener } from '@kengic/core.core';
|
2
|
-
import { IKgFormOnBlurEventListener, IKgFormOnChangeEventListener, IKgFormOnLookupBeforeOkEventListener, IKgFormOnLookupBeforeOpenEventListener, IKgFormOnLookupOkEventListener, IKgFormOnSelectBeforeRequestEventListener, IKgFormOnSelectBeforeSetDatasEventListener, IKgFormOnSelectChangeEventListener } from './KgForm.event';
|
2
|
+
import { eventListeners, IKgFormOnBlurEventListener, IKgFormOnChangeEventListener, IKgFormOnLookupBeforeOkEventListener, IKgFormOnLookupBeforeOpenEventListener, IKgFormOnLookupOkEventListener, IKgFormOnSelectBeforeRequestEventListener, IKgFormOnSelectBeforeSetDatasEventListener, IKgFormOnSelectChangeEventListener } from './KgForm.event';
|
3
3
|
import { IKgFormStore } from './KgForm.store';
|
4
4
|
export declare type IUseKgForm = {
|
5
5
|
Select: {
|
@@ -12,6 +12,10 @@ export declare type IUseKgForm = {
|
|
12
12
|
varName: string | null | undefined;
|
13
13
|
}): void;
|
14
14
|
};
|
15
|
+
/**
|
16
|
+
* 所有事件监听函数.
|
17
|
+
*/
|
18
|
+
eventListeners: typeof eventListeners;
|
15
19
|
formID: string;
|
16
20
|
/**
|
17
21
|
* 监听事件: 失去焦点.
|
@@ -2,7 +2,7 @@ import { IRemoveEventListener } from '@kengic/core.core';
|
|
2
2
|
import { ComputedRef } from 'vue';
|
3
3
|
import { VarProfileDetail, VarProfileMasterDTO } from '../../api/WMS/models';
|
4
4
|
import { IKgTableRequestParameter } from '../KgTable';
|
5
|
-
import { IKgSearchOnReadyEventListener, IKgSearchOnResetEventListener, IKgSearchOnSearchEventListener } from './KgSearch.event';
|
5
|
+
import { eventListeners, IKgSearchOnReadyEventListener, IKgSearchOnResetEventListener, IKgSearchOnSearchEventListener } from './KgSearch.event';
|
6
6
|
import { IKgSearchStore } from './KgSearch.store';
|
7
7
|
export declare type IUseKgSearch = {
|
8
8
|
/**
|
@@ -18,6 +18,10 @@ export declare type IUseKgSearch = {
|
|
18
18
|
* 高级查询的操作符表单数据对象.
|
19
19
|
*/
|
20
20
|
dynamicQueryOperatorModel: ComputedRef<Record<string, string>>;
|
21
|
+
/**
|
22
|
+
* 所有事件监听函数.
|
23
|
+
*/
|
24
|
+
eventListeners: typeof eventListeners;
|
21
25
|
/**
|
22
26
|
* 界面标识.
|
23
27
|
*/
|
@@ -4,7 +4,7 @@ import { RuleObject } from 'ant-design-vue/es/form';
|
|
4
4
|
import { ComputedRef, Ref } from 'vue';
|
5
5
|
import { VarProfileDetail, VarSubmitConfig, VarSubmitDetail } from '../../api/WMS/models';
|
6
6
|
import { IKgVarSubmitConfigProperties, KG__VAR_BUTTON__TYPE, KG__VAR_SUBMIT_CONFIG__DISPLAY_TYPE, KG__VAR_SUBMIT_CONFIG__LABEL_COLUMN_UNIT, KG__VAR_SUBMIT_CONFIG__LAYOUT } from '../../const';
|
7
|
-
import { IKgSubmitOnAfterValidateEventListener, IKgSubmitOnBeforeCancelEventListener, IKgSubmitOnBeforeOkEventListener, IKgSubmitOnBeforeOpenEventListener, IKgSubmitOnBeforeRequestEventListener, IKgSubmitOnCancelEventListener, IKgSubmitOnCloseEventListener, IKgSubmitOnErrorEventListener, IKgSubmitOnOkEventListener, IKgSubmitOnOpenEventListener } from './KgSubmit.event';
|
7
|
+
import { eventListeners, IKgSubmitOnAfterValidateEventListener, IKgSubmitOnBeforeCancelEventListener, IKgSubmitOnBeforeOkEventListener, IKgSubmitOnBeforeOpenEventListener, IKgSubmitOnBeforeRequestEventListener, IKgSubmitOnCancelEventListener, IKgSubmitOnCloseEventListener, IKgSubmitOnErrorEventListener, IKgSubmitOnOkEventListener, IKgSubmitOnOpenEventListener } from './KgSubmit.event';
|
8
8
|
import { IKgSubmitStore } from './KgSubmit.store';
|
9
9
|
export interface IUseKgSubmit {
|
10
10
|
/**
|
@@ -58,6 +58,10 @@ export interface IUseKgSubmit {
|
|
58
58
|
* <p>「当前按钮」的「提交表单字段」(可见的).</p>
|
59
59
|
*/
|
60
60
|
currentVarSubmitDetailsForVisible: ComputedRef<VarSubmitDetail[] | null>;
|
61
|
+
/**
|
62
|
+
* 所有事件监听函数.
|
63
|
+
*/
|
64
|
+
eventListeners: typeof eventListeners;
|
61
65
|
/**
|
62
66
|
* 界面标识.
|
63
67
|
*/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { IRemoveEventListener } from '@kengic/core.core';
|
2
2
|
import { ComputedRef } from 'vue';
|
3
|
-
import { IKgTableOnAfterRequestEventListener, IKgTableOnBeforeParseRequestParameterEventListener, IKgTableOnBeforeRequestEventListener, IKgTableOnBeforeSetDatasEventListener, IKgTableOnReadyEventListener, IKgTableOnRowDoubleClickEventListener } from './KgTable.event';
|
3
|
+
import { eventListeners, IKgTableOnAfterRequestEventListener, IKgTableOnBeforeParseRequestParameterEventListener, IKgTableOnBeforeRequestEventListener, IKgTableOnBeforeSetDatasEventListener, IKgTableOnReadyEventListener, IKgTableOnRowDoubleClickEventListener } from './KgTable.event';
|
4
4
|
import { IKgTableStore } from './KgTable.store';
|
5
5
|
import { IKgTableRow } from './KgTable.vm';
|
6
6
|
export interface IUseKgTable {
|
@@ -8,6 +8,10 @@ export interface IUseKgTable {
|
|
8
8
|
* 列表数据.
|
9
9
|
*/
|
10
10
|
datas: ComputedRef<Record<string, any>[]>;
|
11
|
+
/**
|
12
|
+
* 所有事件监听函数.
|
13
|
+
*/
|
14
|
+
eventListeners: typeof eventListeners;
|
11
15
|
/** 界面标识. */
|
12
16
|
formID: string;
|
13
17
|
/** @deprecated 已弃用, 请使用 {@link IUseKgTable.idKey}. */
|
@@ -8,7 +8,7 @@ import { type IUseKgSearch } from '../KgSearch';
|
|
8
8
|
import { IUseKgSubmit } from '../KgSubmit';
|
9
9
|
import { IUseKgTable } from '../KgTable';
|
10
10
|
import { IUseKgVarConfig } from '../KgVarConfig';
|
11
|
-
import { IKgVarOnRequestEventListener, IKgVarOnSetupEventListener, IKgVarOnUnmountedEventListener } from './KgVar.event';
|
11
|
+
import { eventListeners, IKgVarOnRequestEventListener, IKgVarOnSetupEventListener, IKgVarOnUnmountedEventListener } from './KgVar.event';
|
12
12
|
import { IKgVarStore } from './KgVar.store';
|
13
13
|
import { IKgProps, IKgSlots } from './KgVar.vm';
|
14
14
|
export declare type IUseKgVar = {
|
@@ -41,6 +41,10 @@ export declare type IUseKgVar = {
|
|
41
41
|
currentVarGridMaster: ComputedRef<VarGridMasterDTO | null>;
|
42
42
|
/** 当前的 VarProfileMaster ID. */
|
43
43
|
currentVarProfileMasterID: ComputedRef<string | null>;
|
44
|
+
/**
|
45
|
+
* 所有事件监听函数.
|
46
|
+
*/
|
47
|
+
eventListeners: typeof eventListeners;
|
44
48
|
/**
|
45
49
|
* 界面标识.
|
46
50
|
*/
|
@@ -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;
|
@@ -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,2 +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';
|
1
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';
|
2
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,14 +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';
|
15
|
-
export * from './utils/propTypes';
|
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;
|