@kengic/vue 0.21.1-beta.2 → 0.21.3
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 +4652 -4266
- package/dist/src/components/KgButton/components/KgButton.Copy.d.ts +5 -4
- package/dist/src/components/KgButton/components/KgButton.Create.d.ts +3 -2
- package/dist/src/components/KgButton/components/KgButton.Delete.d.ts +3 -3
- package/dist/src/components/KgButton/components/KgButton.Export.d.ts +5 -4
- package/dist/src/components/KgButton/components/KgButton.Import.d.ts +5 -4
- package/dist/src/components/KgButton/components/KgButton.ImportTemplate.d.ts +5 -4
- package/dist/src/components/KgButton/components/KgButton.Search.d.ts +3 -3
- package/dist/src/components/KgButton/components/KgButton.Update.d.ts +3 -2
- package/dist/src/components/KgButton/index.hooks.d.ts +70 -22
- package/dist/src/components/KgButton/index.store.d.ts +56 -18
- package/dist/src/components/KgModal/KgModal.d.ts +424 -86
- package/dist/src/components/KgModal/KgModal.hooks.d.ts +33 -0
- package/dist/src/components/KgModal/components/KgModal.HeaderButtons.d.ts +74 -0
- package/dist/src/components/KgModal/index.d.ts +1 -2
- package/dist/src/components/KgModal/index.vm.d.ts +8 -194
- package/dist/src/components/KgResizable/KgResizable.d.ts +8 -8
- package/dist/src/components/KgSearch/components/KgSearch.ConfigModal.Body.d.ts +9 -3
- package/dist/src/components/KgSearch/components/KgSearch.ConfigModal.d.ts +16 -10
- package/dist/src/components/KgSubmit/KgSubmit.d.ts +7 -7
- package/dist/src/components/KgSubmit/KgSubmit.hooks.d.ts +5 -3
- package/dist/src/components/KgSubmit/components/KgSubmit.VarSubmitConfig.Button.d.ts +7 -0
- package/dist/src/components/KgSubmit/components/{KgSubmit.Header.VarSubmitConfig.d.ts → KgSubmit.VarSubmitConfig.Modal.d.ts} +3 -2
- package/dist/src/components/KgSubmit/index.vm.d.ts +53 -7
- package/dist/src/config/index.hooks.d.ts +6 -29
- package/dist/src/config/index.store.d.ts +6 -4
- package/dist/src/consts/i18n/en.d.ts +1 -1
- package/dist/src/consts/i18n/zh_CN.d.ts +1 -1
- package/dist/src/helpers/tsx.helper.d.ts +16 -6
- package/dist/src/utils/kg.util.d.ts +2 -1
- package/package.json +93 -93
- package/dist/src/components/KgModal/components/KgModal.Close.d.ts +0 -41
- package/dist/src/components/KgSubmit/components/KgSubmit.Header.d.ts +0 -82
@@ -1,14 +1,15 @@
|
|
1
|
+
import { KG_BUTTON_TYPE } from '../../../consts';
|
1
2
|
declare const _default: import("vue").DefineComponent<{
|
2
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
3
4
|
kgVarName: import("vue").PropType<string | null>;
|
4
|
-
kgType: import("vue").PropType<
|
5
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
5
6
|
kgPrimary: {
|
6
7
|
type: import("vue").PropType<boolean | null | undefined>;
|
7
8
|
default: undefined;
|
8
9
|
};
|
9
10
|
kgIcon: import("vue").PropType<string | null>;
|
10
11
|
kgText: import("vue").PropType<string | null>;
|
11
|
-
kgColor: import("vue").PropType<import("
|
12
|
+
kgColor: import("vue").PropType<import("../../../consts").KG_BUTTON_COLOR | null>;
|
12
13
|
kgDisabled: {
|
13
14
|
type: import("vue").PropType<boolean | null | undefined>;
|
14
15
|
default: undefined;
|
@@ -18,14 +19,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
18
19
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
19
20
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
20
21
|
kgVarName: import("vue").PropType<string | null>;
|
21
|
-
kgType: import("vue").PropType<
|
22
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
22
23
|
kgPrimary: {
|
23
24
|
type: import("vue").PropType<boolean | null | undefined>;
|
24
25
|
default: undefined;
|
25
26
|
};
|
26
27
|
kgIcon: import("vue").PropType<string | null>;
|
27
28
|
kgText: import("vue").PropType<string | null>;
|
28
|
-
kgColor: import("vue").PropType<import("
|
29
|
+
kgColor: import("vue").PropType<import("../../../consts").KG_BUTTON_COLOR | null>;
|
29
30
|
kgDisabled: {
|
30
31
|
type: import("vue").PropType<boolean | null | undefined>;
|
31
32
|
default: undefined;
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import { KG_BUTTON_TYPE } from '../../../consts';
|
1
2
|
declare const _default: import("vue").DefineComponent<{
|
2
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
3
4
|
kgVarName: import("vue").PropType<string | null>;
|
4
|
-
kgType: import("vue").PropType<
|
5
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
5
6
|
kgPrimary: {
|
6
7
|
type: import("vue").PropType<boolean | null | undefined>;
|
7
8
|
default: undefined;
|
@@ -18,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
18
19
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
19
20
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
20
21
|
kgVarName: import("vue").PropType<string | null>;
|
21
|
-
kgType: import("vue").PropType<
|
22
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
22
23
|
kgPrimary: {
|
23
24
|
type: import("vue").PropType<boolean | null | undefined>;
|
24
25
|
default: undefined;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { KG_BUTTON_COLOR } from '../../../consts';
|
1
|
+
import { KG_BUTTON_COLOR, KG_BUTTON_TYPE } from '../../../consts';
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
3
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
4
4
|
kgVarName: import("vue").PropType<string | null>;
|
5
|
-
kgType: import("vue").PropType<
|
5
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
6
6
|
kgPrimary: {
|
7
7
|
type: import("vue").PropType<boolean | null | undefined>;
|
8
8
|
default: undefined;
|
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
19
19
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
20
20
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
21
21
|
kgVarName: import("vue").PropType<string | null>;
|
22
|
-
kgType: import("vue").PropType<
|
22
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
23
23
|
kgPrimary: {
|
24
24
|
type: import("vue").PropType<boolean | null | undefined>;
|
25
25
|
default: undefined;
|
@@ -1,14 +1,15 @@
|
|
1
|
+
import { KG_BUTTON_TYPE } from '../../../consts';
|
1
2
|
declare const _default: import("vue").DefineComponent<{
|
2
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
3
4
|
kgVarName: import("vue").PropType<string | null>;
|
4
|
-
kgType: import("vue").PropType<
|
5
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
5
6
|
kgPrimary: {
|
6
7
|
type: import("vue").PropType<boolean | null | undefined>;
|
7
8
|
default: undefined;
|
8
9
|
};
|
9
10
|
kgIcon: import("vue").PropType<string | null>;
|
10
11
|
kgText: import("vue").PropType<string | null>;
|
11
|
-
kgColor: import("vue").PropType<import("
|
12
|
+
kgColor: import("vue").PropType<import("../../../consts").KG_BUTTON_COLOR | null>;
|
12
13
|
kgDisabled: {
|
13
14
|
type: import("vue").PropType<boolean | null | undefined>;
|
14
15
|
default: undefined;
|
@@ -18,14 +19,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
18
19
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
19
20
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
20
21
|
kgVarName: import("vue").PropType<string | null>;
|
21
|
-
kgType: import("vue").PropType<
|
22
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
22
23
|
kgPrimary: {
|
23
24
|
type: import("vue").PropType<boolean | null | undefined>;
|
24
25
|
default: undefined;
|
25
26
|
};
|
26
27
|
kgIcon: import("vue").PropType<string | null>;
|
27
28
|
kgText: import("vue").PropType<string | null>;
|
28
|
-
kgColor: import("vue").PropType<import("
|
29
|
+
kgColor: import("vue").PropType<import("../../../consts").KG_BUTTON_COLOR | null>;
|
29
30
|
kgDisabled: {
|
30
31
|
type: import("vue").PropType<boolean | null | undefined>;
|
31
32
|
default: undefined;
|
@@ -1,14 +1,15 @@
|
|
1
|
+
import { KG_BUTTON_TYPE } from '../../../consts';
|
1
2
|
declare const _default: import("vue").DefineComponent<{
|
2
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
3
4
|
kgVarName: import("vue").PropType<string | null>;
|
4
|
-
kgType: import("vue").PropType<
|
5
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
5
6
|
kgPrimary: {
|
6
7
|
type: import("vue").PropType<boolean | null | undefined>;
|
7
8
|
default: undefined;
|
8
9
|
};
|
9
10
|
kgIcon: import("vue").PropType<string | null>;
|
10
11
|
kgText: import("vue").PropType<string | null>;
|
11
|
-
kgColor: import("vue").PropType<import("
|
12
|
+
kgColor: import("vue").PropType<import("../../../consts").KG_BUTTON_COLOR | null>;
|
12
13
|
kgDisabled: {
|
13
14
|
type: import("vue").PropType<boolean | null | undefined>;
|
14
15
|
default: undefined;
|
@@ -18,14 +19,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
18
19
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
19
20
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
20
21
|
kgVarName: import("vue").PropType<string | null>;
|
21
|
-
kgType: import("vue").PropType<
|
22
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
22
23
|
kgPrimary: {
|
23
24
|
type: import("vue").PropType<boolean | null | undefined>;
|
24
25
|
default: undefined;
|
25
26
|
};
|
26
27
|
kgIcon: import("vue").PropType<string | null>;
|
27
28
|
kgText: import("vue").PropType<string | null>;
|
28
|
-
kgColor: import("vue").PropType<import("
|
29
|
+
kgColor: import("vue").PropType<import("../../../consts").KG_BUTTON_COLOR | null>;
|
29
30
|
kgDisabled: {
|
30
31
|
type: import("vue").PropType<boolean | null | undefined>;
|
31
32
|
default: undefined;
|
@@ -1,14 +1,15 @@
|
|
1
|
+
import { KG_BUTTON_TYPE } from '../../../consts';
|
1
2
|
declare const _default: import("vue").DefineComponent<{
|
2
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
3
4
|
kgVarName: import("vue").PropType<string | null>;
|
4
|
-
kgType: import("vue").PropType<
|
5
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
5
6
|
kgPrimary: {
|
6
7
|
type: import("vue").PropType<boolean | null | undefined>;
|
7
8
|
default: undefined;
|
8
9
|
};
|
9
10
|
kgIcon: import("vue").PropType<string | null>;
|
10
11
|
kgText: import("vue").PropType<string | null>;
|
11
|
-
kgColor: import("vue").PropType<import("
|
12
|
+
kgColor: import("vue").PropType<import("../../../consts").KG_BUTTON_COLOR | null>;
|
12
13
|
kgDisabled: {
|
13
14
|
type: import("vue").PropType<boolean | null | undefined>;
|
14
15
|
default: undefined;
|
@@ -18,14 +19,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
18
19
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
19
20
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
20
21
|
kgVarName: import("vue").PropType<string | null>;
|
21
|
-
kgType: import("vue").PropType<
|
22
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
22
23
|
kgPrimary: {
|
23
24
|
type: import("vue").PropType<boolean | null | undefined>;
|
24
25
|
default: undefined;
|
25
26
|
};
|
26
27
|
kgIcon: import("vue").PropType<string | null>;
|
27
28
|
kgText: import("vue").PropType<string | null>;
|
28
|
-
kgColor: import("vue").PropType<import("
|
29
|
+
kgColor: import("vue").PropType<import("../../../consts").KG_BUTTON_COLOR | null>;
|
29
30
|
kgDisabled: {
|
30
31
|
type: import("vue").PropType<boolean | null | undefined>;
|
31
32
|
default: undefined;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { KG_BUTTON_COLOR } from '../../../consts';
|
1
|
+
import { KG_BUTTON_COLOR, KG_BUTTON_TYPE } from '../../../consts';
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
3
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
4
4
|
kgVarName: import("vue").PropType<string | null>;
|
5
|
-
kgType: import("vue").PropType<
|
5
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
6
6
|
kgPrimary: {
|
7
7
|
type: import("vue").PropType<boolean | null | undefined>;
|
8
8
|
default: undefined;
|
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
19
19
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
20
20
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
21
21
|
kgVarName: import("vue").PropType<string | null>;
|
22
|
-
kgType: import("vue").PropType<
|
22
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
23
23
|
kgPrimary: {
|
24
24
|
type: import("vue").PropType<boolean | null | undefined>;
|
25
25
|
default: undefined;
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import { KG_BUTTON_TYPE } from '../../../consts';
|
1
2
|
declare const _default: import("vue").DefineComponent<{
|
2
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
3
4
|
kgVarName: import("vue").PropType<string | null>;
|
4
|
-
kgType: import("vue").PropType<
|
5
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
5
6
|
kgPrimary: {
|
6
7
|
type: import("vue").PropType<boolean | null | undefined>;
|
7
8
|
default: undefined;
|
@@ -18,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
18
19
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
19
20
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
20
21
|
kgVarName: import("vue").PropType<string | null>;
|
21
|
-
kgType: import("vue").PropType<
|
22
|
+
kgType: import("vue").PropType<KG_BUTTON_TYPE | null>;
|
22
23
|
kgPrimary: {
|
23
24
|
type: import("vue").PropType<boolean | null | undefined>;
|
24
25
|
default: undefined;
|
@@ -1,56 +1,104 @@
|
|
1
|
-
import {
|
2
|
-
import { IKgButtonClickCb, IKgButtonDeleteOkCb, IKgButtonImportOkCb, IKgButtonOtherOkCb,
|
3
|
-
|
1
|
+
import { KG_BUTTON_TYPE } from '../../consts';
|
2
|
+
import { IKgButtonClickCb, IKgButtonDeleteOkCb, IKgButtonEvent, IKgButtonImportOkCb, IKgButtonOtherOkCb, IKgButtonUpdateBeforeClickCb } from './index.store';
|
3
|
+
/**
|
4
|
+
* @param formID 界面标识.
|
5
|
+
*/
|
6
|
+
export declare function useKgButton(formID?: string | null): {
|
4
7
|
formID: string;
|
5
|
-
|
6
|
-
|
8
|
+
store: import("pinia").Store<"KgButton", {
|
9
|
+
isCreateClickInterceptedMap: Map<string, boolean>;
|
10
|
+
clickListenersMap: Map<string, IKgButtonClickCb[]>;
|
11
|
+
deleteOkListenersMap: Map<string, IKgButtonDeleteOkCb[]>;
|
12
|
+
importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
|
13
|
+
otherOkListenersMap: Map<string, IKgButtonOtherOkCb[]>;
|
14
|
+
submitCancelListenersMap: Map<string, import("./index.store").IKgButtonSubmitCancelCb[]>;
|
15
|
+
submitSaveListenersMap: Map<string, import("./index.store").IKgButtonSubmitSaveCb[]>;
|
16
|
+
updateBeforeClickListenersMap: Map<string, IKgButtonUpdateBeforeClickCb[]>;
|
17
|
+
}, {
|
18
|
+
getIsCreateClickIntercepted(state: {
|
19
|
+
isCreateClickInterceptedMap: Map<string, boolean>;
|
20
|
+
clickListenersMap: Map<string, IKgButtonClickCb[]>;
|
21
|
+
deleteOkListenersMap: Map<string, IKgButtonDeleteOkCb[]>;
|
22
|
+
importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
|
23
|
+
otherOkListenersMap: Map<string, IKgButtonOtherOkCb[]>;
|
24
|
+
submitCancelListenersMap: Map<string, import("./index.store").IKgButtonSubmitCancelCb[]>;
|
25
|
+
submitSaveListenersMap: Map<string, import("./index.store").IKgButtonSubmitSaveCb[]>;
|
26
|
+
updateBeforeClickListenersMap: Map<string, IKgButtonUpdateBeforeClickCb[]>;
|
27
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
28
|
+
isCreateClickInterceptedMap: Map<string, boolean>;
|
29
|
+
clickListenersMap: Map<string, IKgButtonClickCb[]>;
|
30
|
+
deleteOkListenersMap: Map<string, IKgButtonDeleteOkCb[]>;
|
31
|
+
importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
|
32
|
+
otherOkListenersMap: Map<string, IKgButtonOtherOkCb[]>;
|
33
|
+
submitCancelListenersMap: Map<string, import("./index.store").IKgButtonSubmitCancelCb[]>;
|
34
|
+
submitSaveListenersMap: Map<string, import("./index.store").IKgButtonSubmitSaveCb[]>;
|
35
|
+
updateBeforeClickListenersMap: Map<string, IKgButtonUpdateBeforeClickCb[]>;
|
36
|
+
}>): (param: {
|
37
|
+
formID: string;
|
38
|
+
}) => boolean;
|
39
|
+
}, {
|
40
|
+
dispose(formID: string | null | undefined): void;
|
41
|
+
addEventListener(formID: string, event: IKgButtonEvent, cb: import("./index.store").IKgButtonCb): void;
|
42
|
+
removeEventListener(formID: string, event: IKgButtonEvent, cb?: import("./index.store").IKgButtonCb | undefined): void;
|
43
|
+
emit(formID: string, event: IKgButtonEvent, param: any): Promise<boolean>;
|
44
|
+
setIsCreateClickIntercepted(param: {
|
45
|
+
formID: string;
|
46
|
+
isIntercepted: boolean;
|
47
|
+
}): void;
|
48
|
+
click(formID: string, type: KG_BUTTON_TYPE, variableName?: string | undefined): void;
|
49
|
+
}>;
|
7
50
|
/**
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
* @param
|
12
|
-
* @param
|
51
|
+
* <p>手动点击某个按钮.</p>
|
52
|
+
* <p>调用此方法相当于手动触发某个按钮的点击事件.</p>
|
53
|
+
*
|
54
|
+
* @param param.
|
55
|
+
* @param param.type 按钮类型.
|
56
|
+
* @param param.variableName 按钮变量名称.
|
13
57
|
*/
|
14
|
-
click(
|
58
|
+
click(param: {
|
59
|
+
type: KG_BUTTON_TYPE;
|
60
|
+
variableName?: string;
|
61
|
+
}): void;
|
15
62
|
/**
|
16
63
|
* 事件: 点击按钮.
|
17
64
|
* @param cb 回调函数.
|
18
65
|
* @param once 是否只会触发一次. 默认为 undefined.
|
19
66
|
*/
|
20
|
-
onClick(cb: IKgButtonClickCb, once?: boolean)
|
67
|
+
onClick: (cb: IKgButtonClickCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
21
68
|
/**
|
22
69
|
* 事件: 点击更新按钮之后, 执行默认逻辑之前. 如果返回 true, 则不再执行后续的默认逻辑.
|
23
70
|
* @param cb 回调函数.
|
24
71
|
* @param once 是否只会触发一次. 默认为 undefined.
|
25
72
|
*/
|
26
|
-
onUpdateBeforeClick(cb: IKgButtonUpdateBeforeClickCb, once?: boolean)
|
73
|
+
onUpdateBeforeClick: (cb: IKgButtonUpdateBeforeClickCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
27
74
|
/**
|
28
75
|
* 事件: 删除成功, 删除接口调用成功.
|
29
76
|
* @param cb 回调函数.
|
30
77
|
* @param once 是否只会触发一次. 默认为 undefined.
|
31
78
|
*/
|
32
|
-
onDeleteOk(cb: IKgButtonDeleteOkCb, once?: boolean)
|
79
|
+
onDeleteOk: (cb: IKgButtonDeleteOkCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
33
80
|
/**
|
34
81
|
* 事件: 导入成功, 导入接口调用成功.
|
35
82
|
* @param cb 回调函数.
|
36
83
|
* @param once 是否只会触发一次. 默认为 undefined.
|
37
84
|
*/
|
38
|
-
onImportOk(cb: IKgButtonImportOkCb, once?: boolean)
|
39
|
-
|
85
|
+
onImportOk: (cb: IKgButtonImportOkCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
86
|
+
/**
|
87
|
+
* 事件: other 类型的按钮接口调用成功.
|
88
|
+
* @param cb 回调函数.
|
89
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
90
|
+
*/
|
91
|
+
onOtherOk: (cb: IKgButtonOtherOkCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
40
92
|
/**
|
41
93
|
* 事件: 表格内编辑时, 点击保存按钮.
|
42
94
|
* @param cb 回调函数.
|
43
95
|
* @param once 是否只会触发一次. 默认为 undefined.
|
44
96
|
*/
|
45
|
-
onSubmitSave(cb:
|
97
|
+
onSubmitSave: (cb: IKgButtonDeleteOkCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
46
98
|
/**
|
47
99
|
* 事件: 表格内编辑时, 点击取消按钮.
|
48
100
|
* @param cb 回调函数.
|
49
101
|
* @param once 是否只会触发一次. 默认为 undefined.
|
50
102
|
*/
|
51
|
-
onSubmitCancel(cb:
|
103
|
+
onSubmitCancel: (cb: IKgButtonDeleteOkCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
52
104
|
};
|
53
|
-
/**
|
54
|
-
* @param formID 界面标识.
|
55
|
-
*/
|
56
|
-
export declare function useKgButton(formID?: string | null): IUseKgButton;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { StoreDefinition } from 'pinia';
|
2
1
|
import { VarButton } from '../../apis/WMS/models';
|
3
2
|
import { IKgEventCb, KG_BUTTON_TYPE } from '../../consts';
|
4
3
|
import { IKgTableRow } from '../KgTable';
|
@@ -42,17 +41,47 @@ export declare type IKgButtonSubmitSaveCb = (() => Promise<boolean>) & IKgEventC
|
|
42
41
|
export declare type IKgButtonSubmitCancelCb = (() => Promise<boolean>) & IKgEventCb;
|
43
42
|
export declare type IKgButtonCbParam = IKgButtonClickCbParam | IKgButtonUpdateBeforeClickCbParam | IKgButtonDeleteOkCbParam | IKgButtonImportOkCbParam | IKgButtonOtherOkCbParam | any;
|
44
43
|
export declare type IKgButtonCb = IKgButtonClickCb | IKgButtonUpdateBeforeClickCb | IKgButtonDeleteOkCb | IKgButtonImportOkCb | IKgButtonOtherOkCb | IKgButtonSubmitSaveCb | IKgButtonSubmitCancelCb;
|
45
|
-
export
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
44
|
+
export declare const useKgButtonStore: import("pinia").StoreDefinition<"KgButton", {
|
45
|
+
/**
|
46
|
+
* <p>创建按钮的 click 事件是否被拦截.</p>
|
47
|
+
* <p>用户调用 kgButton.onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被拦截了.</p>
|
48
|
+
* <p>被拦截之后, 创建按钮的默认逻辑不会执行(即打开提交弹窗, 并加载各种数据等等), 由用户自行处理.</p>
|
49
|
+
*/
|
50
|
+
isCreateClickInterceptedMap: Map<string, boolean>;
|
51
|
+
clickListenersMap: Map<string, IKgButtonClickCb[]>;
|
52
|
+
deleteOkListenersMap: Map<string, IKgButtonDeleteOkCb[]>;
|
53
|
+
importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
|
54
|
+
otherOkListenersMap: Map<string, IKgButtonOtherOkCb[]>;
|
55
|
+
submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
|
56
|
+
submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
|
57
|
+
updateBeforeClickListenersMap: Map<string, IKgButtonUpdateBeforeClickCb[]>;
|
58
|
+
}, {
|
59
|
+
getIsCreateClickIntercepted(state: {
|
60
|
+
isCreateClickInterceptedMap: Map<string, boolean>;
|
61
|
+
clickListenersMap: Map<string, IKgButtonClickCb[]>;
|
62
|
+
deleteOkListenersMap: Map<string, IKgButtonDeleteOkCb[]>;
|
63
|
+
importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
|
64
|
+
otherOkListenersMap: Map<string, IKgButtonOtherOkCb[]>;
|
65
|
+
submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
|
66
|
+
submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
|
67
|
+
updateBeforeClickListenersMap: Map<string, IKgButtonUpdateBeforeClickCb[]>;
|
68
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
69
|
+
/**
|
70
|
+
* <p>创建按钮的 click 事件是否被拦截.</p>
|
71
|
+
* <p>用户调用 kgButton.onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被拦截了.</p>
|
72
|
+
* <p>被拦截之后, 创建按钮的默认逻辑不会执行(即打开提交弹窗, 并加载各种数据等等), 由用户自行处理.</p>
|
73
|
+
*/
|
74
|
+
isCreateClickInterceptedMap: Map<string, boolean>;
|
75
|
+
clickListenersMap: Map<string, IKgButtonClickCb[]>;
|
76
|
+
deleteOkListenersMap: Map<string, IKgButtonDeleteOkCb[]>;
|
77
|
+
importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
|
78
|
+
otherOkListenersMap: Map<string, IKgButtonOtherOkCb[]>;
|
79
|
+
submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
|
80
|
+
submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
|
81
|
+
updateBeforeClickListenersMap: Map<string, IKgButtonUpdateBeforeClickCb[]>;
|
82
|
+
}>): (param: {
|
83
|
+
formID: string;
|
84
|
+
}) => boolean;
|
56
85
|
}, {
|
57
86
|
dispose(formID: string | null | undefined): void;
|
58
87
|
/**
|
@@ -77,13 +106,22 @@ export declare type IKgButtonStoreDefinition = StoreDefinition<'KgButton', IKgBu
|
|
77
106
|
*/
|
78
107
|
emit(formID: string, event: IKgButtonEvent, param: IKgButtonCbParam): Promise<boolean>;
|
79
108
|
/**
|
80
|
-
*
|
109
|
+
*
|
110
|
+
* @param param
|
111
|
+
* @param param.formID 界面标识.
|
112
|
+
* @param param.isIntercepted 是否拦截.
|
113
|
+
*/
|
114
|
+
setIsCreateClickIntercepted(param: {
|
115
|
+
formID: string;
|
116
|
+
isIntercepted: boolean;
|
117
|
+
}): void;
|
118
|
+
/**
|
119
|
+
* <p>手动点击某个按钮.</p>
|
120
|
+
* <p>调用此方法相当于手动触发某个按钮的点击事件.</p>
|
121
|
+
*
|
81
122
|
* @param formID 界面标识.
|
82
123
|
* @param type 按钮类型.
|
83
|
-
* @param
|
84
|
-
* @param args 数据.
|
124
|
+
* @param variableName 按钮变量名称.
|
85
125
|
*/
|
86
|
-
click(formID: string, type: KG_BUTTON_TYPE,
|
126
|
+
click(formID: string, type: KG_BUTTON_TYPE, variableName?: string): void;
|
87
127
|
}>;
|
88
|
-
export declare type IKgButtonStore = ReturnType<IKgButtonStoreDefinition>;
|
89
|
-
export declare const useKgButtonStore: () => IKgButtonStoreDefinition;
|