@kengic/vue 0.4.4 → 0.4.5-beta.1
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 +3688 -3569
- package/dist/src/apis/WMS/models.d.ts +9 -3
- package/dist/src/components/KgButton/components/KgButton.Other.d.ts +4 -4
- package/dist/src/components/KgButton/index.hooks.d.ts +1 -1
- package/dist/src/components/KgForm.Item/addon/KgForm.Item.Addon.Lookup.Modal.d.ts +1 -1
- package/dist/src/components/KgSearch/index.hooks.d.ts +1 -1
- package/dist/src/components/KgSubmit/index.hooks.d.ts +1 -1
- package/dist/src/components/KgTable/{KgTable.data.d.ts → KgTable.hooks.d.ts} +4 -4
- package/dist/src/components/KgTable/index.hooks.d.ts +1 -1
- package/dist/src/components/KgTable/index.vm.d.ts +12 -1
- package/dist/src/components/KgVar/index.hooks.d.ts +2 -0
- package/dist/src/components/KgVar/index.store.d.ts +4 -0
- package/dist/src/consts/index.d.ts +6 -1
- package/dist/src/consts/index.vm.d.ts +11 -0
- package/dist/src/utils/kg.util.d.ts +6 -5
- package/dist/src/utils/route.util.d.ts +7 -0
- package/package.json +1 -1
@@ -51,8 +51,12 @@ export declare class VarButton {
|
|
51
51
|
icon?: string | null;
|
52
52
|
/** 主键. */
|
53
53
|
id?: string | null;
|
54
|
+
/** 确认弹窗配置属性. */
|
55
|
+
modal_props?: string | null;
|
54
56
|
/** 是否使用主要按钮样式(PrimaryFlag). */
|
55
57
|
primary_flg?: number | null;
|
58
|
+
/** 是否显示确认弹窗. */
|
59
|
+
show_modal_flg?: number | null;
|
56
60
|
/** 显示顺序(SortSequence). */
|
57
61
|
srtseq?: number | null;
|
58
62
|
/** 按钮类型(Type). */
|
@@ -175,6 +179,8 @@ export declare class VarGridDTO {
|
|
175
179
|
}
|
176
180
|
/** 表格视图明细. */
|
177
181
|
export declare class VarGridDetail {
|
182
|
+
/** 对齐方式. */
|
183
|
+
align?: string | null;
|
178
184
|
/** 显示类型. */
|
179
185
|
display_type?: string | null;
|
180
186
|
/** 显示类型的参数. */
|
@@ -204,7 +210,7 @@ export declare class VarGridDetail {
|
|
204
210
|
/** 是否可见(VisibleFlag). */
|
205
211
|
vis_flg?: number | null;
|
206
212
|
/** 列宽(Width). */
|
207
|
-
width?:
|
213
|
+
width?: string | null;
|
208
214
|
constructor(obj?: VarGridDetail);
|
209
215
|
}
|
210
216
|
/** 表格视图. */
|
@@ -361,7 +367,7 @@ export declare class VarProfileMaster {
|
|
361
367
|
frm_id?: string | null;
|
362
368
|
/** 分组(GroupName). */
|
363
369
|
grp_nam?: string | null;
|
364
|
-
/**
|
370
|
+
/** 主键. */
|
365
371
|
id?: string | null;
|
366
372
|
/** 查询条件变量名称(ProfileVariableName). */
|
367
373
|
prf_var_nam?: string | null;
|
@@ -381,7 +387,7 @@ export declare class VarProfileMasterDTO {
|
|
381
387
|
frm_id?: string | null;
|
382
388
|
/** 分组(GroupName). */
|
383
389
|
grp_nam?: string | null;
|
384
|
-
/**
|
390
|
+
/** 主键. */
|
385
391
|
id?: string | null;
|
386
392
|
/** 查询条件变量名称(ProfileVariableName). */
|
387
393
|
prf_var_nam?: string | null;
|
@@ -6,12 +6,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
6
6
|
kgPrimary: {
|
7
7
|
type: import("vue").PropType<boolean | null | undefined>;
|
8
8
|
default: undefined;
|
9
|
-
};
|
9
|
+
};
|
10
10
|
kgIcon: import("vue").PropType<string | null>;
|
11
11
|
kgText: import("vue").PropType<string | null>;
|
12
12
|
kgColor: import("vue").PropType<KG_BTN_COLOR | null>;
|
13
13
|
kgDisabled: import("vue").PropType<boolean | null | undefined>;
|
14
|
-
kgLoading: import("vue").PropType<boolean>;
|
14
|
+
kgLoading: import("vue").PropType<boolean>; /** 点击按钮. */
|
15
15
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
16
16
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
17
17
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
@@ -20,12 +20,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
20
20
|
kgPrimary: {
|
21
21
|
type: import("vue").PropType<boolean | null | undefined>;
|
22
22
|
default: undefined;
|
23
|
-
};
|
23
|
+
};
|
24
24
|
kgIcon: import("vue").PropType<string | null>;
|
25
25
|
kgText: import("vue").PropType<string | null>;
|
26
26
|
kgColor: import("vue").PropType<KG_BTN_COLOR | null>;
|
27
27
|
kgDisabled: import("vue").PropType<boolean | null | undefined>;
|
28
|
-
kgLoading: import("vue").PropType<boolean>;
|
28
|
+
kgLoading: import("vue").PropType<boolean>; /** 点击按钮. */
|
29
29
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
30
30
|
}>>, {
|
31
31
|
kgPrimary: boolean | null | undefined;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { IRemoveEventListenerHandler } from '../../consts
|
1
|
+
import { IRemoveEventListenerHandler } from '../../consts';
|
2
2
|
import { IKgButtonBeforeUpdateCb, IKgButtonClickCb, IKgButtonDeleteOkCb, IKgButtonStore } from './index.store';
|
3
3
|
export declare type IUseKgButton = {
|
4
4
|
formID: string;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
2
|
-
import './KgForm.Item.Addon.Lookup.Modal.less';
|
3
2
|
import { IKgTableRecord } from '../../KgTable';
|
3
|
+
import './KgForm.Item.Addon.Lookup.Modal.less';
|
4
4
|
export declare const getProps: () => {
|
5
5
|
visible: PropType<boolean>;
|
6
6
|
'onUpdate:visible': PropType<(value: boolean) => void>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ComputedRef } from 'vue';
|
2
|
-
import { IRemoveEventListenerHandler } from '../../consts
|
2
|
+
import { IRemoveEventListenerHandler } from '../../consts';
|
3
3
|
import { IKgSearchReadyCb, IKgSearchResetCb, IKgSearchSearchCb, IKgSearchStore } from './index.store';
|
4
4
|
export declare type IUseKgSearch = {
|
5
5
|
formID: string;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { IRemoveEventListenerHandler } from '../../consts
|
1
|
+
import { IRemoveEventListenerHandler } from '../../consts';
|
2
2
|
import { IKgSubmitBeforeOkCb, IKgSubmitCloseCb, IKgSubmitOkCb, IKgSubmitOpenCb, IKgSubmitStore } from './index.store';
|
3
3
|
export declare type IUseKgSubmit = {
|
4
4
|
formID: string;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ComputedRef, Ref, UnwrapRef } from 'vue';
|
2
1
|
import { ColumnsType } from 'ant-design-vue/es/table';
|
2
|
+
import { ComputedRef, Ref, UnwrapRef } from 'vue';
|
3
3
|
import { IKgTableRecord } from './index.vm';
|
4
4
|
export declare type IUseColumns = {
|
5
5
|
/** 表格的列. */
|
@@ -8,10 +8,10 @@ export declare type IUseColumns = {
|
|
8
8
|
scrollX: ComputedRef<string>;
|
9
9
|
};
|
10
10
|
export declare function _useColumns(): IUseColumns;
|
11
|
-
export declare type
|
11
|
+
export declare type IUseLoading = {
|
12
12
|
/** 是否显示加载状态. */
|
13
|
-
|
13
|
+
isLoading: ComputedRef<boolean>;
|
14
14
|
};
|
15
|
-
export declare function
|
15
|
+
export declare function _useLoading(): IUseLoading;
|
16
16
|
export declare type IUseResizeObserver = {};
|
17
17
|
export declare function _useResizeObserver(kgTableRef: Ref<UnwrapRef<HTMLDivElement | null>>): IUseResizeObserver;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ComputedRef } from 'vue';
|
2
|
-
import { IRemoveEventListenerHandler } from '../../consts
|
2
|
+
import { IRemoveEventListenerHandler } from '../../consts';
|
3
3
|
import { IKgTableRetrieveCb, IKgTableRowDoubleClickCb, IKgTableStore } from './index.store';
|
4
4
|
export declare type IUseKgTable = {
|
5
5
|
formID: string;
|
@@ -33,6 +33,17 @@ export interface IKgTableCellDisplayTypeProperties {
|
|
33
33
|
*/
|
34
34
|
nValue: any;
|
35
35
|
};
|
36
|
+
ENUM: Array<{
|
37
|
+
/** 数据. */
|
38
|
+
value: any;
|
39
|
+
/**
|
40
|
+
* 颜色.
|
41
|
+
* @default 'default'
|
42
|
+
*/
|
43
|
+
color?: string;
|
44
|
+
/** 变量名称. */
|
45
|
+
varName: string;
|
46
|
+
}>;
|
36
47
|
PROGRESS: {
|
37
48
|
/**
|
38
49
|
* 左侧数值对应的列.
|
@@ -54,7 +65,7 @@ export declare const KG_TABLE_TD_DEFAULT_WIDTH = 120;
|
|
54
65
|
/** 列的最小宽度. 拖动修改列的宽度时, 不允许超过该最小宽度. */
|
55
66
|
export declare const KG_TABLE_TD_MIN_WIDTH = 80;
|
56
67
|
/** 列的最大宽度. 拖动修改列的宽度时, 不允许超过该最大宽度. */
|
57
|
-
export declare const KG_TABLE_TD_MAX_WIDTH =
|
68
|
+
export declare const KG_TABLE_TD_MAX_WIDTH = 1920;
|
58
69
|
/** 勾选列的宽度. */
|
59
70
|
export declare const KG_TABLE_TD_CHECK_WIDTH = 32;
|
60
71
|
/** 序号列的宽度. */
|
@@ -18,6 +18,8 @@ export declare type IUseKgVar = {
|
|
18
18
|
isCopying: ComputedRef<ReturnType<IKgVarStore['isCopying']>>;
|
19
19
|
/** 正在删除. */
|
20
20
|
isDeleting: ComputedRef<ReturnType<IKgVarStore['isDeleting']>>;
|
21
|
+
/** 其他按钮: 正在调用接口. */
|
22
|
+
isOtherRequesting: ComputedRef<ReturnType<IKgVarStore['isOtherRequesting']>>;
|
21
23
|
/** 所有的 VarButton 列表. */
|
22
24
|
varButtons: ComputedRef<ReturnType<IKgVarStore['getVarButtons']>>;
|
23
25
|
/** 所有的 VarProfileMaster 列表. */
|
@@ -25,6 +25,8 @@ export interface IKgVarState {
|
|
25
25
|
isDeletingMap: Map<string, boolean>;
|
26
26
|
/** 正在删除: 正在调用接口. */
|
27
27
|
isDeletingRequestingMap: Map<string, boolean>;
|
28
|
+
/** 其他按钮: 正在调用接口. */
|
29
|
+
isOtherRequestingMap: Map<string, boolean>;
|
28
30
|
varCatalogsMap: Map<string, Array<VarCatalog>>;
|
29
31
|
varLookupsMap: Map<string, Array<VarLookup>>;
|
30
32
|
varPossibilitiesMap: Map<string, Array<VarPossibility>>;
|
@@ -57,6 +59,7 @@ export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', IKgVarState
|
|
57
59
|
isUpdatingRequesting(): (formID?: string | null) => boolean | null;
|
58
60
|
isCopyingRequesting(): (formID?: string | null) => boolean | null;
|
59
61
|
isDeletingRequesting(): (formID?: string | null) => boolean | null;
|
62
|
+
isOtherRequesting(): (formID?: string | null) => boolean | null;
|
60
63
|
getVarCatalogs(): (formID?: string | null) => Array<VarCatalog> | null;
|
61
64
|
getVarCatalog(): (formID?: string | null, var_nam?: string | null) => VarCatalog | null;
|
62
65
|
getVarLookup(): (formID?: string | null, var_nam?: string | null) => VarLookup | null;
|
@@ -126,6 +129,7 @@ export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', IKgVarState
|
|
126
129
|
setIsUpdatingRequesting(formID: string, value: boolean): void;
|
127
130
|
setIsCopyingRequesting(formID: string, value: boolean): void;
|
128
131
|
setIsDeletingRequesting(formID: string, deleting: boolean): void;
|
132
|
+
setIsOtherRequesting(formID: string, deleting: boolean): void;
|
129
133
|
/**
|
130
134
|
* 设置当前选择的查询条件的 ID.
|
131
135
|
* @param formID 界面标识.
|
@@ -1,4 +1,5 @@
|
|
1
1
|
export * from './i18n';
|
2
|
+
export * from './index.vm';
|
2
3
|
export * from './injection-keys.const';
|
3
4
|
/** 模块. */
|
4
5
|
export declare const enum KG_APP {
|
@@ -55,8 +56,12 @@ export declare const enum KG_CONTROL_CONTEXT {
|
|
55
56
|
export declare const enum KG_TD_DISPLAY_TYPE {
|
56
57
|
/** 布尔数据, 使用 KgYesOrNo 组件显示. */
|
57
58
|
YN = "YN",
|
59
|
+
/** 枚举数据, 使用 Tag 组件显示. */
|
60
|
+
ENUM = "ENUM",
|
58
61
|
/** 进度条, 使用 KgProgressA 组件显示. */
|
59
|
-
PROGRESS = "PROGRESS"
|
62
|
+
PROGRESS = "PROGRESS",
|
63
|
+
/** 文件大小, 将以字节(byte)为单位的数字格式化显示(XXX MB, XXX GB, ...). */
|
64
|
+
FILE_SIZE = "FILE_SIZE"
|
60
65
|
}
|
61
66
|
/** 按钮类型. */
|
62
67
|
export declare const enum KG_BTN_TYPE {
|
@@ -1,2 +1,13 @@
|
|
1
1
|
/** 移除监听函数. */
|
2
2
|
export declare type IRemoveEventListenerHandler = () => void;
|
3
|
+
/** 菜单. */
|
4
|
+
export interface Menu {
|
5
|
+
id: string;
|
6
|
+
app: string;
|
7
|
+
name: string;
|
8
|
+
title: string;
|
9
|
+
path: string;
|
10
|
+
icon?: string;
|
11
|
+
hideMenu?: boolean;
|
12
|
+
children?: Menu[];
|
13
|
+
}
|
@@ -43,10 +43,7 @@ export declare class KgUtil {
|
|
43
43
|
* https://www.antdv.com/components/modal
|
44
44
|
* @param props
|
45
45
|
*/
|
46
|
-
static confirm(props:
|
47
|
-
/** 是否隐藏取消按钮. */
|
48
|
-
hideCancelButton?: boolean;
|
49
|
-
}): ModalFunc;
|
46
|
+
static confirm(props: KgConfirmModalProps): ModalFunc;
|
50
47
|
/**
|
51
48
|
* 如果不是表单验证错误, 则抛出该错误.
|
52
49
|
* @param e 错误对象.
|
@@ -56,7 +53,7 @@ export declare class KgUtil {
|
|
56
53
|
* 将 JSON 字符串转换为 JSON 对象, 如果转化失败, 则返回空对象.
|
57
54
|
* @param str JSON 字符串.
|
58
55
|
*/
|
59
|
-
static tryParseJSON(str?: string | null):
|
56
|
+
static tryParseJSON<T = Record<string, any>>(str?: string | null): T;
|
60
57
|
/**
|
61
58
|
* 将值转换为 Dayjs 对象.
|
62
59
|
* @param value 值.
|
@@ -73,3 +70,7 @@ export declare type ModalFunc = {
|
|
73
70
|
showLoading(): void;
|
74
71
|
hideLoading(): void;
|
75
72
|
};
|
73
|
+
export declare type KgConfirmModalProps = ModalFuncProps & {
|
74
|
+
/** 是否隐藏取消按钮. */
|
75
|
+
hideCancelButton?: boolean;
|
76
|
+
};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { Menu } from '../consts';
|
1
2
|
export declare class KgRouteUtil {
|
2
3
|
/**
|
3
4
|
* 给所有模块都添加在线表单的路由.
|
@@ -5,4 +6,10 @@ export declare class KgRouteUtil {
|
|
5
6
|
* @param routes 当前路由列表.
|
6
7
|
*/
|
7
8
|
static addOnlineRoutesForAllApps(routes: any[]): any[];
|
9
|
+
/**
|
10
|
+
* 根据地址获取菜单.
|
11
|
+
* @param menus 菜单列表.
|
12
|
+
* @param path 菜单地址.
|
13
|
+
*/
|
14
|
+
static getMenuByPath(menus: Array<Menu>, path: string): Menu | null;
|
8
15
|
}
|