@kengic/vue 0.13.7 → 0.13.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/kengic-vue.js +1366 -1321
- package/dist/src/apis/WMS/models.d.ts +2 -0
- package/dist/src/components/KgButton/index.hooks.d.ts +8 -2
- package/dist/src/components/KgButton/index.store.d.ts +9 -9
- package/dist/src/components/KgVar/index.store.d.ts +2 -1
- package/dist/src/consts/index.vm.d.ts +23 -0
- package/dist/src/utils/kg.util.d.ts +2 -5
- package/package.json +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import { IRemoveEventListenerHandler, KG_BUTTON_TYPE } from '../../consts';
|
2
|
-
import { IKgButtonClickCb, IKgButtonDeleteOkCb, IKgButtonOtherOkCb, IKgButtonStore, IKgButtonSubmitCancelCb, IKgButtonSubmitSaveCb, IKgButtonUpdateBeforeClickCb } from './index.store';
|
2
|
+
import { IKgButtonClickCb, IKgButtonDeleteOkCb, IKgButtonImportOkCb, IKgButtonOtherOkCb, IKgButtonStore, IKgButtonSubmitCancelCb, IKgButtonSubmitSaveCb, IKgButtonUpdateBeforeClickCb } from './index.store';
|
3
3
|
export declare type IUseKgButton = {
|
4
4
|
formID: string;
|
5
5
|
/** 状态数据. */
|
@@ -19,7 +19,7 @@ export declare type IUseKgButton = {
|
|
19
19
|
*/
|
20
20
|
onClick(cb: IKgButtonClickCb, once?: boolean): IRemoveEventListenerHandler;
|
21
21
|
/**
|
22
|
-
* 监听事件: 点击更新按钮之后, 执行默认逻辑之前. 如果返回
|
22
|
+
* 监听事件: 点击更新按钮之后, 执行默认逻辑之前. 如果返回 true, 则不再执行后续的默认逻辑.
|
23
23
|
* @param cb 回调函数.
|
24
24
|
* @param once 是否只会触发一次. 默认为 undefined.
|
25
25
|
*/
|
@@ -30,6 +30,12 @@ export declare type IUseKgButton = {
|
|
30
30
|
* @param once 是否只会触发一次. 默认为 undefined.
|
31
31
|
*/
|
32
32
|
onDeleteOk(cb: IKgButtonDeleteOkCb, once?: boolean): IRemoveEventListenerHandler;
|
33
|
+
/**
|
34
|
+
* 监听事件: 导入成功, 导入接口调用成功.
|
35
|
+
* @param cb 回调函数.
|
36
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
37
|
+
*/
|
38
|
+
onImportOk(cb: IKgButtonImportOkCb, once?: boolean): IRemoveEventListenerHandler;
|
33
39
|
/**
|
34
40
|
* 监听事件: other 类型的按钮接口调用成功.
|
35
41
|
* @param cb 回调函数.
|
@@ -7,46 +7,46 @@ import { IKgTableRow } from '../KgTable';
|
|
7
7
|
* 'click': 点击按钮
|
8
8
|
* 'updateBeforeClick': 点击更新按钮之后, 执行默认逻辑之前. 如果返回 Promise.resolve(false), 则不执行默认逻辑
|
9
9
|
* 'deleteOk': 删除成功, 删除接口调用成功
|
10
|
+
* 'importOk': 导入成功, 导入接口调用成功
|
10
11
|
* 'otherOk': other 类型的按钮接口调用成功
|
11
12
|
* 'submitSave': 表格内编辑时, 点击保存按钮
|
12
13
|
* 'submitCancel': 表格内编辑时, 点击取消按钮
|
13
14
|
*/
|
14
|
-
export declare type IKgButtonEvent = 'click' | 'updateBeforeClick' | 'deleteOk' | 'otherOk' | 'submitSave' | 'submitCancel';
|
15
|
-
/** 事件监听函数: click. */
|
15
|
+
export declare type IKgButtonEvent = 'click' | 'updateBeforeClick' | 'deleteOk' | 'importOk' | 'otherOk' | 'submitSave' | 'submitCancel';
|
16
16
|
export declare type IKgButtonClickCbParam = {
|
17
17
|
button: VarButton;
|
18
18
|
};
|
19
19
|
export declare type IKgButtonClickCb = ((button: VarButton) => Promise<boolean>) & IKgEventCb;
|
20
|
-
/** 事件监听函数: updateBeforeClick. */
|
21
20
|
export declare type IKgButtonUpdateBeforeClickCbParam = {
|
22
21
|
button?: VarButton | null;
|
23
22
|
row?: IKgTableRow | null;
|
24
23
|
};
|
25
24
|
export declare type IKgButtonUpdateBeforeClickCb = ((args: IKgButtonUpdateBeforeClickCbParam) => Promise<boolean>) & IKgEventCb;
|
26
|
-
/** 事件监听函数: deleteOk. */
|
27
25
|
export declare type IKgButtonDeleteOkCbParam = {
|
28
26
|
button?: VarButton | null;
|
29
27
|
/** 删除的行. */
|
30
28
|
rows: Array<IKgTableRow> | null;
|
31
29
|
};
|
32
30
|
export declare type IKgButtonDeleteOkCb = ((args: IKgButtonDeleteOkCbParam) => Promise<boolean>) & IKgEventCb;
|
33
|
-
|
31
|
+
export declare type IKgButtonImportOkCbParam = {
|
32
|
+
button?: VarButton | null;
|
33
|
+
};
|
34
|
+
export declare type IKgButtonImportOkCb = ((args: IKgButtonImportOkCbParam) => Promise<boolean>) & IKgEventCb;
|
34
35
|
export declare type IKgButtonOtherOkCbParam = {
|
35
36
|
button?: VarButton | null;
|
36
37
|
/** 接口返回的数据. */
|
37
38
|
data: any;
|
38
39
|
};
|
39
40
|
export declare type IKgButtonOtherOkCb = ((args: IKgButtonOtherOkCbParam) => Promise<boolean>) & IKgEventCb;
|
40
|
-
/** 事件监听函数: submitSave. */
|
41
41
|
export declare type IKgButtonSubmitSaveCb = (() => Promise<boolean>) & IKgEventCb;
|
42
|
-
/** 事件监听函数: submitCancel. */
|
43
42
|
export declare type IKgButtonSubmitCancelCb = (() => Promise<boolean>) & IKgEventCb;
|
44
|
-
export declare type IKgButtonCbParam = IKgButtonClickCbParam | IKgButtonUpdateBeforeClickCbParam | IKgButtonDeleteOkCbParam | IKgButtonOtherOkCbParam | any;
|
45
|
-
export declare type IKgButtonCb = IKgButtonClickCb | IKgButtonUpdateBeforeClickCb | IKgButtonDeleteOkCb | IKgButtonOtherOkCb | IKgButtonSubmitSaveCb | IKgButtonSubmitCancelCb;
|
43
|
+
export declare type IKgButtonCbParam = IKgButtonClickCbParam | IKgButtonUpdateBeforeClickCbParam | IKgButtonDeleteOkCbParam | IKgButtonImportOkCbParam | IKgButtonOtherOkCbParam | any;
|
44
|
+
export declare type IKgButtonCb = IKgButtonClickCb | IKgButtonUpdateBeforeClickCb | IKgButtonDeleteOkCb | IKgButtonImportOkCb | IKgButtonOtherOkCb | IKgButtonSubmitSaveCb | IKgButtonSubmitCancelCb;
|
46
45
|
export interface IKgButtonState {
|
47
46
|
clickListenersMap: Map<string, Array<IKgButtonClickCb>>;
|
48
47
|
updateBeforeClickListenersMap: Map<string, Array<IKgButtonUpdateBeforeClickCb>>;
|
49
48
|
deleteOkListenersMap: Map<string, Array<IKgButtonDeleteOkCb>>;
|
49
|
+
importOkListenersMap: Map<string, Array<IKgButtonImportOkCb>>;
|
50
50
|
otherOkListenersMap: Map<string, Array<IKgButtonOtherOkCb>>;
|
51
51
|
submitSaveListenersMap: Map<string, Array<IKgButtonSubmitSaveCb>>;
|
52
52
|
submitCancelListenersMap: Map<string, Array<IKgButtonSubmitCancelCb>>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type StoreDefinition } from 'pinia';
|
2
2
|
import { VarButton, VarButtonConfig, VarCatalog, VarGridConfig, VarGridDetail, VarGridMasterDTO, VarLookup, VarPossibility, VarProfileConfig, VarProfileDetail, VarProfileMasterDTO, VarSubmitConfig, VarSubmitField, VarVariableConfig, VarVariableInput } from '../../apis/WMS/models';
|
3
|
-
import { IKgEventCb } from '../../consts';
|
3
|
+
import { IKgEventCb, IKgSubmitConfigProps } from '../../consts';
|
4
4
|
/**
|
5
5
|
* 事件类型.
|
6
6
|
* 'retrieve': 变量配置查询完成
|
@@ -111,6 +111,7 @@ export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', IKgVarState
|
|
111
111
|
getVarVariableInput(): (frm_id: string | null | undefined, var_nam: string | null | undefined) => VarVariableInput | null;
|
112
112
|
getVarButtons(): (frm_id: string | null | undefined) => Array<VarButton> | null;
|
113
113
|
getVarSubmitConfig(): (frm_id: string | null | undefined) => VarSubmitConfig | null;
|
114
|
+
getVarSubmitConfigProps(): (frm_id: string | null | undefined) => IKgSubmitConfigProps;
|
114
115
|
/** 获取所有提交字段. */
|
115
116
|
getVarSubmitFields(): (frm_id: string | null | undefined) => Array<VarSubmitField> | null;
|
116
117
|
/** 获取创建时的提交字段. */
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { ModalFuncProps } from 'ant-design-vue/lib/modal/Modal';
|
1
2
|
/** 移除事件监听函数. */
|
2
3
|
export declare type IRemoveEventListenerHandler = () => void;
|
3
4
|
export declare type IKgEventCb = {
|
@@ -20,3 +21,25 @@ export interface Menu {
|
|
20
21
|
}
|
21
22
|
/** 语言. */
|
22
23
|
export declare type IKgLocale = 'zh_CN' | 'en' | 'ru' | 'ja' | 'ko';
|
24
|
+
/**
|
25
|
+
* 确认弹窗的参数.
|
26
|
+
* 对应后端的 com.kengic.wms.var.entity.VarButton#modal_props 字段.
|
27
|
+
*/
|
28
|
+
export declare type IKgConfirmModalProps = ModalFuncProps & {
|
29
|
+
/** 是否隐藏取消按钮. */
|
30
|
+
kgHideCancelButton?: boolean;
|
31
|
+
};
|
32
|
+
/**
|
33
|
+
* 提交弹窗的参数.
|
34
|
+
* 对应后端的 com.kengic.wms.var.entity.VarSubmitConfig#props 字段.
|
35
|
+
*/
|
36
|
+
export interface IKgSubmitConfigProps {
|
37
|
+
/** 创建时, 确认按钮的文本对应的变量名. */
|
38
|
+
'footer.ok-button.text-var-name.creating'?: string;
|
39
|
+
/** 更新时, 确认按钮的文本对应的变量名. */
|
40
|
+
'footer.ok-button.text-var-name.updating'?: string;
|
41
|
+
/** 复制时, 确认按钮的文本对应的变量名. */
|
42
|
+
'footer.ok-button.text-var-name.copying'?: string;
|
43
|
+
/** 删除时, 确认按钮的文本对应的变量名. */
|
44
|
+
'footer.ok-button.text-var-name.deleting'?: string;
|
45
|
+
}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ModalFuncProps } from 'ant-design-vue/lib/modal/Modal';
|
2
2
|
import dayjs, { Dayjs } from 'dayjs';
|
3
|
+
import { IKgConfirmModalProps } from '../consts';
|
3
4
|
/**
|
4
5
|
* 通用工具.
|
5
6
|
*/
|
@@ -83,7 +84,7 @@ export declare class KgUtil {
|
|
83
84
|
* https://www.antdv.com/components/modal
|
84
85
|
* @param props
|
85
86
|
*/
|
86
|
-
static confirm(props:
|
87
|
+
static confirm(props: IKgConfirmModalProps): ModalFunc;
|
87
88
|
/**
|
88
89
|
* 如果不是表单验证错误, 则抛出该错误.
|
89
90
|
* @param e 错误对象.
|
@@ -110,7 +111,3 @@ export declare type ModalFunc = {
|
|
110
111
|
showLoading(): void;
|
111
112
|
hideLoading(): void;
|
112
113
|
};
|
113
|
-
export declare type KgConfirmModalProps = ModalFuncProps & {
|
114
|
-
/** 是否隐藏取消按钮. */
|
115
|
-
kgHideCancelButton?: boolean;
|
116
|
-
};
|