@kengic/vue 0.9.3 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,7 +24,12 @@ export declare type IKgButtonUpdateBeforeClickCbParam = {
24
24
  };
25
25
  export declare type IKgButtonUpdateBeforeClickCb = ((args: IKgButtonUpdateBeforeClickCbParam) => Promise<boolean>) & IKgEventCb;
26
26
  /** 事件监听函数: deleteOk. */
27
- export declare type IKgButtonDeleteOkCb = (() => Promise<boolean>) & IKgEventCb;
27
+ export declare type IKgButtonDeleteOkCbParam = {
28
+ button?: VarButton | null;
29
+ /** 删除的行. */
30
+ rows: Array<IKgTableRow> | null;
31
+ };
32
+ export declare type IKgButtonDeleteOkCb = ((args: IKgButtonDeleteOkCbParam) => Promise<boolean>) & IKgEventCb;
28
33
  /** 事件监听函数: otherOk. */
29
34
  export declare type IKgButtonOtherOkCbParam = {
30
35
  button?: VarButton | null;
@@ -36,7 +41,7 @@ export declare type IKgButtonOtherOkCb = ((args: IKgButtonOtherOkCbParam) => Pro
36
41
  export declare type IKgButtonSubmitSaveCb = (() => Promise<boolean>) & IKgEventCb;
37
42
  /** 事件监听函数: submitCancel. */
38
43
  export declare type IKgButtonSubmitCancelCb = (() => Promise<boolean>) & IKgEventCb;
39
- export declare type IKgButtonCbParam = IKgButtonClickCbParam | IKgButtonUpdateBeforeClickCbParam | IKgButtonOtherOkCbParam | any;
44
+ export declare type IKgButtonCbParam = IKgButtonClickCbParam | IKgButtonUpdateBeforeClickCbParam | IKgButtonDeleteOkCbParam | IKgButtonOtherOkCbParam | any;
40
45
  export declare type IKgButtonCb = IKgButtonClickCb | IKgButtonUpdateBeforeClickCb | IKgButtonDeleteOkCb | IKgButtonOtherOkCb | IKgButtonSubmitSaveCb | IKgButtonSubmitCancelCb;
41
46
  export interface IKgButtonState {
42
47
  clickListenersMap: Map<string, Array<IKgButtonClickCb>>;
@@ -49,6 +54,7 @@ export interface IKgButtonState {
49
54
  export declare type IKgButtonStoreDefinition = StoreDefinition<'KgButton', IKgButtonState, {
50
55
  getClickListeners(): (formID?: string | null) => Array<IKgButtonClickCb> | null;
51
56
  }, {
57
+ dispose(formID: string | null | undefined): void;
52
58
  /**
53
59
  * 注册事件监听.
54
60
  * @param formID 界面标识.
@@ -15,35 +15,43 @@ export declare type IUseKgSubmit = {
15
15
  displayType: Ref<KG_VAR_SUBMIT__DISPLAY_TYPE>;
16
16
  /**
17
17
  * 监听事件: 打开弹窗.
18
+ * @param cb 回调函数.
18
19
  * @param once 是否只会触发一次. 默认为 undefined.
19
20
  * */
20
21
  onOpen(cb: IKgSubmitOpenCb, once?: boolean): IRemoveEventListenerHandler;
21
22
  /**
22
23
  * 监听事件: 点击保存按钮之后, 执行默认逻辑之前. 可以在此时修改表单的值; 可以在此时对表单的值进行验证, 如果返回 true 表示表单验证失败, 不会再执行后面的代码.
24
+ * @param cb 回调函数.
23
25
  * @param once 是否只会触发一次. 默认为 undefined.
24
26
  */
25
27
  onBeforeOk(cb: IKgSubmitBeforeOkCb, once?: boolean): IRemoveEventListenerHandler;
26
28
  /** 监听事件: 点击保存按钮之后, 表单验证成功. 如果返回 true, 不会再执行后面的代码.
29
+ * @param cb 回调函数.
27
30
  * @param once 是否只会触发一次. 默认为 undefined.
28
31
  */
29
32
  onAfterValidate(cb: IKgSubmitAfterValidateCb, once?: boolean): IRemoveEventListenerHandler;
30
33
  /** 监听事件: 发起请求之前.
34
+ * @param cb 回调函数.
31
35
  * @param once 是否只会触发一次. 默认为 undefined.
32
36
  */
33
37
  onBeforeRequest(cb: IKgSubmitBeforeRequestCb, once?: boolean): IRemoveEventListenerHandler;
34
38
  /** 监听事件: 点击保存按钮之后, 执行默认逻辑之后, 调用接口成功, 即将关闭弹窗.
39
+ * @param cb 回调函数.
35
40
  * @param once 是否只会触发一次. 默认为 undefined.
36
41
  */
37
42
  onOk(cb: IKgSubmitOkCb, once?: boolean): IRemoveEventListenerHandler;
38
43
  /** 监听事件: 请求失败. 请求失败了, 或者请求返回了错误消息.
44
+ * @param cb 回调函数.
39
45
  * @param once 是否只会触发一次. 默认为 undefined.
40
46
  */
41
47
  onError(cb: IKgSubmitErrorCb, once?: boolean): IRemoveEventListenerHandler;
42
48
  /** 监听事件: 关闭弹窗. 点击取消或者点击确定并且成功之后, 都会触发.
49
+ * @param cb 回调函数.
43
50
  * @param once 是否只会触发一次. 默认为 undefined.
44
51
  */
45
52
  onClose(cb: IKgSubmitCloseCb, once?: boolean): IRemoveEventListenerHandler;
46
53
  /** 监听事件: 查找弹窗点击确定.
54
+ * @param cb 回调函数.
47
55
  * @param once 是否只会触发一次. 默认为 undefined.
48
56
  */
49
57
  onLookupOk(cb: IKgSubmitLookupOkCb, once?: boolean): IRemoveEventListenerHandler;
@@ -86,6 +86,10 @@ export declare type IKgTableStoreDefinition = StoreDefinition<'KgTable', IKgTabl
86
86
  getIsRetrieving(): (formID: string | null | undefined) => boolean | null;
87
87
  getTableWidth(): (formID: string | null | undefined) => number | null;
88
88
  }, {
89
+ /**
90
+ * 清理数据.
91
+ * @param formID 页面标识.
92
+ */
89
93
  dispose(formID: string | null | undefined): void;
90
94
  addEventListener(formID: string | null | undefined, event: IKgTableEvent, cb: IKgTableCb): void;
91
95
  removeEventListener(formID: string | null | undefined, event: IKgTableEvent, cb?: IKgTableCb): void;
@@ -190,6 +190,10 @@ export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', IKgVarState
190
190
  emit(frm_id: string, event: IKgVarEvent, args?: any): void;
191
191
  enter(frm_id: IFormID): Promise<void>;
192
192
  leave(frm_id: string): void;
193
+ /**
194
+ * 查询所有变量配置.
195
+ * @param frm_id 界面标识.
196
+ */
193
197
  retrieve(frm_id?: string | null): Promise<void>;
194
198
  setIsCreating(frm_id: string, value: boolean): void;
195
199
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.9.3",
3
+ "version": "0.9.5",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "rimraf dist && vue-tsc && vite build --mode development",