@kengic/vue 0.21.1-beta.2 → 0.21.4-beta.0
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 +18792 -18409
- 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/KgForm/KgForm.d.ts +36 -36
- package/dist/src/components/KgForm/index.d.ts +48 -48
- package/dist/src/components/KgModal/KgModal.d.ts +428 -90
- 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/consts/index.d.ts +7 -3
- package/dist/src/helpers/ant-design-vue.d.ts +13 -13
- package/dist/src/helpers/tsx.helper.d.ts +16 -6
- package/dist/src/utils/kg.util.d.ts +2 -1
- package/package.json +1 -1
- 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;
|
@@ -4,11 +4,11 @@ export declare const getProps: () => {
|
|
4
4
|
layout: import("vue").PropType<"horizontal" | "inline" | "vertical">;
|
5
5
|
labelCol: {
|
6
6
|
type: import("vue").PropType<Partial<ExtractPropTypes<{
|
7
|
-
span: (
|
8
|
-
order: (
|
9
|
-
offset: (
|
10
|
-
push: (
|
11
|
-
pull: (
|
7
|
+
span: (NumberConstructor | StringConstructor)[];
|
8
|
+
order: (NumberConstructor | StringConstructor)[];
|
9
|
+
offset: (NumberConstructor | StringConstructor)[];
|
10
|
+
push: (NumberConstructor | StringConstructor)[];
|
11
|
+
pull: (NumberConstructor | StringConstructor)[];
|
12
12
|
xs: {
|
13
13
|
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
14
14
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
@@ -38,16 +38,16 @@ export declare const getProps: () => {
|
|
38
38
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
39
39
|
};
|
40
40
|
prefixCls: StringConstructor;
|
41
|
-
flex: (
|
41
|
+
flex: (NumberConstructor | StringConstructor)[];
|
42
42
|
}>> & import("vue").HTMLAttributes>;
|
43
43
|
};
|
44
44
|
wrapperCol: {
|
45
45
|
type: import("vue").PropType<Partial<ExtractPropTypes<{
|
46
|
-
span: (
|
47
|
-
order: (
|
48
|
-
offset: (
|
49
|
-
push: (
|
50
|
-
pull: (
|
46
|
+
span: (NumberConstructor | StringConstructor)[];
|
47
|
+
order: (NumberConstructor | StringConstructor)[];
|
48
|
+
offset: (NumberConstructor | StringConstructor)[];
|
49
|
+
push: (NumberConstructor | StringConstructor)[];
|
50
|
+
pull: (NumberConstructor | StringConstructor)[];
|
51
51
|
xs: {
|
52
52
|
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
53
53
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
@@ -77,7 +77,7 @@ export declare const getProps: () => {
|
|
77
77
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
78
78
|
};
|
79
79
|
prefixCls: StringConstructor;
|
80
|
-
flex: (
|
80
|
+
flex: (NumberConstructor | StringConstructor)[];
|
81
81
|
}>> & import("vue").HTMLAttributes>;
|
82
82
|
};
|
83
83
|
colon: {
|
@@ -140,11 +140,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
140
140
|
layout: import("vue").PropType<"horizontal" | "inline" | "vertical">;
|
141
141
|
labelCol: {
|
142
142
|
type: import("vue").PropType<Partial<ExtractPropTypes<{
|
143
|
-
span: (
|
144
|
-
order: (
|
145
|
-
offset: (
|
146
|
-
push: (
|
147
|
-
pull: (
|
143
|
+
span: (NumberConstructor | StringConstructor)[];
|
144
|
+
order: (NumberConstructor | StringConstructor)[];
|
145
|
+
offset: (NumberConstructor | StringConstructor)[];
|
146
|
+
push: (NumberConstructor | StringConstructor)[];
|
147
|
+
pull: (NumberConstructor | StringConstructor)[];
|
148
148
|
xs: {
|
149
149
|
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
150
150
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
@@ -174,16 +174,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
174
174
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
175
175
|
};
|
176
176
|
prefixCls: StringConstructor;
|
177
|
-
flex: (
|
177
|
+
flex: (NumberConstructor | StringConstructor)[];
|
178
178
|
}>> & import("vue").HTMLAttributes>;
|
179
179
|
};
|
180
180
|
wrapperCol: {
|
181
181
|
type: import("vue").PropType<Partial<ExtractPropTypes<{
|
182
|
-
span: (
|
183
|
-
order: (
|
184
|
-
offset: (
|
185
|
-
push: (
|
186
|
-
pull: (
|
182
|
+
span: (NumberConstructor | StringConstructor)[];
|
183
|
+
order: (NumberConstructor | StringConstructor)[];
|
184
|
+
offset: (NumberConstructor | StringConstructor)[];
|
185
|
+
push: (NumberConstructor | StringConstructor)[];
|
186
|
+
pull: (NumberConstructor | StringConstructor)[];
|
187
187
|
xs: {
|
188
188
|
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
189
189
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
@@ -213,7 +213,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
213
213
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
214
214
|
};
|
215
215
|
prefixCls: StringConstructor;
|
216
|
-
flex: (
|
216
|
+
flex: (NumberConstructor | StringConstructor)[];
|
217
217
|
}>> & import("vue").HTMLAttributes>;
|
218
218
|
};
|
219
219
|
colon: {
|
@@ -274,11 +274,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
274
274
|
layout: import("vue").PropType<"horizontal" | "inline" | "vertical">;
|
275
275
|
labelCol: {
|
276
276
|
type: import("vue").PropType<Partial<ExtractPropTypes<{
|
277
|
-
span: (
|
278
|
-
order: (
|
279
|
-
offset: (
|
280
|
-
push: (
|
281
|
-
pull: (
|
277
|
+
span: (NumberConstructor | StringConstructor)[];
|
278
|
+
order: (NumberConstructor | StringConstructor)[];
|
279
|
+
offset: (NumberConstructor | StringConstructor)[];
|
280
|
+
push: (NumberConstructor | StringConstructor)[];
|
281
|
+
pull: (NumberConstructor | StringConstructor)[];
|
282
282
|
xs: {
|
283
283
|
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
284
284
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
@@ -308,16 +308,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
308
308
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
309
309
|
};
|
310
310
|
prefixCls: StringConstructor;
|
311
|
-
flex: (
|
311
|
+
flex: (NumberConstructor | StringConstructor)[];
|
312
312
|
}>> & import("vue").HTMLAttributes>;
|
313
313
|
};
|
314
314
|
wrapperCol: {
|
315
315
|
type: import("vue").PropType<Partial<ExtractPropTypes<{
|
316
|
-
span: (
|
317
|
-
order: (
|
318
|
-
offset: (
|
319
|
-
push: (
|
320
|
-
pull: (
|
316
|
+
span: (NumberConstructor | StringConstructor)[];
|
317
|
+
order: (NumberConstructor | StringConstructor)[];
|
318
|
+
offset: (NumberConstructor | StringConstructor)[];
|
319
|
+
push: (NumberConstructor | StringConstructor)[];
|
320
|
+
pull: (NumberConstructor | StringConstructor)[];
|
321
321
|
xs: {
|
322
322
|
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
323
323
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
@@ -347,7 +347,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
347
347
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
348
348
|
};
|
349
349
|
prefixCls: StringConstructor;
|
350
|
-
flex: (
|
350
|
+
flex: (NumberConstructor | StringConstructor)[];
|
351
351
|
}>> & import("vue").HTMLAttributes>;
|
352
352
|
};
|
353
353
|
colon: {
|