@kengic/vue 0.26.6-beta.137 → 0.26.6-beta.138

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/dist/kengic-vue.js +16695 -16716
  2. package/dist/src/component/KgAppSelect/index.event.d.ts +17 -0
  3. package/dist/src/component/KgAppSelect/index.hooks.d.ts +2 -1
  4. package/dist/src/component/KgAppSelect/index.store.d.ts +1 -17
  5. package/dist/src/component/KgButton/index.event.d.ts +27 -0
  6. package/dist/src/component/KgButton/index.hooks.d.ts +7 -6
  7. package/dist/src/component/KgButton/index.store.d.ts +5 -30
  8. package/dist/src/component/KgForm/index.event.d.ts +191 -0
  9. package/dist/src/component/KgForm/index.hooks.d.ts +9 -8
  10. package/dist/src/component/KgForm/index.store.d.ts +9 -199
  11. package/dist/src/component/KgForm.Item/components/KgForm.Item.Checkbox.d.ts +3 -1
  12. package/dist/src/component/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +3 -1
  13. package/dist/src/component/KgForm.Item/components/KgForm.Item.Date.d.ts +1 -1
  14. package/dist/src/component/KgForm.Item/components/KgForm.Item.DateRange.d.ts +1 -1
  15. package/dist/src/component/KgForm.Item/components/KgForm.Item.Input.d.ts +1 -1
  16. package/dist/src/component/KgForm.Item/components/KgForm.Item.InputNumber.d.ts +1 -1
  17. package/dist/src/component/KgForm.Item/components/KgForm.Item.InputPassword.d.ts +1 -1
  18. package/dist/src/component/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +7 -5
  19. package/dist/src/component/KgForm.Item/components/KgForm.Item.Select.d.ts +1 -3
  20. package/dist/src/component/KgForm.Item/components/KgForm.Item.Switch.d.ts +1 -1
  21. package/dist/src/component/KgForm.Item/components/KgForm.Item.TextArea.d.ts +1 -1
  22. package/dist/src/component/KgSearch/index.event.d.ts +17 -0
  23. package/dist/src/component/KgSearch/index.hooks.d.ts +5 -4
  24. package/dist/src/component/KgSearch/index.store.d.ts +12 -27
  25. package/dist/src/component/KgSubmit/index.event.d.ts +105 -0
  26. package/dist/src/component/KgSubmit/index.hooks.d.ts +9 -8
  27. package/dist/src/component/KgSubmit/index.store.d.ts +11 -114
  28. package/dist/src/component/KgTable/KgTable.service.d.ts +2 -2
  29. package/dist/src/component/KgTable/index.event.d.ts +57 -0
  30. package/dist/src/component/KgTable/index.hooks.d.ts +13 -12
  31. package/dist/src/component/KgTable/index.store.d.ts +8 -61
  32. package/dist/src/component/KgVar/index.vm.d.ts +8 -2
  33. package/dist/src/component/KgWarehouse/index.hooks.d.ts +2 -2
  34. package/dist/src/component/KgWarehouse/index.store.d.ts +5 -5
  35. package/package.json +1 -1
@@ -1,120 +1,17 @@
1
- import { IKgEventListener } from '@kengic/core.core';
2
1
  import { RuleObject } from 'ant-design-vue/es/form';
3
2
  import { FormInstance } from 'ant-design-vue/lib/form/Form';
4
3
  import { StoreDefinition } from 'pinia';
5
4
  import { Ref } from 'vue';
6
5
  import { VarProfileDetail, VarSubmitConfig, VarSubmitDetail } from '../../api/WMS/models';
7
6
  import { KG__VAR_BUTTON__TYPE } from '../../const';
