@kengic/vue 0.23.3 → 0.23.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/kengic-vue.js +2047 -2036
- package/dist/src/components/KgAppSelect/index.hooks.d.ts +6 -6
- package/dist/src/components/KgAppSelect/index.store.d.ts +4 -4
- package/dist/src/components/KgButton/KgButton.Item.d.ts +3 -3
- package/dist/src/components/KgButton/KgButton.Item.data.d.ts +2 -2
- package/dist/src/components/KgButton/components/KgButton.Copy.d.ts +3 -3
- package/dist/src/components/KgButton/components/KgButton.Create.d.ts +3 -3
- package/dist/src/components/KgButton/components/KgButton.Delete.d.ts +3 -3
- package/dist/src/components/KgButton/components/KgButton.Export.d.ts +3 -3
- package/dist/src/components/KgButton/components/KgButton.Import.d.ts +3 -3
- package/dist/src/components/KgButton/components/KgButton.ImportTemplate.d.ts +3 -3
- package/dist/src/components/KgButton/components/KgButton.Other.d.ts +2 -2
- package/dist/src/components/KgButton/components/KgButton.Search.d.ts +3 -3
- package/dist/src/components/KgButton/components/KgButton.Update.d.ts +3 -3
- package/dist/src/components/KgButton/index.hooks.d.ts +39 -35
- package/dist/src/components/KgButton/index.store.d.ts +13 -12
- package/dist/src/components/KgForm/index.hooks.d.ts +17 -17
- package/dist/src/components/KgForm/index.store.d.ts +4 -4
- package/dist/src/components/KgSearch/index.hooks.d.ts +9 -9
- package/dist/src/components/KgSearch/index.store.d.ts +4 -4
- package/dist/src/components/KgSubmit/index.hooks.d.ts +31 -31
- package/dist/src/components/KgSubmit/index.store.d.ts +8 -8
- package/dist/src/components/KgTable/index.hooks.d.ts +24 -24
- package/dist/src/components/KgTable/index.store.d.ts +11 -5
- package/dist/src/components/KgVar/index.hooks.d.ts +6 -6
- package/dist/src/components/KgVar/index.store.d.ts +6 -7
- package/dist/src/components/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButton.d.ts +1 -1
- package/dist/src/components/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButtonConfig.d.ts +6 -12
- package/dist/src/components/KgWarehouse/index.hooks.d.ts +3 -3
- package/dist/src/components/KgWarehouse/index.store.d.ts +4 -4
- package/dist/src/components/util.d.ts +5 -5
- package/dist/src/consts/index.vm.d.ts +25 -2
- package/package.json +1 -1
@@ -27,15 +27,15 @@ export declare type IUseKgAppSelect = {
|
|
27
27
|
init(): void;
|
28
28
|
/**
|
29
29
|
* 监听事件: 进入某个模块.
|
30
|
-
* @param
|
31
|
-
* @param
|
30
|
+
* @param listener 事件监听函数.
|
31
|
+
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
32
32
|
*/
|
33
|
-
onGotoApp(
|
33
|
+
onGotoApp(listener: IKgAppSelectGotoAppEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
34
34
|
/**
|
35
35
|
* 监听事件: 进入某个地址.
|
36
|
-
* @param
|
37
|
-
* @param
|
36
|
+
* @param listener 事件监听函数.
|
37
|
+
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
38
38
|
*/
|
39
|
-
onGotoPath(
|
39
|
+
onGotoPath(listener: IKgAppSelectGotoPathEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
40
40
|
};
|
41
41
|
export declare function useKgAppSelect(): IUseKgAppSelect;
|
@@ -31,9 +31,9 @@ export interface IUseKgAppSelectStoreActions {
|
|
31
31
|
/**
|
32
32
|
* 注册事件监听.
|
33
33
|
* @param event 事件名称.
|
34
|
-
* @param
|
34
|
+
* @param listener 事件监听函数.
|
35
35
|
*/
|
36
|
-
addEventListener(event: IKgAppSelectEvent,
|
36
|
+
addEventListener(event: IKgAppSelectEvent, listener: IKgAppSelectEventListener): void;
|
37
37
|
/**
|
38
38
|
* 触发事件.
|
39
39
|
* @param event 事件名称.
|
@@ -65,9 +65,9 @@ export interface IUseKgAppSelectStoreActions {
|
|
65
65
|
/**
|
66
66
|
* 退订事件监听.
|
67
67
|
* @param event 事件名称.
|
68
|
-
* @param
|
68
|
+
* @param listener 事件监听函数.
|
69
69
|
*/
|
70
|
-
removeEventListener(event: IKgAppSelectEvent,
|
70
|
+
removeEventListener(event: IKgAppSelectEvent, listener?: IKgAppSelectEventListener): void;
|
71
71
|
}
|
72
72
|
export declare type IUseKgAppSelectStore = StoreDefinition<'KgAppSelect', IUseKgAppSelectStoreState, IUseKgAppSelectStoreGetters, IUseKgAppSelectStoreActions>;
|
73
73
|
export declare type IKgAppSelectStore = ReturnType<IUseKgAppSelectStore>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { KG__VAR_BUTTON__COLOR,
|
1
|
+
import { KG__VAR_BUTTON__COLOR, KG__VAR_BUTTON__TYPE } from '../../consts';
|
2
2
|
import './KgButton.Item.less';
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
4
4
|
kgButton: import("vue").PropType<import("../..").VarButton>;
|
@@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
14
14
|
default: undefined;
|
15
15
|
};
|
16
16
|
kgText: import("vue").PropType<string | null>;
|
17
|
-
kgType: import("vue").PropType<
|
17
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
18
18
|
kgVarName: import("vue").PropType<string | null>;
|
19
19
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
20
20
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -31,7 +31,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
31
31
|
default: undefined;
|
32
32
|
};
|
33
33
|
kgText: import("vue").PropType<string | null>;
|
34
|
-
kgType: import("vue").PropType<
|
34
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
35
35
|
kgVarName: import("vue").PropType<string | null>;
|
36
36
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
37
37
|
}>>, {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
2
2
|
import { VarButton } from '../../apis/WMS/models';
|
3
|
-
import { KG__VAR_BUTTON__COLOR,
|
3
|
+
import { KG__VAR_BUTTON__COLOR, KG__VAR_BUTTON__TYPE } from '../../consts';
|
4
4
|
export declare const getProps: () => {
|
5
5
|
/** 按钮. */
|
6
6
|
kgButton: PropType<VarButton>;
|
@@ -23,7 +23,7 @@ export declare const getProps: () => {
|
|
23
23
|
/** 文本. */
|
24
24
|
kgText: PropType<string | null>;
|
25
25
|
/** 按钮类型. */
|
26
|
-
kgType: PropType<
|
26
|
+
kgType: PropType<KG__VAR_BUTTON__TYPE | null>;
|
27
27
|
/** 变量名称. */
|
28
28
|
kgVarName: PropType<string | null>;
|
29
29
|
onKgClick: PropType<(args?: any) => Promise<boolean>>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { KG__VAR_BUTTON__TYPE } from '../../../consts';
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
3
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
4
4
|
kgColor: import("vue").PropType<import("../../../consts").KG__VAR_BUTTON__COLOR | null>;
|
@@ -13,7 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
13
13
|
default: undefined;
|
14
14
|
};
|
15
15
|
kgText: import("vue").PropType<string | null>;
|
16
|
-
kgType: import("vue").PropType<
|
16
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
17
17
|
kgVarName: import("vue").PropType<string | null>;
|
18
18
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
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<{
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
30
30
|
default: undefined;
|
31
31
|
};
|
32
32
|
kgText: import("vue").PropType<string | null>;
|
33
|
-
kgType: import("vue").PropType<
|
33
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
34
34
|
kgVarName: import("vue").PropType<string | null>;
|
35
35
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
36
36
|
}>>, {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { KG__VAR_BUTTON__COLOR,
|
1
|
+
import { KG__VAR_BUTTON__COLOR, KG__VAR_BUTTON__TYPE } from '../../../consts';
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
3
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
4
4
|
kgColor: import("vue").PropType<KG__VAR_BUTTON__COLOR | null>;
|
@@ -13,7 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
13
13
|
default: undefined;
|
14
14
|
};
|
15
15
|
kgText: import("vue").PropType<string | null>;
|
16
|
-
kgType: import("vue").PropType<
|
16
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
17
17
|
kgVarName: import("vue").PropType<string | null>;
|
18
18
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
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<{
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
30
30
|
default: undefined;
|
31
31
|
};
|
32
32
|
kgText: import("vue").PropType<string | null>;
|
33
|
-
kgType: import("vue").PropType<
|
33
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
34
34
|
kgVarName: import("vue").PropType<string | null>;
|
35
35
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
36
36
|
}>>, {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { KG__VAR_BUTTON__COLOR,
|
1
|
+
import { KG__VAR_BUTTON__COLOR, KG__VAR_BUTTON__TYPE } from '../../../consts';
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
3
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
4
4
|
kgColor: import("vue").PropType<KG__VAR_BUTTON__COLOR | null>;
|
@@ -13,7 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
13
13
|
default: undefined;
|
14
14
|
};
|
15
15
|
kgText: import("vue").PropType<string | null>;
|
16
|
-
kgType: import("vue").PropType<
|
16
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
17
17
|
kgVarName: import("vue").PropType<string | null>;
|
18
18
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
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<{
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
30
30
|
default: undefined;
|
31
31
|
};
|
32
32
|
kgText: import("vue").PropType<string | null>;
|
33
|
-
kgType: import("vue").PropType<
|
33
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
34
34
|
kgVarName: import("vue").PropType<string | null>;
|
35
35
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
36
36
|
}>>, {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { KG__VAR_BUTTON__TYPE } from '../../../consts';
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
3
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
4
4
|
kgColor: import("vue").PropType<import("../../../consts").KG__VAR_BUTTON__COLOR | null>;
|
@@ -13,7 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
13
13
|
default: undefined;
|
14
14
|
};
|
15
15
|
kgText: import("vue").PropType<string | null>;
|
16
|
-
kgType: import("vue").PropType<
|
16
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
17
17
|
kgVarName: import("vue").PropType<string | null>;
|
18
18
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
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<{
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
30
30
|
default: undefined;
|
31
31
|
};
|
32
32
|
kgText: import("vue").PropType<string | null>;
|
33
|
-
kgType: import("vue").PropType<
|
33
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
34
34
|
kgVarName: import("vue").PropType<string | null>;
|
35
35
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
36
36
|
}>>, {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { KG__VAR_BUTTON__TYPE } from '../../../consts';
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
3
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
4
4
|
kgColor: import("vue").PropType<import("../../../consts").KG__VAR_BUTTON__COLOR | null>;
|
@@ -13,7 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
13
13
|
default: undefined;
|
14
14
|
};
|
15
15
|
kgText: import("vue").PropType<string | null>;
|
16
|
-
kgType: import("vue").PropType<
|
16
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
17
17
|
kgVarName: import("vue").PropType<string | null>;
|
18
18
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
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<{
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
30
30
|
default: undefined;
|
31
31
|
};
|
32
32
|
kgText: import("vue").PropType<string | null>;
|
33
|
-
kgType: import("vue").PropType<
|
33
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
34
34
|
kgVarName: import("vue").PropType<string | null>;
|
35
35
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
36
36
|
}>>, {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { KG__VAR_BUTTON__TYPE } from '../../../consts';
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
3
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
4
4
|
kgColor: import("vue").PropType<import("../../../consts").KG__VAR_BUTTON__COLOR | null>;
|
@@ -13,7 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
13
13
|
default: undefined;
|
14
14
|
};
|
15
15
|
kgText: import("vue").PropType<string | null>;
|
16
|
-
kgType: import("vue").PropType<
|
16
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
17
17
|
kgVarName: import("vue").PropType<string | null>;
|
18
18
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
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<{
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
30
30
|
default: undefined;
|
31
31
|
};
|
32
32
|
kgText: import("vue").PropType<string | null>;
|
33
|
-
kgType: import("vue").PropType<
|
33
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
34
34
|
kgVarName: import("vue").PropType<string | null>;
|
35
35
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
36
36
|
}>>, {
|
@@ -13,7 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
13
13
|
default: undefined;
|
14
14
|
};
|
15
15
|
kgText: import("vue").PropType<string | null>;
|
16
|
-
kgType: import("vue").PropType<import("../../../consts").
|
16
|
+
kgType: import("vue").PropType<import("../../../consts").KG__VAR_BUTTON__TYPE | null>;
|
17
17
|
kgVarName: import("vue").PropType<string | null>;
|
18
18
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
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<{
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
30
30
|
default: undefined;
|
31
31
|
};
|
32
32
|
kgText: import("vue").PropType<string | null>;
|
33
|
-
kgType: import("vue").PropType<import("../../../consts").
|
33
|
+
kgType: import("vue").PropType<import("../../../consts").KG__VAR_BUTTON__TYPE | null>;
|
34
34
|
kgVarName: import("vue").PropType<string | null>;
|
35
35
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
36
36
|
}>>, {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { KG__VAR_BUTTON__COLOR,
|
1
|
+
import { KG__VAR_BUTTON__COLOR, KG__VAR_BUTTON__TYPE } from '../../../consts';
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
3
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
4
4
|
kgColor: import("vue").PropType<KG__VAR_BUTTON__COLOR | null>;
|
@@ -13,7 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
13
13
|
default: undefined;
|
14
14
|
};
|
15
15
|
kgText: import("vue").PropType<string | null>;
|
16
|
-
kgType: import("vue").PropType<
|
16
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
17
17
|
kgVarName: import("vue").PropType<string | null>;
|
18
18
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
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<{
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
30
30
|
default: undefined;
|
31
31
|
};
|
32
32
|
kgText: import("vue").PropType<string | null>;
|
33
|
-
kgType: import("vue").PropType<
|
33
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
34
34
|
kgVarName: import("vue").PropType<string | null>;
|
35
35
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
36
36
|
}>>, {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { KG__VAR_BUTTON__TYPE } from '../../../consts';
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
3
3
|
kgButton: import("vue").PropType<import("../../..").VarButton>;
|
4
4
|
kgColor: import("vue").PropType<import("../../../consts").KG__VAR_BUTTON__COLOR | null>;
|
@@ -13,7 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
13
13
|
default: undefined;
|
14
14
|
};
|
15
15
|
kgText: import("vue").PropType<string | null>;
|
16
|
-
kgType: import("vue").PropType<
|
16
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
17
17
|
kgVarName: import("vue").PropType<string | null>;
|
18
18
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
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<{
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
30
30
|
default: undefined;
|
31
31
|
};
|
32
32
|
kgText: import("vue").PropType<string | null>;
|
33
|
-
kgType: import("vue").PropType<
|
33
|
+
kgType: import("vue").PropType<KG__VAR_BUTTON__TYPE | null>;
|
34
34
|
kgVarName: import("vue").PropType<string | null>;
|
35
35
|
onKgClick: import("vue").PropType<(args?: any) => Promise<boolean>>;
|
36
36
|
}>>, {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ComputedRef } from 'vue';
|
2
|
-
import { IRemoveEventListenerHandler,
|
2
|
+
import { IRemoveEventListenerHandler, KG__VAR_BUTTON__TYPE } from '../../consts';
|
3
3
|
import { IKgButtonClickEventListener, IKgButtonImportOkEventListener, IKgButtonStore, IKgButtonSubmitCancelEventListener, IKgButtonSubmitSaveEventListener } from './index.store';
|
4
4
|
export interface IUseKgButton {
|
5
5
|
/**
|
@@ -10,7 +10,7 @@ export interface IUseKgButton {
|
|
10
10
|
* @param param.variableName 按钮变量名称.
|
11
11
|
*/
|
12
12
|
click(param: {
|
13
|
-
type:
|
13
|
+
type: KG__VAR_BUTTON__TYPE;
|
14
14
|
variableName?: string;
|
15
15
|
}): void;
|
16
16
|
/**
|
@@ -23,26 +23,26 @@ export interface IUseKgButton {
|
|
23
23
|
formID: string;
|
24
24
|
/**
|
25
25
|
* <p>判断某个按钮的 click 事件是否被拦截.</p>
|
26
|
-
* <p>用户调用 <code>kgVar.kgButton.onClick(
|
26
|
+
* <p>用户调用 <code>kgVar.kgButton.onClick(listener)</code> 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
|
27
27
|
* <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
|
28
28
|
*
|
29
29
|
* <ul>
|
30
30
|
* <li>
|
31
|
-
* <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link
|
32
|
-
* <p>调用方式如下: <code>isClickIntercepted({ type:
|
31
|
+
* <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG__VAR_BUTTON__TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
|
32
|
+
* <p>调用方式如下: <code>isClickIntercepted({ type: KG__VAR_BUTTON__TYPE.CREATE });</code></p>
|
33
33
|
* </li>
|
34
34
|
* <li>
|
35
|
-
* <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link
|
35
|
+
* <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG__VAR_BUTTON__TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
|
36
36
|
* <p>根据参数 {@link param.varName} 获取按钮.</p>
|
37
37
|
* <p>调用方式如下: <code>isClickIntercepted({ varName: 'SOME-OTHER-BUTTON' });</code></p>
|
38
38
|
* </li>
|
39
39
|
* </ul>
|
40
40
|
*
|
41
|
-
* @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link
|
41
|
+
* @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG__VAR_BUTTON__TYPE}.</p>
|
42
42
|
* @param param.varName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
|
43
43
|
*/
|
44
44
|
isClickIntercepted(param: {
|
45
|
-
type?:
|
45
|
+
type?: KG__VAR_BUTTON__TYPE;
|
46
46
|
varName?: string | null;
|
47
47
|
}): boolean;
|
48
48
|
/**
|
@@ -50,21 +50,21 @@ export interface IUseKgButton {
|
|
50
50
|
*
|
51
51
|
* <ul>
|
52
52
|
* <li>
|
53
|
-
* <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link
|
54
|
-
* <p>调用方式如下: <code>isCurrentButton({ type:
|
53
|
+
* <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG__VAR_BUTTON__TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
|
54
|
+
* <p>调用方式如下: <code>isCurrentButton({ type: KG__VAR_BUTTON__TYPE.CREATE });</code></p>
|
55
55
|
* </li>
|
56
56
|
* <li>
|
57
|
-
* <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link
|
57
|
+
* <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG__VAR_BUTTON__TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
|
58
58
|
* <p>根据参数 {@link param.varName} 获取按钮.</p>
|
59
59
|
* <p>调用方式如下: <code>isCurrentButton({ varName: 'SOME-OTHER-BUTTON' });</code></p>
|
60
60
|
* </li>
|
61
61
|
* </ul>
|
62
62
|
*
|
63
|
-
* @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link
|
63
|
+
* @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG__VAR_BUTTON__TYPE}.</p>
|
64
64
|
* @param param.varName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
|
65
65
|
*/
|
66
66
|
isCurrentButton(param: {
|
67
|
-
type?:
|
67
|
+
type?: KG__VAR_BUTTON__TYPE;
|
68
68
|
varName?: string;
|
69
69
|
}): boolean;
|
70
70
|
/**
|
@@ -78,31 +78,31 @@ export interface IUseKgButton {
|
|
78
78
|
/**
|
79
79
|
* 监听事件: 点击按钮.
|
80
80
|
*
|
81
|
-
* @param
|
82
|
-
* @param
|
81
|
+
* @param listener 事件监听函数.
|
82
|
+
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
83
83
|
*/
|
84
|
-
onClick(
|
84
|
+
onClick(listener: IKgButtonClickEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
85
85
|
/**
|
86
86
|
* 监听事件: 导入成功, 导入接口调用成功.
|
87
87
|
*
|
88
|
-
* @param
|
89
|
-
* @param
|
88
|
+
* @param listener 事件监听函数.
|
89
|
+
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
90
90
|
*/
|
91
|
-
onImportOk(
|
91
|
+
onImportOk(listener: IKgButtonImportOkEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
92
92
|
/**
|
93
93
|
* 监听事件: 表格内编辑时, 点击取消按钮.
|
94
94
|
*
|
95
|
-
* @param
|
96
|
-
* @param
|
95
|
+
* @param listener 事件监听函数.
|
96
|
+
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
97
97
|
*/
|
98
|
-
onSubmitCancel(
|
98
|
+
onSubmitCancel(listener: IKgButtonSubmitCancelEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
99
99
|
/**
|
100
100
|
* 监听事件: 表格内编辑时, 点击保存按钮.
|
101
101
|
*
|
102
|
-
* @param
|
103
|
-
* @param
|
102
|
+
* @param listener 事件监听函数.
|
103
|
+
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
104
104
|
*/
|
105
|
-
onSubmitSave(
|
105
|
+
onSubmitSave(listener: IKgButtonSubmitSaveEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
106
106
|
/**
|
107
107
|
* <p>「查询按钮」.</p>
|
108
108
|
*/
|
@@ -116,21 +116,21 @@ export interface IUseKgButton {
|
|
116
116
|
* <p>调用方式如下: <code>setCurrentButton(null);</code></p>
|
117
117
|
* </li>
|
118
118
|
* <li>
|
119
|
-
* <p>否则, 如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link
|
120
|
-
* <p>调用方式如下: <code>setCurrentButton({ type:
|
119
|
+
* <p>否则, 如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG__VAR_BUTTON__TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
|
120
|
+
* <p>调用方式如下: <code>setCurrentButton({ type: KG__VAR_BUTTON__TYPE.CREATE });</code></p>
|
121
121
|
* </li>
|
122
122
|
* <li>
|
123
|
-
* <p>否则, 如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link
|
123
|
+
* <p>否则, 如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG__VAR_BUTTON__TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
|
124
124
|
* <p>根据参数 {@link param.varName} 获取按钮.</p>
|
125
125
|
* <p>调用方式如下: <code>setCurrentButton({ varName: 'SOME-OTHER-BUTTON' });</code></p>
|
126
126
|
* </li>
|
127
127
|
* </ul>
|
128
128
|
*
|
129
|
-
* @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link
|
129
|
+
* @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG__VAR_BUTTON__TYPE}.</p>
|
130
130
|
* @param param.varName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
|
131
131
|
*/
|
132
132
|
setCurrentButton(param: {
|
133
|
-
type?:
|
133
|
+
type?: KG__VAR_BUTTON__TYPE;
|
134
134
|
varName?: string | null;
|
135
135
|
} | null): Promise<void>;
|
136
136
|
/**
|
@@ -138,23 +138,23 @@ export interface IUseKgButton {
|
|
138
138
|
*
|
139
139
|
* <ul>
|
140
140
|
* <li>
|
141
|
-
* <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link
|
142
|
-
* <p>调用方式如下: <code>setIsClickIntercepted({ type:
|
141
|
+
* <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG__VAR_BUTTON__TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
|
142
|
+
* <p>调用方式如下: <code>setIsClickIntercepted({ type: KG__VAR_BUTTON__TYPE.CREATE, isIntercepted: true });</code></p>
|
143
143
|
* </li>
|
144
144
|
* <li>
|
145
|
-
* <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link
|
145
|
+
* <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG__VAR_BUTTON__TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
|
146
146
|
* <p>根据参数 {@link param.varName} 获取按钮.</p>
|
147
147
|
* <p>调用方式如下: <code>setIsClickIntercepted({ varName: 'SOME-OTHER-BUTTON', isIntercepted: true });</code></p>
|
148
148
|
* </li>
|
149
149
|
* </ul>
|
150
150
|
*
|
151
151
|
* @param param.isIntercepted 是否被拦截.
|
152
|
-
* @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link
|
152
|
+
* @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG__VAR_BUTTON__TYPE}.</p>
|
153
153
|
* @param param.varName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
|
154
154
|
*/
|
155
155
|
setIsClickIntercepted(param: {
|
156
156
|
isIntercepted: boolean;
|
157
|
-
type?:
|
157
|
+
type?: KG__VAR_BUTTON__TYPE;
|
158
158
|
varName?: string | null;
|
159
159
|
}): void;
|
160
160
|
/**
|
@@ -169,6 +169,10 @@ export interface IUseKgButton {
|
|
169
169
|
* 状态数据.
|
170
170
|
*/
|
171
171
|
store: IKgButtonStore;
|
172
|
+
/**
|
173
|
+
* 按钮配置.
|
174
|
+
*/
|
175
|
+
varButtonConfig: ComputedRef<ReturnType<IKgButtonStore['getVarButtonConfig']>>;
|
172
176
|
/**
|
173
177
|
* 所有按钮.
|
174
178
|
*/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { StoreDefinition } from 'pinia';
|
2
|
-
import { VarButton } from '../../apis/WMS/models';
|
3
|
-
import { IKgEventListener,
|
2
|
+
import { VarButton, VarButtonConfig } from '../../apis/WMS/models';
|
3
|
+
import { IKgEventListener, KG__VAR_BUTTON__TYPE } from '../../consts';
|
4
4
|
/**
|
5
5
|
* 事件类型.
|
6
6
|
* 'click': 点击按钮
|
@@ -36,7 +36,7 @@ export interface IUseKgButtonStoreState {
|
|
36
36
|
importOkEventListenersMap: Map<string, Array<IKgButtonImportOkEventListener>>;
|
37
37
|
/**
|
38
38
|
* <p>按钮的 click 事件是否被拦截.</p>
|
39
|
-
* <p>用户调用 kgVar.kgButton.onClick(
|
39
|
+
* <p>用户调用 kgVar.kgButton.onClick(listener) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
|
40
40
|
* <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
|
41
41
|
*/
|
42
42
|
isClickInterceptedMap: Map<string, boolean>;
|
@@ -51,14 +51,15 @@ export interface IUseKgButtonStoreState {
|
|
51
51
|
export interface IUseKgButtonStoreGetters {
|
52
52
|
getCurrentButton(): (formID: string | null | undefined) => VarButton | null;
|
53
53
|
getSearchButton(): (formID: string | null | undefined) => VarButton | null;
|
54
|
+
getVarButtonConfig(): (formID: string | null | undefined) => VarButtonConfig | null;
|
54
55
|
getVarButtons(): (formID: string | null | undefined) => Array<VarButton>;
|
55
56
|
isClickIntercepted(): (formID: string | undefined | null, param: {
|
56
|
-
type?:
|
57
|
+
type?: KG__VAR_BUTTON__TYPE;
|
57
58
|
varName?: string | null;
|
58
59
|
}) => boolean;
|
59
60
|
isCurrentButton(): (formID: string, param: {
|
60
61
|
varName?: string;
|
61
|
-
type?:
|
62
|
+
type?: KG__VAR_BUTTON__TYPE;
|
62
63
|
}) => boolean;
|
63
64
|
isCurrentButtonRequesting(): (formID: string | undefined | null) => boolean;
|
64
65
|
}
|
@@ -67,9 +68,9 @@ export interface IUseKgButtonStoreActions {
|
|
67
68
|
* 注册事件监听.
|
68
69
|
* @param formID 界面标识.
|
69
70
|
* @param event 事件名称.
|
70
|
-
* @param
|
71
|
+
* @param listener 事件监听函数.
|
71
72
|
*/
|
72
|
-
addEventListener(formID: string, event: IKgButtonEvent,
|
73
|
+
addEventListener(formID: string, event: IKgButtonEvent, listener: IKgButtonEventListener): void;
|
73
74
|
/**
|
74
75
|
* <p>手动点击某个按钮.</p>
|
75
76
|
* <p>调用此方法相当于手动触发某个按钮的点击事件.</p>
|
@@ -78,7 +79,7 @@ export interface IUseKgButtonStoreActions {
|
|
78
79
|
* @param type 按钮类型.
|
79
80
|
* @param variableName 按钮变量名称.
|
80
81
|
*/
|
81
|
-
click(formID: string, type:
|
82
|
+
click(formID: string, type: KG__VAR_BUTTON__TYPE, variableName?: string): void;
|
82
83
|
dispose(formID: string | null | undefined): void;
|
83
84
|
/**
|
84
85
|
* 触发事件.
|
@@ -91,16 +92,16 @@ export interface IUseKgButtonStoreActions {
|
|
91
92
|
* 退订事件监听.
|
92
93
|
* @param formID 界面标识.
|
93
94
|
* @param event 事件名称.
|
94
|
-
* @param
|
95
|
+
* @param listener 事件监听函数.
|
95
96
|
*/
|
96
|
-
removeEventListener(formID: string, event: IKgButtonEvent,
|
97
|
+
removeEventListener(formID: string, event: IKgButtonEvent, listener?: IKgButtonEventListener): void;
|
97
98
|
setCurrentButton(formID: string, param: {
|
98
|
-
type?:
|
99
|
+
type?: KG__VAR_BUTTON__TYPE;
|
99
100
|
varName?: string | null;
|
100
101
|
} | null): Promise<void>;
|
101
102
|
setIsClickIntercepted(formID: string | undefined | null, param: {
|
102
103
|
isIntercepted: boolean;
|
103
|
-
type?:
|
104
|
+
type?: KG__VAR_BUTTON__TYPE;
|
104
105
|
varName?: string | null;
|
105
106
|
}): void;
|
106
107
|
setIsCurrentButtonRequesting(formID: string | undefined | null, param: {
|