@kengic/vue 0.19.0 → 0.19.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +10 -2
- package/dist/kengic-vue.js +1538 -1524
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.d.ts +0 -2
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.hooks.d.ts +3 -3
- package/dist/src/components/KgSearch/index.hooks.d.ts +2 -2
- package/dist/src/components/KgSearch/index.store.d.ts +4 -4
- package/dist/src/components/KgTable/index.hooks.d.ts +14 -9
- package/dist/src/components/KgTable/index.store.d.ts +272 -129
- package/dist/src/components/KgTable/index.vm.d.ts +1 -1
- package/dist/src/components/KgVar/index.store.d.ts +4 -4
- package/dist/src/components/KgWarehouse/KgWarehouse.d.ts +6 -6
- package/dist/src/consts/index.vm.d.ts +2 -2
- package/dist/src/utils/kg-var.util.d.ts +1 -1
- package/package.json +1 -1
@@ -41,7 +41,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
41
41
|
onKgSubmit: import("vue").PropType<() => void>;
|
42
42
|
onKgChange: import("vue").PropType<(value: any) => void>;
|
43
43
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
44
|
-
/** 初始. */
|
45
44
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
46
45
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgChange" | "kgSelectChange" | "update:value" | "kgSelectDatasChange")[], "kgSubmit" | "kgChange" | "kgSelectChange" | "update:value" | "kgSelectDatasChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
47
46
|
kgVarName: {
|
@@ -84,7 +83,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
84
83
|
onKgSubmit: import("vue").PropType<() => void>;
|
85
84
|
onKgChange: import("vue").PropType<(value: any) => void>;
|
86
85
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
87
|
-
/** 初始. */
|
88
86
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
89
87
|
}>> & {
|
90
88
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
@@ -8,11 +8,11 @@ export declare type IUseKgFormItemSelect = {
|
|
8
8
|
/** 作为显示的列. */
|
9
9
|
lbl_clm: ComputedRef<string>;
|
10
10
|
/** 查询参数. */
|
11
|
-
|
11
|
+
requestParams: ComputedRef<Record<string, any>>;
|
12
12
|
/** 列表数据. */
|
13
13
|
datas: Ref<Array<Record<string, any>>>;
|
14
14
|
/** 是否正在查询列表数据. */
|
15
|
-
|
15
|
+
isDatasRequesting: Ref<boolean>;
|
16
16
|
/**
|
17
17
|
* 处理列表数据.
|
18
18
|
* @param datas 原始列表数据.
|
@@ -22,6 +22,6 @@ export declare type IUseKgFormItemSelect = {
|
|
22
22
|
/**
|
23
23
|
* 查询列表数据.
|
24
24
|
*/
|
25
|
-
|
25
|
+
requestDatas(): Promise<void>;
|
26
26
|
};
|
27
27
|
export declare function useKgFormItemSelect(): IUseKgFormItemSelect;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ComputedRef, Ref } from 'vue';
|
2
2
|
import { IRemoveEventListenerHandler } from '../../consts';
|
3
|
-
import {
|
3
|
+
import { IKgTableRequestParams } from '../KgTable';
|
4
4
|
import { IKgSearchReadyCb, IKgSearchResetCb, IKgSearchSearchCb, IKgSearchStore } from './index.store';
|
5
5
|
export declare type IUseKgSearch = {
|
6
6
|
formID: string;
|
@@ -13,7 +13,7 @@ export declare type IUseKgSearch = {
|
|
13
13
|
/** 高级查询的操作符表单数据对象. */
|
14
14
|
operatorModel: ComputedRef<ReturnType<IKgSearchStore['getOperatorModel']>>;
|
15
15
|
/** 查询. */
|
16
|
-
search(param?: boolean |
|
16
|
+
search(param?: boolean | IKgTableRequestParams): void;
|
17
17
|
/** 重置. */
|
18
18
|
reset(): void;
|
19
19
|
/**
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { StoreDefinition } from 'pinia';
|
2
2
|
import { IKgEventCb } from '../../consts';
|
3
|
-
import {
|
3
|
+
import { IKgTableRequestParams } from '../KgTable';
|
4
4
|
/**
|
5
5
|
* 事件类型.
|
6
6
|
* 'ready': 就绪, 查询字段初始完成, 组件渲染完成
|
@@ -10,13 +10,13 @@ import { IKgTableSearchParams } from '../KgTable';
|
|
10
10
|
export declare type IKgSearchEvent = 'ready' | 'search' | 'reset';
|
11
11
|
/** 事件监听函数: ready. */
|
12
12
|
export declare type IKgSearchReadyCb = ((param: any) => Promise<boolean>) & IKgEventCb;
|
13
|
-
export declare type IKgSearchSearchCb = ((param:
|
13
|
+
export declare type IKgSearchSearchCb = ((param: IKgTableRequestParams) => Promise<boolean>) & IKgEventCb;
|
14
14
|
/** 事件监听函数: reset. */
|
15
15
|
export declare type IKgSearchResetCb = ((param: any) => Promise<boolean>) & IKgEventCb;
|
16
|
-
export declare type IKgSearchCbParam =
|
16
|
+
export declare type IKgSearchCbParam = IKgTableRequestParams;
|
17
17
|
export declare type IKgSearchCb = IKgSearchReadyCb | IKgSearchSearchCb | IKgSearchResetCb;
|
18
18
|
/** 查询方法. */
|
19
|
-
export declare type IKgSearchSearchFn = (param?:
|
19
|
+
export declare type IKgSearchSearchFn = (param?: IKgTableRequestParams) => void;
|
20
20
|
/** 重置方法. */
|
21
21
|
export declare type IKgSearchResetFn = () => void;
|
22
22
|
export interface IKgSearchState {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ComputedRef, Ref } from 'vue';
|
2
2
|
import { IRemoveEventListenerHandler } from '../../consts';
|
3
|
-
import {
|
3
|
+
import { IKgTableAfterRequestCb, IKgTableBeforeRequestCb, IKgTableBeforeSetDatasCb, IKgTableReadyCb, IKgTableRowDoubleClickCb, useKgTableStore } from './index.store';
|
4
4
|
export declare type IUseKgTable = {
|
5
5
|
formID: string;
|
6
6
|
/** 状态数据. */
|
@@ -8,7 +8,14 @@ export declare type IUseKgTable = {
|
|
8
8
|
/** 是否就绪: 配置初始完成, 组件渲染完成. */
|
9
9
|
isReady: ComputedRef<ReturnType<ReturnType<typeof useKgTableStore>['getIsReady']>>;
|
10
10
|
/** 是否正在查询. */
|
11
|
-
isRetrieving: ComputedRef<ReturnType<ReturnType<typeof useKgTableStore>['
|
11
|
+
isRetrieving: ComputedRef<ReturnType<ReturnType<typeof useKgTableStore>['getIsRequesting']>>;
|
12
|
+
/** 是否已经查询过一次了. */
|
13
|
+
isSearched: Ref<boolean>;
|
14
|
+
/**
|
15
|
+
* <p>查询参数.</p>
|
16
|
+
* <p>此查询参数是最终传给后端接口的参数, 包含了查询条件, 还包含了表格中的排序和分页, 还包含了表格配置中的参数.</p>
|
17
|
+
*/
|
18
|
+
requestParams: Ref<ReturnType<ReturnType<typeof useKgTableStore>['getRequestParams']>>;
|
12
19
|
/** 当前勾选的第一行. */
|
13
20
|
selectedFirstRow: ComputedRef<ReturnType<ReturnType<typeof useKgTableStore>['getSelectedFirstRow']>>;
|
14
21
|
/** 当前勾选的唯一行, 如果勾选了多行或者零行, 则为 null. */
|
@@ -19,8 +26,6 @@ export declare type IUseKgTable = {
|
|
19
26
|
isMultiSelect: Ref<boolean>;
|
20
27
|
/** 是否自动查询. */
|
21
28
|
isAutoSearch: Ref<boolean>;
|
22
|
-
/** 是否已经查询过一次了. */
|
23
|
-
isSearched: Ref<boolean>;
|
24
29
|
/** 是否显示底部左侧. */
|
25
30
|
isShowBottomLeft: Ref<boolean>;
|
26
31
|
/** 是否显示底部右侧. */
|
@@ -32,7 +37,7 @@ export declare type IUseKgTable = {
|
|
32
37
|
/** 当前分页选项. */
|
33
38
|
pageSizeOption: Ref<number>;
|
34
39
|
/** 查询条件的界面标识. */
|
35
|
-
|
40
|
+
kgSearchFormID: Ref<string>;
|
36
41
|
/**
|
37
42
|
* 事件: ready, 配置初始完成, 组件渲染完成.
|
38
43
|
* @param cb 回调函数.
|
@@ -50,7 +55,7 @@ export declare type IUseKgTable = {
|
|
50
55
|
* @param cb 回调函数.
|
51
56
|
* @param once 是否只会触发一次. 默认为 undefined.
|
52
57
|
*/
|
53
|
-
onBeforeSearch(cb:
|
58
|
+
onBeforeSearch(cb: IKgTableBeforeRequestCb, once?: boolean): IRemoveEventListenerHandler;
|
54
59
|
/**
|
55
60
|
* 事件: 查询请求成功, 表格数据尚未赋值. 此处可以对查询接口返回的列表数据作处理.
|
56
61
|
* @param cb 回调函数.
|
@@ -62,21 +67,21 @@ export declare type IUseKgTable = {
|
|
62
67
|
* @param cb 回调函数.
|
63
68
|
* @param once 是否只会触发一次. 默认为 undefined.
|
64
69
|
*/
|
65
|
-
onAfterSearch(cb:
|
70
|
+
onAfterSearch(cb: IKgTableAfterRequestCb, once?: boolean): IRemoveEventListenerHandler;
|
66
71
|
/**
|
67
72
|
* 事件: 即将发起查询请求, 如果返回 true 表示不会发起请求.
|
68
73
|
* @param cb 回调函数.
|
69
74
|
* @param once 是否只会触发一次. 默认为 undefined.
|
70
75
|
* @deprecated 已废弃, 请使用 onBeforeSearch() 方法.
|
71
76
|
*/
|
72
|
-
onBeforeRetrieve(cb:
|
77
|
+
onBeforeRetrieve(cb: IKgTableBeforeRequestCb, once?: boolean): IRemoveEventListenerHandler;
|
73
78
|
/**
|
74
79
|
* 事件: 查询请求成功, 表格数据已经赋值, 表格状态已经更新.
|
75
80
|
* @param cb 回调函数.
|
76
81
|
* @param once 是否只会触发一次. 默认为 undefined.
|
77
82
|
* @deprecated 已废弃, 请使用 onAfterSearch() 方法.
|
78
83
|
*/
|
79
|
-
onRetrieve(cb:
|
84
|
+
onRetrieve(cb: IKgTableAfterRequestCb, once?: boolean): IRemoveEventListenerHandler;
|
80
85
|
};
|
81
86
|
/**
|
82
87
|
* @param formID 界面标识.
|