8
- import { KgAny } from '../../type';
9
- import { IKgTableRow } from '../KgTable';
10
- /**
11
- * 事件类型.
12
- * 'beforeOpen': 打开提交弹窗之前
13
- * 'onOpen': 打开提交弹窗
14
- * 'beforeOk': 点击确认按钮之后, 执行默认逻辑之前
15
- * 'afterValidate': 点击确认按钮之后, 表单验证完成,
16
- * 'beforeRequest': 发起接口请求之前. 表单验证完成, 参数解析完成,
17
- * 'ok': 请求成功, 关闭提交弹窗之后
18
- * 'onBeforeCancel': 点击取消按钮, 或者点击右上角的关闭按钮, 尚未关闭弹窗,
19
- * 'onCancel': 点击取消按钮, 或者点击右上角的关闭按钮, 已经关闭弹窗,
20
- * 'error': 请求失败. 请求失败了, 或者请求返回了错误消息
21
- * 'close': 关闭提交弹窗
22
- */
23
- export declare type IKgSubmitEvent = 'beforeOpen' | 'onOpen' | 'beforeOk' | 'afterValidate' | 'beforeRequest' | 'ok' | 'onBeforeCancel' | 'onCancel' | 'error' | 'close';
24
- export declare type IKgSubmitBeforeOpenEventListenerParameter = {
25
- isCreating: boolean | null;
26
- isUpdating: boolean | null;
27
- isCopying: boolean | null;
28
- isDeleting: boolean | null;
29
- row: IKgTableRow | null;
30
- };
31
- export declare type IKgSubmitBeforeOpenEventListener = ((param: IKgSubmitBeforeOpenEventListenerParameter) => Promise<boolean>) & IKgEventListener;
32
- export declare type IKgSubmitOnOpenEventListenerParameter = {
33
- /** @deprecated 请直接使用 {@link IUseKgVar.isCreating} */
34
- isCreating: boolean | null;
35
- /** @deprecated 请直接使用 {@link IUseKgVar.isUpdating} */
36
- isUpdating: boolean | null;
37
- /** @deprecated 请直接使用 {@link IUseKgVar.isCopying} */
38
- isCopying: boolean | null;
39
- /** @deprecated 请直接使用 {@link IUseKgVar.isDeleting} */
40
- isDeleting: boolean | null;
41
- /** @deprecated 请直接使用 {@link IUseKgTable.selectedRow} */
42
- row: IKgTableRow | null;
43
- /** @deprecated 请直接使用 {@link IUseKgSearch.formModel} */
44
- model: Ref<Record<string, any>>;
45
- };
46
- export declare type IKgSubmitOnOpenEventListener = ((param: IKgSubmitOnOpenEventListenerParameter) => Promise<boolean>) & IKgEventListener;
47
- export declare type IKgSubmitBeforeOkEventListenerParameter = {
48
- /**
49
- * 表单数据对象.
50
- * @deprecated 已弃用, 请使用 {@link IUseKgSubmit.formModel}
51
- */
52
- model: Ref<Record<string, any>>;
53
- };
54
- export declare type IKgSubmitBeforeOkEventListener = ((param: IKgSubmitBeforeOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
55
- export declare type IKgSubmitAfterValidateEventListenerParameter = {
56
- isCopying: boolean | null;
57
- isCreating: boolean | null;
58
- isDeleting: boolean | null;
59
- isUpdating: boolean | null;
60
- model: Ref<Record<string, any>>;
61
- row: IKgTableRow | null;
62
- rows: Array<IKgTableRow> | null;
63
- };
64
- export declare type IKgSubmitAfterValidateEventListener = ((param: IKgSubmitAfterValidateEventListenerParameter) => Promise<boolean>) & IKgEventListener;
65
- export declare type IKgSubmitBeforeRequestEventListenerParameter = {
66
- /**
67
- * <p>请求参数. 是一个对象或者列表. 是对「表单数据对象」解析之后得到的请求参数, 如果需要修改某些参数, 则直接修改该对象的属性即可.</p>
68
- */
69
- data: Ref<KgAny>;
70
- /** @deprecated */
71
- isCopying: boolean | null;
72
- /** @deprecated */
73
- isCreating: boolean | null;
74
- /** @deprecated */
75
- isDeleting: boolean | null;
76
- /** @deprecated */
77
- isUpdating: boolean | null;
78
- /** @deprecated */
79
- model: Ref<Record<string, any>>;
80
- /**
81
- * 请求参数.
82
- */
83
- params: Ref<Record<string, any>>;
84
- /** @deprecated */
85
- row: IKgTableRow | null;
86
- /** @deprecated */
87
- rows: Array<IKgTableRow> | null;
88
- };
89
- export declare type IKgSubmitBeforeRequestEventListener = ((param: IKgSubmitBeforeRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
90
- export declare type IKgSubmitOkEventListenerParameter = {
91
- isCreating: boolean | null;
92
- isUpdating: boolean | null;
93
- isCopying: boolean | null;
94
- isDeleting: boolean | null;
95
- row: IKgTableRow | null;
96
- model: Ref<Record<string, any>>;
97
- /** 接口返回结果. */
98
- result: any | null;
99
- };
100
- export declare type IKgSubmitOkEventListener = ((param: IKgSubmitOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
101
- export declare type IKgSubmitOnBeforeCancelEventListenerParameter = {};
102
- export declare type IKgSubmitOnBeforeCancelEventListener = ((param: IKgSubmitOnBeforeCancelEventListenerParameter) => Promise<boolean>) & IKgEventListener;
103
- export declare type IKgSubmitOnCancelEventListenerParameter = {};
104
- export declare type IKgSubmitOnCancelEventListener = ((param: IKgSubmitOnCancelEventListenerParameter) => Promise<boolean>) & IKgEventListener;
105
- export declare type IKgSubmitErrorEventListenerParameter = {};
106
- export declare type IKgSubmitErrorEventListener = ((param: IKgSubmitErrorEventListenerParameter) => Promise<boolean>) & IKgEventListener;
107
- export declare type IKgSubmitCloseEventListenerParameter = {} | null | undefined;
108
- export declare type IKgSubmitCloseEventListener = ((param: IKgSubmitCloseEventListenerParameter) => Promise<boolean>) & IKgEventListener;
109
- export declare type IKgSubmitEventListenerParameter = IKgSubmitBeforeOpenEventListenerParameter | IKgSubmitOnOpenEventListenerParameter | IKgSubmitBeforeOkEventListenerParameter | IKgSubmitAfterValidateEventListenerParameter | IKgSubmitBeforeRequestEventListenerParameter | IKgSubmitOkEventListenerParameter | IKgSubmitOnBeforeCancelEventListenerParameter | IKgSubmitOnCancelEventListenerParameter | IKgSubmitErrorEventListenerParameter | IKgSubmitCloseEventListenerParameter;
110
- export declare type IKgSubmitEventListener = IKgSubmitBeforeOpenEventListener | IKgSubmitOnOpenEventListener | IKgSubmitBeforeOkEventListener | IKgSubmitAfterValidateEventListener | IKgSubmitBeforeRequestEventListener | IKgSubmitOkEventListener | IKgSubmitOnBeforeCancelEventListener | IKgSubmitOnCancelEventListener | IKgSubmitErrorEventListener | IKgSubmitCloseEventListener;
7
+ import { IKgSubmitEvent, IKgSubmitEventListenerParameter, IKgSubmitOnAfterValidateEventListener, IKgSubmitOnBeforeCancelEventListener, IKgSubmitOnBeforeOkEventListener, IKgSubmitOnBeforeOpenEventListener, IKgSubmitOnBeforeRequestEventListener, IKgSubmitOnCancelEventListener, IKgSubmitOnCloseEventListener, IKgSubmitOnErrorEventListener, IKgSubmitOnOkEventListener, IKgSubmitOnOpenEventListener } from './index.event';
111
8
  export interface IUseKgSubmitStoreState {
112
- afterValidateEventListenerMap: Map<string, Array<IKgSubmitAfterValidateEventListener>>;
113
- beforeOkEventListenerMap: Map<string, Array<IKgSubmitBeforeOkEventListener>>;
114
- beforeOpenEventListenerMap: Map<string, Array<IKgSubmitBeforeOpenEventListener>>;
115
- beforeRequestEventListenerMap: Map<string, Array<IKgSubmitBeforeRequestEventListener>>;
116
- closeEventListenerMap: Map<string, Array<IKgSubmitCloseEventListener>>;
117
- errorEventListenerMap: Map<string, Array<IKgSubmitErrorEventListener>>;
9
+ onAfterValidate: Map<string, Array<IKgSubmitOnAfterValidateEventListener>>;
10
+ onBeforeOk: Map<string, Array<IKgSubmitOnBeforeOkEventListener>>;
11
+ onBeforeOpen: Map<string, Array<IKgSubmitOnBeforeOpenEventListener>>;
12
+ onBeforeRequest: Map<string, Array<IKgSubmitOnBeforeRequestEventListener>>;
13
+ onClose: Map<string, Array<IKgSubmitOnCloseEventListener>>;
14
+ onError: Map<string, Array<IKgSubmitOnErrorEventListener>>;
118
15
  /** 表单数据对象. */
119
16
  formModelMap: Map<string, Record<string, any>>;
120
17
  /** 表单对象. */
@@ -125,10 +22,10 @@ export interface IUseKgSubmitStoreState {
125
22
  */
126
23
  formRulesMap: Map<string, Ref<Record<string, Array<RuleObject>>>>;
127
24
  isLoadingMap: Map<string, boolean>;
128
- okEventListenerMap: Map<string, Array<IKgSubmitOkEventListener>>;
129
- onBeforeCancelEventListenerMap: Map<string, Array<IKgSubmitOnBeforeCancelEventListener>>;
130
- onCancelEventListenerMap: Map<string, Array<IKgSubmitOnCancelEventListener>>;
131
- openEventListenerMap: Map<string, Array<IKgSubmitOnOpenEventListener>>;
25
+ onOk: Map<string, Array<IKgSubmitOnOkEventListener>>;
26
+ onBeforeCancel: Map<string, Array<IKgSubmitOnBeforeCancelEventListener>>;
27
+ onCancel: Map<string, Array<IKgSubmitOnCancelEventListener>>;
28
+ onOpen: Map<string, Array<IKgSubmitOnOpenEventListener>>;
132
29
  }
133
30
  export interface IUseKgSubmitStoreGetters {
134
31
  getFormModel(): (formID?: string | null) => Record<string, any> | null;
@@ -11,10 +11,10 @@ export declare type IUseColumns = {
11
11
  columns: ComputedRef<ColumnsType<IKgTableRow>>;
12
12
  /** 当前过滤状态(哪些列有过滤, 哪些列没过滤). */
13
13
  filterInfo: Ref<Record<string, any>>;
14
- /** 当前排序状态. */
15
- sorterInfo: Ref<SorterResult<any>>;
16
14
  /** 横向滚动宽度. */
17
15
  scrollX: ComputedRef<string>;
16
+ /** 当前排序状态. */
17
+ sorterInfo: Ref<SorterResult<any> | undefined>;
18
18
  };
19
19
  export declare function _useColumns(props: IKgTableProps): IUseColumns;
20
20
  export declare function _useLoading(): {
@@ -0,0 +1,57 @@
1
+ import { IKgEventListener } from '@kengic/core.core';
2
+ import { Ref } from 'vue';
3
+ import { IPage } from '../../api/WMS/models';
4
+ import { IKgTableRow } from './index.vm';
5
+ /**
6
+ * 事件类型.
7
+ * 'onReady': 就绪, 配置初始完成, 组件渲染完成
8
+ * 'onRowDoubleClick': 双击某行
9
+ * 'onBeforeParseRequestParameter': 即将解析请求参数,
10
+ * 'onBeforeRequest': 即将发起查询请求, 如果返回 true 表示不会发起请求
11
+ * 'onBeforeSetDatas': 查询请求成功, 表格数据尚未赋值. 此处可以对查询接口返回的列表数据作处理
12
+ * 'onAfterRequest': 查询请求成功, 表格数据已经赋值, 表格状态已经更新
13
+ */
14
+ export declare type IKgTableEvent = 'onReady' | 'onRowDoubleClick' | 'onBeforeParseRequestParameter' | 'onBeforeRequest' | 'onBeforeSetDatas' | 'onAfterRequest';
15
+ export declare type IKgTableOnReadyEventListenerParameter = {};
16
+ export declare type IKgTableOnReadyEventListener = ((param: IKgTableOnReadyEventListenerParameter) => Promise<boolean>) & IKgEventListener;
17
+ export declare type IKgTableOnRowDoubleClickEventListenerParameter = {
18
+ /** 双击的行. */
19
+ row: IKgTableRow;
20
+ };
21
+ export declare type IKgTableOnRowDoubleClickEventListener = ((param: IKgTableOnRowDoubleClickEventListenerParameter) => Promise<boolean>) & IKgEventListener;
22
+ export declare type IKgTableOnBeforeParseRequestParameterEventListenerParameter = {
23
+ /**
24
+ * 查询接口请求参数, 尚未解析.
25
+ */
26
+ params: Record<string, any>;
27
+ };
28
+ export declare type IKgTableOnBeforeParseRequestParameterEventListener = ((param: IKgTableOnBeforeParseRequestParameterEventListenerParameter) => Promise<boolean>) & IKgEventListener;
29
+ export declare type IKgTableOnBeforeRequestEventListenerParameter = {
30
+ /** 查询接口请求参数. */
31
+ params: Record<string, any>;
32
+ /** 查询接口返回的数据, 调用者可以直接修改该数据, 从而实现手动提供表格数据. */
33
+ response: Ref;
34
+ };
35
+ export declare type IKgTableOnBeforeRequestEventListener = ((param: IKgTableOnBeforeRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
36
+ export declare type IKgTableOnBeforeSetDatasEventListenerParameter = {
37
+ /**
38
+ * 列表数据.
39
+ */
40
+ datas: Ref<Array<IKgTableRow>>;
41
+ /**
42
+ * 数据总数.
43
+ */
44
+ total: Ref<Number>;
45
+ };
46
+ export declare type IKgTableOnBeforeSetDatasEventListener = ((param: IKgTableOnBeforeSetDatasEventListenerParameter) => Promise<boolean>) & IKgEventListener;
47
+ export declare type IKgTableOnAfterRequestEventListenerParameter = {
48
+ /** 查询接口请求参数. */
49
+ params: Record<string, any>;
50
+ /** 接口返回的分页数据. */
51
+ response: IPage<IKgTableRow> | null | undefined;
52
+ /** 列表数据. */
53
+ datas: Ref<Array<IKgTableRow>>;
54
+ };
55
+ export declare type IKgTableOnAfterRequestEventListener = ((param: IKgTableOnAfterRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
56
+ export declare type IKgTableEventListenerParameter = IKgTableOnReadyEventListenerParameter | IKgTableOnRowDoubleClickEventListenerParameter | IKgTableOnBeforeParseRequestParameterEventListenerParameter | IKgTableOnBeforeRequestEventListenerParameter | IKgTableOnBeforeSetDatasEventListenerParameter | IKgTableOnAfterRequestEventListenerParameter;
57
+ export declare type IKgTableEventListener = IKgTableOnReadyEventListener | IKgTableOnRowDoubleClickEventListener | IKgTableOnBeforeParseRequestParameterEventListener | IKgTableOnBeforeRequestEventListener | IKgTableOnBeforeSetDatasEventListener | IKgTableOnAfterRequestEventListener;
@@ -1,7 +1,8 @@
1
+ import { IRemoveEventListener } from '@kengic/core.core';
1
2
  import { ComputedRef } from 'vue';
2
3
  import { VarGridConfig, VarGridDetail } from '../../api/WMS/models';
3
- import { IKgTableAfterRequestEventListener, IKgTableBeforeParseParameterEventListener, IKgTableBeforeRequestEventListener, IKgTableBeforeSetDatasEventListener, IKgTableReadyEventListener, IKgTableRowDoubleClickEventListener, IKgTableStore } from './index.store';
4
- import { IRemoveEventListener } from '@kengic/core.core';
4
+ import { IKgTableOnAfterRequestEventListener, IKgTableOnBeforeParseRequestParameterEventListener, IKgTableOnBeforeRequestEventListener, IKgTableOnBeforeSetDatasEventListener, IKgTableOnReadyEventListener, IKgTableOnRowDoubleClickEventListener } from './index.event';
5
+ import { IKgTableStore } from './index.store';
5
6
  export interface IUseKgTable {
6
7
  /**
7
8
  * 列表数据.
@@ -55,11 +56,11 @@ export interface IUseKgTable {
55
56
  * @param listener 事件监听函数.
56
57
  * @param isOnce 是否只会触发一次. 默认为 undefined.
57
58
  */
58
- onAfterRequest(listener: IKgTableAfterRequestEventListener, isOnce?: boolean): IRemoveEventListener;
59
+ onAfterRequest(listener: IKgTableOnAfterRequestEventListener, isOnce?: boolean): IRemoveEventListener;
59
60
  /**
60
61
  * @deprecated 已废弃, 请使用 onAfterRequest() 方法.
61
62
  */
62
- onAfterSearch(listener: IKgTableAfterRequestEventListener, isOnce?: boolean): IRemoveEventListener;
63
+ onAfterSearch(listener: IKgTableOnAfterRequestEventListener, isOnce?: boolean): IRemoveEventListener;
63
64
  /**
64
65
  * <p>监听事件: 即将解析请求参数.</p>
65
66
  * <p>在该事件中, 可以修改解析前的参数.</p>
@@ -67,43 +68,43 @@ export interface IUseKgTable {
67
68
  * @param listener 事件监听函数.
68
69
  * @param isOnce 是否只会触发一次. 默认为 undefined.
69
70
  */
70
- onBeforeParseRequestParameter(listener: IKgTableBeforeParseParameterEventListener, isOnce?: boolean): IRemoveEventListener;
71
+ onBeforeParseRequestParameter(listener: IKgTableOnBeforeParseRequestParameterEventListener, isOnce?: boolean): IRemoveEventListener;
71
72
  /**
72
73
  * 监听事件: 即将发起查询请求, 如果返回 true 表示不会发起请求.
73
74
  * @param listener 事件监听函数.
74
75
  * @param isOnce 是否只会触发一次. 默认为 undefined.
75
76
  */
76
- onBeforeRequest(listener: IKgTableBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
77
+ onBeforeRequest(listener: IKgTableOnBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
77
78
  /**
78
79
  * @deprecated 已废弃, 请使用 onBeforeRequest() 方法.
79
80
  */
80
- onBeforeRetrieve(listener: IKgTableBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
81
+ onBeforeRetrieve(listener: IKgTableOnBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
81
82
  /**
82
83
  * @deprecated 已废弃, 请使用 onBeforeRequest() 方法.
83
84
  */
84
- onBeforeSearch(listener: IKgTableBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
85
+ onBeforeSearch(listener: IKgTableOnBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
85
86
  /**
86
87
  * 监听事件: 查询请求成功, 表格数据尚未赋值. 此处可以对查询接口返回的列表数据作处理.
87
88
  * @param listener 事件监听函数.
88
89
  * @param isOnce 是否只会触发一次. 默认为 undefined.
89
90
  */
90
- onBeforeSetDatas(listener: IKgTableBeforeSetDatasEventListener, isOnce?: boolean): IRemoveEventListener;
91
+ onBeforeSetDatas(listener: IKgTableOnBeforeSetDatasEventListener, isOnce?: boolean): IRemoveEventListener;
91
92
  /**
92
93
  * 监听事件: ready, 配置初始完成, 组件渲染完成.
93
94
  * @param listener 事件监听函数.
94
95
  * @param isOnce 是否只会触发一次. 默认为 undefined.
95
96
  */
96
- onReady(listener: IKgTableReadyEventListener, isOnce?: boolean): IRemoveEventListener;
97
+ onReady(listener: IKgTableOnReadyEventListener, isOnce?: boolean): IRemoveEventListener;
97
98
  /**
98
99
  * @deprecated 已废弃, 请使用 onAfterSearch() 方法.
99
100
  */
100
- onRetrieve(listener: IKgTableAfterRequestEventListener, isOnce?: boolean): IRemoveEventListener;
101
+ onRetrieve(listener: IKgTableOnAfterRequestEventListener, isOnce?: boolean): IRemoveEventListener;
101
102
  /**
102
103
  * 监听事件: 双击某行.
103
104
  * @param listener 事件监听函数.
104
105
  * @param isOnce 是否只会触发一次. 默认为 undefined.
105
106
  */
106
- onRowDoubleClick(listener: IKgTableRowDoubleClickEventListener, isOnce?: boolean): IRemoveEventListener;
107
+ onRowDoubleClick(listener: IKgTableOnRowDoubleClickEventListener, isOnce?: boolean): IRemoveEventListener;
107
108
  /** 当前分页选项. */
108
109
  pageSizeOption: ComputedRef<number>;
109
110
  /** 所有分页选项. */
@@ -1,67 +1,14 @@
1
- import { IKgEventListener } from '@kengic/core.core';
2
1
  import { Key } from 'ant-design-vue/lib/_util/type';
3
2
  import { StoreDefinition } from 'pinia';
4
3
  import { Ref } from 'vue';
5
- import { IPage, VarGridConfig, VarGridDetail } from '../../api/WMS/models';
4
+ import { VarGridConfig, VarGridDetail } from '../../api/WMS/models';
5
+ import { IKgTableEvent, IKgTableEventListenerParameter, IKgTableOnAfterRequestEventListener, IKgTableOnBeforeParseRequestParameterEventListener, IKgTableOnBeforeRequestEventListener, IKgTableOnBeforeSetDatasEventListener, IKgTableOnReadyEventListener, IKgTableOnRowDoubleClickEventListener } from './index.event';
6
6
  import { IKgTableRow, IKgTableRowHeight } from './index.vm';
7
- /**
8
- * 事件类型.
9
- * 'ready': 就绪, 配置初始完成, 组件渲染完成
10
- * 'rowDoubleClick': 双击某行
11
- * 'beforeParseRequestParameter': 即将解析请求参数,
12
- * 'beforeRequest': 即将发起查询请求, 如果返回 true 表示不会发起请求
13
- * 'beforeSetDatas': 查询请求成功, 表格数据尚未赋值. 此处可以对查询接口返回的列表数据作处理
14
- * 'afterRequest': 查询请求成功, 表格数据已经赋值, 表格状态已经更新
15
- */
16
- export declare type IKgTableEvent = 'ready' | 'rowDoubleClick' | 'beforeParseRequestParameter' | 'beforeRequest' | 'beforeSetDatas' | 'afterRequest';
17
- export declare type IKgTableReadyEventListenerParameter = {};
18
- export declare type IKgTableReadyEventListener = ((param: IKgTableReadyEventListenerParameter) => Promise<boolean>) & IKgEventListener;
19
- export declare type IKgTableRowDoubleClickEventListenerParameter = {
20
- /** 双击的行. */
21
- row: IKgTableRow;
22
- };
23
- export declare type IKgTableRowDoubleClickEventListener = ((param: IKgTableRowDoubleClickEventListenerParameter) => Promise<boolean>) & IKgEventListener;
24
- export declare type IKgTableBeforeParseRequestParameterEventListenerParameter = {
25
- /**
26
- * 查询接口请求参数, 尚未解析.
27
- */
28
- params: Record<string, any>;
29
- };
30
- export declare type IKgTableBeforeParseParameterEventListener = ((param: IKgTableBeforeParseRequestParameterEventListenerParameter) => Promise<boolean>) & IKgEventListener;
31
- export declare type IKgTableBeforeRequestEventListenerParameter = {
32
- /** 查询接口请求参数. */
33
- params: Record<string, any>;
34
- /** 查询接口返回的数据, 调用者可以直接修改该数据, 从而实现手动提供表格数据. */
35
- response: Ref;
36
- };
37
- export declare type IKgTableBeforeRequestEventListener = ((param: IKgTableBeforeRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
38
- export declare type IKgTableBeforeSetDatasEventListenerParameter = {
39
- /**
40
- * 列表数据.
41
- */
42
- datas: Ref<Array<IKgTableRow>>;
43
- /**
44
- * 数据总数.
45
- */
46
- total: Ref<Number>;
47
- };
48
- export declare type IKgTableBeforeSetDatasEventListener = ((param: IKgTableBeforeSetDatasEventListenerParameter) => Promise<boolean>) & IKgEventListener;
49
- export declare type IKgTableAfterRequestEventListenerParameter = {
50
- /** 查询接口请求参数. */
51
- params: Record<string, any>;
52
- /** 接口返回的分页数据. */
53
- response: IPage<IKgTableRow> | null | undefined;
54
- /** 列表数据. */
55
- datas: Ref<Array<IKgTableRow>>;
56
- };
57
- export declare type IKgTableAfterRequestEventListener = ((param: IKgTableAfterRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
58
- export declare type IKgTableEventListenerParameter = IKgTableReadyEventListenerParameter | IKgTableRowDoubleClickEventListenerParameter | IKgTableBeforeParseRequestParameterEventListenerParameter | IKgTableBeforeRequestEventListenerParameter | IKgTableBeforeSetDatasEventListenerParameter | IKgTableAfterRequestEventListenerParameter;
59
- export declare type IKgTableEventListener = IKgTableReadyEventListener | IKgTableRowDoubleClickEventListener | IKgTableBeforeParseParameterEventListener | IKgTableBeforeRequestEventListener | IKgTableBeforeSetDatasEventListener | IKgTableAfterRequestEventListener;
60
7
  export interface IUseKgTableStoreState {
61
- afterRequestEventListenerMap: Map<string, Array<IKgTableAfterRequestEventListener>>;
62
- beforeParseParameterEventListenerMap: Map<string, Array<IKgTableBeforeParseParameterEventListener>>;
63
- beforeRequestEventListenerMap: Map<string, Array<IKgTableBeforeRequestEventListener>>;
64
- beforeSetDatasEventListenerMap: Map<string, Array<IKgTableBeforeSetDatasEventListener>>;
8
+ onAfterRequest: Map<string, Array<IKgTableOnAfterRequestEventListener>>;
9
+ onBeforeParseParameter: Map<string, Array<IKgTableOnBeforeParseRequestParameterEventListener>>;
10
+ onBeforeRequest: Map<string, Array<IKgTableOnBeforeRequestEventListener>>;
11
+ onBeforeSetDatas: Map<string, Array<IKgTableOnBeforeSetDatasEventListener>>;
65
12
  /** 列表数据. */
66
13
  datasMap: Map<String, Array<any>>;
67
14
  /** 是否就绪: 配置初始完成, 组件渲染完成. */
@@ -88,14 +35,14 @@ export interface IUseKgTableStoreState {
88
35
  */
89
36
  isShowDescriptionMap: Map<string, boolean>;
90
37
  /** 事件监听函数列表: ready. */
91
- onReadyEventListenerMap: Map<string, Array<IKgTableReadyEventListener>>;
38
+ onReady: Map<string, Array<IKgTableOnReadyEventListener>>;
92
39
  /**
93
40
  * <p>查询参数.</p>
94
41
  * <p>此查询参数是最终传给后端接口的参数, 包含了查询条件, 还包含了表格中的排序和分页, 还包含了表格配置中的参数.</p>
95
42
  */
96
43
  requestParamsMap: Map<string, Record<string, any>>;
97
44
  /** '双击某行'事件监听函数列表. */
98
- rowDoubleClickEventListenerMap: Map<string, Array<IKgTableRowDoubleClickEventListener>>;
45
+ onRowDoubleClick: Map<string, Array<IKgTableOnRowDoubleClickEventListener>>;
99
46
  /** 行高. */
100
47
  rowHeightMap: Map<string, IKgTableRowHeight>;
101
48
  /** 勾选的行的主键. */
@@ -6,14 +6,17 @@ import { KgSubmitProps } from '../KgSubmit';
6
6
  import { IKgTableSlotParams } from '../KgTable';
7
7
  import { IKgTableProps } from '../KgTable/KgTable';
8
8
  export declare type IKgSlots = {
9
+ /** 按钮. */
9
10
  KgButton?: {
10
11
  /** 右侧. */
11
12
  right?: () => any;
12
13
  };
14
+ /** 查询条件. */
13
15
  KgSearch?: {
14
16
  /** 左侧. */
15
17
  left?: () => any;
16
18
  };
19
+ /** 表单. */
17
20
  KgSubmit?: {
18
21
  /**
19
22
  * 某个表单控件.
@@ -26,6 +29,7 @@ export declare type IKgSlots = {
26
29
  [variable: string]: (param: IKgFormItemSlotControlRightParameter) => any;
27
30
  };
28
31
  };
32
+ /** 表格. */
29
33
  KgTable?: {
30
34
  /** 单元格. */
31
35
  bodyCell?: (param: IKgTableSlotParams['bodyCell']) => any;
@@ -34,9 +38,11 @@ export declare type IKgSlots = {
34
38
  /** 表格底部的汇总行.单元格. */
35
39
  'summary.bodyCell'?: (param: IKgTableSlotParams['summary.bodyCell']) => any;
36
40
  };
37
- /** KgTable 下面. */
41
+ /** 表格下面. */
38
42
  afterKgTable?: () => any;
39
- /** 底部. */
43
+ /** 按钮上面. */
44
+ beforeKgButton?: () => any;
45
+ /** 页面底部. */
40
46
  bottom?: () => any;
41
47
  /**
42
48
  * 孩子页面.
@@ -1,14 +1,14 @@
1
1
  import { IRemoveEventListener } from '@kengic/core.core';
2
2
  import { Pinia } from 'pinia';
3
3
  import { ComputedRef } from 'vue';
4
- import { IKgWarehouseMountedEventListener, IKgWarehouseStore } from './index.store';
4
+ import { IKgWarehouseOnMountedEventListener, IKgWarehouseStore } from './index.store';
5
5
  export declare type IUseKgWarehouse = {
6
6
  /**
7
7
  * 监听事件: 组件加载完成.
8
8
  * @param listener 事件监听函数.
9
9
  * @param isOnce 是否只会触发一次. 默认为 undefined.
10
10
  */
11
- onMounted(listener: IKgWarehouseMountedEventListener, isOnce?: boolean): IRemoveEventListener;
11
+ onMounted(listener: IKgWarehouseOnMountedEventListener, isOnce?: boolean): IRemoveEventListener;
12
12
  store: IKgWarehouseStore;
13
13
  /**
14
14
  * 是否显示弹窗.
@@ -3,13 +3,13 @@ import { StoreDefinition } from 'pinia';
3
3
  import { WhDTO } from '../../api/WMS/models';
4
4
  /**
5
5
  * 事件类型.
6
- * 'mounted': 组件加载完成
6
+ * 'onMounted': 组件挂载完成
7
7
  */
8
- export declare type IKgWarehouseEvent = 'mounted';
9
- export declare type IKgWarehouseMountedEventListener = (() => void) & IKgEventListener;
10
- export declare type IKgWarehouseEventListener = IKgWarehouseMountedEventListener;
8
+ export declare type IKgWarehouseEvent = 'onMounted';
9
+ export declare type IKgWarehouseOnMountedEventListener = (() => void) & IKgEventListener;
10
+ export declare type IKgWarehouseEventListener = IKgWarehouseOnMountedEventListener;
11
11
  export interface IUseKgWarehouseStoreState {
12
- mountedListeners: Array<IKgWarehouseMountedEventListener>;
12
+ onMounted: Array<IKgWarehouseOnMountedEventListener>;
13
13
  /**
14
14
  * 是否显示弹窗.
15
15
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.26.6-beta.137",
3
+ "version": "0.26.6-beta.138",
4
4
  "scripts": {
5
5
  "build": "npm run use-node && rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "npm run use-node && rimraf dist && vue-tsc && vite build --mode development",