@kengic/vue 0.10.7-beta.0 → 0.10.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +2184 -2083
- package/dist/src/src/components/KgSearch/index.hooks.d.ts +7 -7
- package/dist/src/src/components/KgSearch/index.store.d.ts +21 -17
- package/dist/src/src/components/KgTable/components/setting/KgTable.Setting.hooks.d.ts +1 -1
- package/dist/src/src/components/KgTable/index.hooks.d.ts +9 -1
- package/dist/src/src/components/KgTable/index.store.d.ts +24 -4
- package/dist/src/src/components/KgTable/index.vm.d.ts +2 -0
- package/dist/src/src/config/index.store.d.ts +16 -2
- package/dist/src/src/consts/i18n/en.d.ts +4 -0
- package/dist/src/src/consts/i18n/zh_CN.d.ts +4 -0
- package/package.json +1 -1
@@ -5,7 +5,7 @@ export declare type IUseKgSearch = {
|
|
5
5
|
formID: string;
|
6
6
|
/** 状态数据. */
|
7
7
|
store: IKgSearchStore;
|
8
|
-
/**
|
8
|
+
/** 是否就绪: 查询字段初始完成, 组件渲染完成. */
|
9
9
|
isReady: ComputedRef<ReturnType<IKgSearchStore['getIsReady']>>;
|
10
10
|
/** 表单数据对象. */
|
11
11
|
model: ComputedRef<ReturnType<IKgSearchStore['getModel']>>;
|
@@ -18,6 +18,12 @@ export declare type IUseKgSearch = {
|
|
18
18
|
search(resetPageIndex?: boolean): void;
|
19
19
|
/** 执行重置. */
|
20
20
|
reset(): void;
|
21
|
+
/**
|
22
|
+
* 监听事件: ready, 查询字段初始完成, 组件渲染完成.
|
23
|
+
* @param cb 回调函数.
|
24
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
25
|
+
* */
|
26
|
+
onReady(cb: IKgSearchReadyCb, once?: boolean): IRemoveEventListenerHandler;
|
21
27
|
/**
|
22
28
|
* 监听事件: search, 点击查询按钮, 并且表单验证通过.
|
23
29
|
* @param cb 回调函数.
|
@@ -30,12 +36,6 @@ export declare type IUseKgSearch = {
|
|
30
36
|
* @param once 是否只会触发一次. 默认为 undefined.
|
31
37
|
*/
|
32
38
|
onReset(cb: IKgSearchResetCb, once?: boolean): IRemoveEventListenerHandler;
|
33
|
-
/**
|
34
|
-
* 监听事件: ready, 查询字段初始完成, 查询组件渲染完成.
|
35
|
-
* @param cb 回调函数.
|
36
|
-
* @param once 是否只会触发一次. 默认为 undefined.
|
37
|
-
* */
|
38
|
-
onReady(cb: IKgSearchReadyCb, once?: boolean): IRemoveEventListenerHandler;
|
39
39
|
};
|
40
40
|
/**
|
41
41
|
* @param formID 界面标识.
|
@@ -2,11 +2,13 @@ import { StoreDefinition } from 'pinia';
|
|
2
2
|
import { IKgEventCb } from '../../consts';
|
3
3
|
/**
|
4
4
|
* 事件类型.
|
5
|
+
* 'ready': 就绪, 查询字段初始完成, 组件渲染完成
|
5
6
|
* 'search': 点击查询按钮, 并且表单验证通过
|
6
7
|
* 'reset': 点击重置按钮
|
7
|
-
* 'ready': 查询字段初始完成, 查询组件渲染完成
|
8
8
|
*/
|
9
|
-
export declare type IKgSearchEvent = '
|
9
|
+
export declare type IKgSearchEvent = 'ready' | 'search' | 'reset';
|
10
|
+
/** 事件监听函数: ready. */
|
11
|
+
export declare type IKgSearchReadyCb = ((param: any) => Promise<boolean>) & IKgEventCb;
|
10
12
|
/** 事件监听函数: search. */
|
11
13
|
export declare type IKgSearchSearchCbParam = {
|
12
14
|
/** 是否从第一页开始查询. */
|
@@ -15,27 +17,25 @@ export declare type IKgSearchSearchCbParam = {
|
|
15
17
|
export declare type IKgSearchSearchCb = ((param: IKgSearchSearchCbParam) => Promise<boolean>) & IKgEventCb;
|
16
18
|
/** 事件监听函数: reset. */
|
17
19
|
export declare type IKgSearchResetCb = ((param: any) => Promise<boolean>) & IKgEventCb;
|
18
|
-
/** 事件监听函数: ready. */
|
19
|
-
export declare type IKgSearchReadyCb = ((param: any) => Promise<boolean>) & IKgEventCb;
|
20
20
|
export declare type IKgSearchCbParam = IKgSearchSearchCbParam;
|
21
|
-
export declare type IKgSearchCb =
|
21
|
+
export declare type IKgSearchCb = IKgSearchReadyCb | IKgSearchSearchCb | IKgSearchResetCb;
|
22
22
|
/** 查询方法. */
|
23
23
|
export declare type IKgSearchSearchFn = (resetPageIndex?: boolean) => void;
|
24
24
|
/** 重置方法. */
|
25
25
|
export declare type IKgSearchResetFn = () => void;
|
26
26
|
export interface IKgSearchState {
|
27
|
-
/**
|
27
|
+
/** 是否就绪: 查询字段初始完成, 组件渲染完成. */
|
28
28
|
isReadyMap: Map<string, boolean>;
|
29
29
|
/** 表单数据对象. */
|
30
30
|
modelMap: Map<string, Record<string, any>>;
|
31
31
|
/** 高级查询的操作符表单数据对象. */
|
32
32
|
operatorModelMap: Map<string, Record<string, string>>;
|
33
|
+
/** 事件监听函数列表: ready. */
|
34
|
+
onReadyListenersMap: Map<string, Array<IKgSearchReadyCb>>;
|
33
35
|
/** 事件监听函数列表: search. */
|
34
36
|
onSearchListenersMap: Map<string, Array<IKgSearchSearchCb>>;
|
35
37
|
/** 事件监听函数列表: reset. */
|
36
38
|
onResetListenersMap: Map<string, Array<IKgSearchResetCb>>;
|
37
|
-
/** 事件监听函数列表: ready. */
|
38
|
-
onReadyListenersMap: Map<string, Array<IKgSearchReadyCb>>;
|
39
39
|
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
40
40
|
searchFnMap: Map<string, IKgSearchSearchFn>;
|
41
41
|
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
@@ -43,13 +43,17 @@ export interface IKgSearchState {
|
|
43
43
|
}
|
44
44
|
export declare type IKgSearchStoreDefinition = StoreDefinition<'KgSearch', IKgSearchState, {
|
45
45
|
/** 是否就绪. */
|
46
|
-
getIsReady(): (formID
|
47
|
-
getModel(): (formID
|
48
|
-
getOperatorModel(): (formID
|
49
|
-
getSearchFn(): (formID
|
50
|
-
getResetFn(): (formID
|
46
|
+
getIsReady(): (formID: string | null | undefined) => boolean;
|
47
|
+
getModel(): (formID: string | null | undefined) => Record<string, any> | null;
|
48
|
+
getOperatorModel(): (formID: string | null | undefined) => Record<string, string> | null;
|
49
|
+
getSearchFn(): (formID: string | null | undefined) => IKgSearchSearchFn | null;
|
50
|
+
getResetFn(): (formID: string | null | undefined) => IKgSearchResetFn | null;
|
51
51
|
}, {
|
52
|
-
|
52
|
+
/**
|
53
|
+
* 清理数据.
|
54
|
+
* @param formID 页面标识.
|
55
|
+
*/
|
56
|
+
dispose(formID: string | null | undefined): void;
|
53
57
|
addEventListener(formID: string, event: IKgSearchEvent, cb: IKgSearchCb): void;
|
54
58
|
removeEventListener(formID: string, event: IKgSearchEvent, cb?: IKgSearchCb): void;
|
55
59
|
/**
|
@@ -64,7 +68,7 @@ export declare type IKgSearchStoreDefinition = StoreDefinition<'KgSearch', IKgSe
|
|
64
68
|
* @param formID 界面标识.
|
65
69
|
* @param ready 是否就绪.
|
66
70
|
*/
|
67
|
-
setIsReady(formID
|
71
|
+
setIsReady(formID: string | null | undefined, ready?: boolean): void;
|
68
72
|
setModel(formID: string, model: Record<string, any>): void;
|
69
73
|
setOperatorModel(formID: string, model: Record<string, string>): void;
|
70
74
|
/**
|
@@ -79,8 +83,8 @@ export declare type IKgSearchStoreDefinition = StoreDefinition<'KgSearch', IKgSe
|
|
79
83
|
* @param model 要修改的查询字段.
|
80
84
|
*/
|
81
85
|
patchOperatorModel(formID: string, model: Record<string, string>): Promise<void>;
|
82
|
-
setSearchFn(formID
|
83
|
-
setResetFn(formID
|
86
|
+
setSearchFn(formID: string | null | undefined, fn?: IKgSearchSearchFn | null): void;
|
87
|
+
setResetFn(formID: string | null | undefined, fn?: IKgSearchResetFn | null): void;
|
84
88
|
}>;
|
85
89
|
export declare type IKgSearchStore = ReturnType<IKgSearchStoreDefinition>;
|
86
90
|
export declare const useKgSearchStore: () => IKgSearchStoreDefinition;
|
@@ -11,4 +11,4 @@ export declare type IUseServices = {
|
|
11
11
|
};
|
12
12
|
export declare function _useServices(): IUseServices;
|
13
13
|
/** 监控表格列的下拉列表的尺寸变化, 从而调整位置, 防止遮盖. */
|
14
|
-
export declare function
|
14
|
+
export declare function _useObserveMenuColumns(isMenuItemColumnsVisible: Ref<boolean>): void;
|
@@ -1,10 +1,12 @@
|
|
1
1
|
import { ComputedRef, Ref } from 'vue';
|
2
2
|
import { IRemoveEventListenerHandler } from '../../consts';
|
3
|
-
import { IKgTableBeforeRetrieveCb, IKgTableBeforeSetDatasCb, IKgTableRetrieveCb, IKgTableRowDoubleClickCb, IKgTableStore } from './index.store';
|
3
|
+
import { IKgTableBeforeRetrieveCb, IKgTableBeforeSetDatasCb, IKgTableReadyCb, IKgTableRetrieveCb, IKgTableRowDoubleClickCb, IKgTableStore } from './index.store';
|
4
4
|
export declare type IUseKgTable = {
|
5
5
|
formID: string;
|
6
6
|
/** 状态数据. */
|
7
7
|
store: IKgTableStore;
|
8
|
+
/** 是否就绪: 配置初始完成, 组件渲染完成. */
|
9
|
+
isReady: ComputedRef<ReturnType<IKgTableStore['getIsReady']>>;
|
8
10
|
/** 是否正在查询. */
|
9
11
|
isRetrieving: ComputedRef<ReturnType<IKgTableStore['getIsRetrieving']>>;
|
10
12
|
/** 当前勾选的第一行. */
|
@@ -29,6 +31,12 @@ export declare type IUseKgTable = {
|
|
29
31
|
pageSizeOption: Ref<number>;
|
30
32
|
/** 查询条件的界面标识. */
|
31
33
|
profileFormID: Ref<string>;
|
34
|
+
/**
|
35
|
+
* 监听事件: ready, 配置初始完成, 组件渲染完成.
|
36
|
+
* @param cb 回调函数.
|
37
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
38
|
+
* */
|
39
|
+
onReady(cb: IKgTableReadyCb, once?: boolean): IRemoveEventListenerHandler;
|
32
40
|
/**
|
33
41
|
* 监听事件: 双击某行.
|
34
42
|
* @param cb 回调函数.
|
@@ -3,15 +3,19 @@ import { StoreDefinition } from 'pinia';
|
|
3
3
|
import { Ref } from 'vue';
|
4
4
|
import { IPage } from '../../apis/WMS/models';
|
5
5
|
import { IKgEventCb } from '../../consts';
|
6
|
-
import { IKgTableRow } from './index.vm';
|
6
|
+
import { IKgTableRow, IKgTableRowHeight } from './index.vm';
|
7
7
|
/**
|
8
8
|
* 事件类型.
|
9
|
+
* 'ready': 就绪, 配置初始完成, 组件渲染完成
|
9
10
|
* 'rowDoubleClick': 双击某行.
|
10
11
|
* 'beforeRetrieve': 即将发起查询请求.
|
11
12
|
* 'beforeSetDatas': 查询请求成功, 表格数据尚未赋值. 此处可以对返回的列表数据作处理.
|
12
13
|
* 'retrieve': 查询请求成功, 表格数据已经赋值.
|
13
14
|
*/
|
14
|
-
export declare type IKgTableEvent = 'rowDoubleClick' | 'beforeRetrieve' | 'beforeSetDatas' | 'retrieve';
|
15
|
+
export declare type IKgTableEvent = 'ready' | 'rowDoubleClick' | 'beforeRetrieve' | 'beforeSetDatas' | 'retrieve';
|
16
|
+
/** 事件监听函数: ready. */
|
17
|
+
export declare type IKgTableReadyParam = {};
|
18
|
+
export declare type IKgTableReadyCb = ((param: IKgTableReadyParam) => Promise<boolean>) & IKgEventCb;
|
15
19
|
/** 事件监听函数: rowDoubleClick. */
|
16
20
|
export declare type IKgTableRowDoubleClickParam = {
|
17
21
|
/** 双击的行. */
|
@@ -46,9 +50,11 @@ export declare type IKgTableRetrieveCbParam = {
|
|
46
50
|
setDatas(datas: Array<IKgTableRow>): void;
|
47
51
|
};
|
48
52
|
export declare type IKgTableRetrieveCb = ((param: IKgTableRetrieveCbParam) => Promise<boolean>) & IKgEventCb;
|
49
|
-
export declare type IKgTableCbParam = IKgTableRowDoubleClickParam | IKgTableBeforeRetrieveCbParam | IKgTableBeforeSetDatasCbParam | IKgTableRetrieveCbParam;
|
50
|
-
export declare type IKgTableCb = IKgTableRowDoubleClickCb | IKgTableBeforeRetrieveCb | IKgTableBeforeSetDatasCb | IKgTableRetrieveCb;
|
53
|
+
export declare type IKgTableCbParam = IKgTableReadyParam | IKgTableRowDoubleClickParam | IKgTableBeforeRetrieveCbParam | IKgTableBeforeSetDatasCbParam | IKgTableRetrieveCbParam;
|
54
|
+
export declare type IKgTableCb = IKgTableReadyCb | IKgTableRowDoubleClickCb | IKgTableBeforeRetrieveCb | IKgTableBeforeSetDatasCb | IKgTableRetrieveCb;
|
51
55
|
export interface IKgTableState {
|
56
|
+
/** 是否就绪: 配置初始完成, 组件渲染完成. */
|
57
|
+
isReadyMap: Map<string, boolean>;
|
52
58
|
/** 列表数据. */
|
53
59
|
datasMap: Map<String, Array<IKgTableRow>>;
|
54
60
|
/** 勾选的行的主键. */
|
@@ -65,6 +71,10 @@ export interface IKgTableState {
|
|
65
71
|
isRetrievingMap: Map<string, boolean>;
|
66
72
|
/** 表格宽度. */
|
67
73
|
tableWidthMap: Map<string, number>;
|
74
|
+
/** 行高. */
|
75
|
+
rowHeightMap: Map<string, IKgTableRowHeight>;
|
76
|
+
/** 事件监听函数列表: ready. */
|
77
|
+
onReadyListenersMap: Map<string, Array<IKgTableReadyCb>>;
|
68
78
|
/** '双击某行'事件监听函数列表. */
|
69
79
|
rowDoubleClickListenersMap: Map<string, Array<IKgTableRowDoubleClickCb>>;
|
70
80
|
beforeRetrieveListenersMap: Map<string, Array<IKgTableBeforeRetrieveCb>>;
|
@@ -72,6 +82,8 @@ export interface IKgTableState {
|
|
72
82
|
retrieveListenersMap: Map<string, Array<IKgTableRetrieveCb>>;
|
73
83
|
}
|
74
84
|
export declare type IKgTableStoreDefinition = StoreDefinition<'KgTable', IKgTableState, {
|
85
|
+
/** 是否就绪. */
|
86
|
+
getIsReady(): (formID: string | null | undefined) => boolean;
|
75
87
|
/** 列表数据. */
|
76
88
|
getDatas(): (formID: string | null | undefined) => Array<IKgTableRow>;
|
77
89
|
/** 当前勾选的所有行的主键. */
|
@@ -85,6 +97,7 @@ export declare type IKgTableStoreDefinition = StoreDefinition<'KgTable', IKgTabl
|
|
85
97
|
getIsRetrieved(): (formID: string | null | undefined) => boolean | null;
|
86
98
|
getIsRetrieving(): (formID: string | null | undefined) => boolean | null;
|
87
99
|
getTableWidth(): (formID: string | null | undefined) => number | null;
|
100
|
+
getRowHeight(): (formID: string | null | undefined) => IKgTableRowHeight;
|
88
101
|
}, {
|
89
102
|
/**
|
90
103
|
* 清理数据.
|
@@ -94,6 +107,12 @@ export declare type IKgTableStoreDefinition = StoreDefinition<'KgTable', IKgTabl
|
|
94
107
|
addEventListener(formID: string | null | undefined, event: IKgTableEvent, cb: IKgTableCb): void;
|
95
108
|
removeEventListener(formID: string | null | undefined, event: IKgTableEvent, cb?: IKgTableCb): void;
|
96
109
|
emit(formID: string | null | undefined, event: IKgTableEvent, param: IKgTableCbParam): Promise<boolean>;
|
110
|
+
/**
|
111
|
+
* 设置是否就绪.
|
112
|
+
* @param formID 界面标识.
|
113
|
+
* @param ready 是否就绪.
|
114
|
+
*/
|
115
|
+
setIsReady(formID: string | null | undefined, ready?: boolean): void;
|
97
116
|
/**
|
98
117
|
* 设置列表数据.
|
99
118
|
* @param formID 界面标识.
|
@@ -121,6 +140,7 @@ export declare type IKgTableStoreDefinition = StoreDefinition<'KgTable', IKgTabl
|
|
121
140
|
setIsRetrieved(formID: string | null | undefined, value: boolean): void;
|
122
141
|
setIsRetrieving(formID: string | null | undefined, value: boolean): void;
|
123
142
|
setTableWidth(formID: string | null | undefined, value: number): void;
|
143
|
+
setRowHeight(formID: string | null | undefined, value: IKgTableRowHeight): void;
|
124
144
|
/**
|
125
145
|
* 清空表格数据.
|
126
146
|
* @param formID 界面标识.
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import { ColumnType } from 'ant-design-vue/es/table/interface';
|
2
2
|
import { VarGridDetail } from '../../apis/WMS/models';
|
3
3
|
export declare const FORM_ID__KG_TABLE__VAR_GRID_MASTER = "kg-table.VarGridMaster";
|
4
|
+
/** 行高. */
|
5
|
+
export declare type IKgTableRowHeight = 'L' | 'M' | 'H';
|
4
6
|
/** 表格的行对象. */
|
5
7
|
export declare type IKgTableRow<T = {}> = {
|
6
8
|
id?: string | null;
|
@@ -14,11 +14,25 @@ export declare type IKgStateOption = {
|
|
14
14
|
/** 默认为 '/sys/index'. */
|
15
15
|
[KG_APP.SYS]?: string;
|
16
16
|
};
|
17
|
+
KgTable?: {
|
18
|
+
Setting?: {
|
19
|
+
rowHeight?: {
|
20
|
+
/**
|
21
|
+
* 是否启用功能.
|
22
|
+
* @default false
|
23
|
+
*/
|
24
|
+
on?: boolean;
|
25
|
+
};
|
26
|
+
};
|
27
|
+
};
|
17
28
|
/** 仓库选择. */
|
18
29
|
KgWarehouse?: {
|
19
|
-
/**
|
30
|
+
/**
|
31
|
+
* 是否启用功能.
|
32
|
+
* @default true
|
33
|
+
*/
|
20
34
|
enable?: boolean;
|
21
|
-
/** 默认的仓库编码, 只有在 IKgStateOption.KgWarehouse.enable 为 false 时才生效. */
|
35
|
+
/** 默认的仓库编码, 只有在 {@link IKgStateOption.KgWarehouse.enable} 为 false 时才生效. */
|
22
36
|
defaultWarehouseID?: string;
|
23
37
|
};
|
24
38
|
};
|
@@ -53,6 +53,10 @@ declare const _default: {
|
|
53
53
|
column: string;
|
54
54
|
config: string;
|
55
55
|
emptyText: string;
|
56
|
+
rowHeight: string;
|
57
|
+
rowHeightH: string;
|
58
|
+
rowHeightL: string;
|
59
|
+
rowHeightM: string;
|
56
60
|
'save-var-grid-master-as-success-message': string;
|
57
61
|
saveVarGridMaster: string;
|
58
62
|
saveVarGridMasterAs: string;
|
@@ -53,6 +53,10 @@ declare const _default: {
|
|
53
53
|
column: string;
|
54
54
|
config: string;
|
55
55
|
emptyText: string;
|
56
|
+
rowHeight: string;
|
57
|
+
rowHeightH: string;
|
58
|
+
rowHeightL: string;
|
59
|
+
rowHeightM: string;
|
56
60
|
'save-var-grid-master-as-success-message': string;
|
57
61
|
saveVarGridMaster: string;
|
58
62
|
saveVarGridMasterAs: string;
|