@kengic/vue 0.26.6-beta.98 → 0.26.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/card-text-outline.6e053122.mjs +8 -0
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +52291 -50331
- package/dist/project/build/vite/plugin/index.ts +0 -1
- package/dist/src/component/KgAppSelect/index.event.d.ts +17 -0
- package/dist/src/component/KgAppSelect/index.hooks.d.ts +13 -11
- package/dist/src/component/KgAppSelect/index.store.d.ts +6 -21
- package/dist/src/component/KgButton/index.event.d.ts +27 -0
- package/dist/src/component/KgButton/index.hooks.d.ts +8 -6
- package/dist/src/component/KgButton/index.store.d.ts +8 -32
- package/dist/src/component/KgCanvas/KgCanvas.ContextMenu.d.ts +0 -3
- package/dist/src/component/KgCanvas/KgCanvas.d.ts +15 -0
- package/dist/src/component/KgCanvas/KgCanvas.service.d.ts +2 -2
- package/dist/src/component/KgCanvas/index.event.d.ts +213 -0
- package/dist/src/component/KgCanvas/index.hooks.d.ts +18 -13
- package/dist/src/component/KgCanvas/index.store.d.ts +0 -229
- package/dist/src/component/KgCanvas/index.vm.d.ts +4 -0
- package/dist/src/component/KgForm/index.event.d.ts +191 -0
- package/dist/src/component/KgForm/index.hooks.d.ts +17 -9
- package/dist/src/component/KgForm/index.store.d.ts +11 -177
- package/dist/src/component/KgForm.Item/KgForm.Item.service.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.Checkbox.d.ts +3 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +3 -3
- package/dist/src/component/KgForm.Item/components/KgForm.Item.Date.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.DateRange.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.Input.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.InputNumber.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.InputPassword.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.Select.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.Switch.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.TextArea.d.ts +1 -1
- package/dist/src/component/KgSearch/KgSearch.service.d.ts +1 -1
- package/dist/src/component/KgSearch/index.event.d.ts +17 -0
- package/dist/src/component/KgSearch/index.hooks.d.ts +6 -5
- package/dist/src/component/KgSearch/index.store.d.ts +14 -29
- package/dist/src/component/KgSubmit/KgSubmit.service.d.ts +1 -1
- package/dist/src/component/KgSubmit/index.event.d.ts +105 -0
- package/dist/src/component/KgSubmit/index.hooks.d.ts +15 -13
- package/dist/src/component/KgSubmit/index.store.d.ts +13 -115
- package/dist/src/component/KgTable/KgTable.service.d.ts +2 -2
- package/dist/src/component/KgTable/index.event.d.ts +57 -0
- package/dist/src/component/KgTable/index.hooks.d.ts +13 -12
- package/dist/src/component/KgTable/index.store.d.ts +10 -63
- package/dist/src/component/KgVar/index.event.d.ts +60 -0
- package/dist/src/component/KgVar/index.hooks.d.ts +31 -3
- package/dist/src/component/KgVar/index.store.d.ts +1 -38
- package/dist/src/component/KgVar/index.vm.d.ts +16 -2
- package/dist/src/component/KgWarehouse/index.hooks.d.ts +3 -3
- package/dist/src/component/KgWarehouse/index.store.d.ts +6 -6
- package/dist/src/config/setup/setup.d.ts +1 -1
- package/dist/src/const/i18n/en.d.ts +1 -1
- package/dist/src/const/i18n/es_ES.d.ts +1 -1
- package/dist/src/const/i18n/fr_FR.d.ts +1 -1
- package/dist/src/const/i18n/km_KH.d.ts +1 -1
- package/dist/src/const/i18n/ko_KR.d.ts +1 -1
- package/dist/src/const/i18n/vi_VN.d.ts +1 -1
- package/dist/src/const/i18n/zh_CN.d.ts +1 -1
- package/dist/src/const/index.vm.d.ts +22 -24
- package/dist/src/const/injection-keys.const.d.ts +2 -0
- package/dist/src/index.d.ts +2 -2
- package/dist/src/util/index.d.ts +14 -0
- package/dist/src/util/kg-var.util.d.ts +14 -0
- package/dist/src/util/kg.util.d.ts +7 -5
- package/package.json +5 -4
- package/dist/src/component/KgSearch/components/KgSearch.ConfigModal.d.ts +0 -16
- package/dist/src/component/KgTable/components/setting/config/KgTable.Setting.ConfigModal.d.ts +0 -16
- package/dist/src/component/util.d.ts +0 -14
- /package/dist/{close-outlined-DMcSQWxQ.90085278.mjs → close-outlined-DMcSQWxQ.ecd794e3.mjs} +0 -0
- /package/dist/{fullscreen-exit-outlined-X1iYkFc4.7f925ac4.mjs → fullscreen-exit-outlined-X1iYkFc4.81ef5f5d.mjs} +0 -0
- /package/dist/{fullscreen-outlined-DDBrsRcy.3af91f63.mjs → fullscreen-outlined-DDBrsRcy.678cfca5.mjs} +0 -0
@@ -1,180 +1,14 @@
|
|
1
1
|
import { StoreDefinition } from 'pinia';
|
2
|
-
import {
|
3
|
-
import { IKgEventListener, KG_FORM_CONTEXT } from '../../const';
|
4
|
-
import { IKgTableRow } from '../KgTable';
|
5
|
-
/**
|
6
|
-
* 事件类型.
|
7
|
-
* 'change': 表单控件的值发生变更
|
8
|
-
* 'onSelectBeforeRequest': 即将发起查询请求, 如果返回 true 表示不会发起请求,
|
9
|
-
* 'selectBeforeSetDatas': 下拉列表查询请求成功, 列表数据尚未赋值. 此处可以对查询接口返回的列表数据作处理
|
10
|
-
* 'selectChange': 下拉列表选中某个(可能多个)数据
|
11
|
-
* 'lookupBeforeOpen': 查找弹窗打开之前
|
12
|
-
* 'lookupBeforeOk': 查找弹窗点击确定之前. 如果返回 true 则查找弹窗不会触发 kgOk 事件
|
13
|
-
* 'lookupOk': 查找弹窗点击确定
|
14
|
-
*/
|
15
|
-
export declare type IKgFormEvent = 'change' | 'onSelectBeforeRequest' | 'selectBeforeSetDatas' | 'selectChange' | 'lookupBeforeOpen' | 'lookupBeforeOk' | 'lookupOk';
|
16
|
-
export declare type IKgFormChangeEventListenerParameter = {
|
17
|
-
/**
|
18
|
-
* 表单控件所处环境.
|
19
|
-
*/
|
20
|
-
context: KG_FORM_CONTEXT;
|
21
|
-
/** @deprecated */
|
22
|
-
isCopying: boolean | null;
|
23
|
-
/** @deprecated */
|
24
|
-
isCreating: boolean | null;
|
25
|
-
/** @deprecated */
|
26
|
-
isDeleting: boolean | null;
|
27
|
-
/** @deprecated */
|
28
|
-
isUpdating: boolean | null;
|
29
|
-
/**
|
30
|
-
* 表单控件当前数据.
|
31
|
-
*/
|
32
|
-
value: any;
|
33
|
-
/**
|
34
|
-
* 变量名称.
|
35
|
-
*/
|
36
|
-
varName: string;
|
37
|
-
/** @deprecated */
|
38
|
-
variableName: string;
|
39
|
-
};
|
40
|
-
export declare type IKgFormChangeEventListener = ((param: IKgFormChangeEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
41
|
-
export declare type IKgFormSelectBeforeRequestEventListenerParameter = {
|
42
|
-
/**
|
43
|
-
* 表单控件所处环境.
|
44
|
-
*/
|
45
|
-
context: KG_FORM_CONTEXT;
|
46
|
-
/** 查询接口请求参数. */
|
47
|
-
params: Record<string, any>;
|
48
|
-
/** 查询接口返回的数据, 调用者可以直接修改该数据, 从而实现手动提供列表数据. */
|
49
|
-
response: Ref;
|
50
|
-
/**
|
51
|
-
* 变量名称.
|
52
|
-
*/
|
53
|
-
varName: string;
|
54
|
-
};
|
55
|
-
export declare type IKgFormSelectBeforeRequestEventListener = ((param: IKgFormSelectBeforeRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
56
|
-
export declare type IKgFormSelectBeforeSetDatasEventListenerParameter<T = any> = {
|
57
|
-
/**
|
58
|
-
* 表单控件所处环境.
|
59
|
-
*/
|
60
|
-
context: KG_FORM_CONTEXT;
|
61
|
-
/** 列表数据. */
|
62
|
-
datas: Ref<Array<T>>;
|
63
|
-
/** @deprecated */
|
64
|
-
isCopying: boolean | null;
|
65
|
-
/** @deprecated */
|
66
|
-
isCreating: boolean | null;
|
67
|
-
/** @deprecated */
|
68
|
-
isDeleting: boolean | null;
|
69
|
-
/** @deprecated */
|
70
|
-
isUpdating: boolean | null;
|
71
|
-
/** 变量名称. */
|
72
|
-
varName: string;
|
73
|
-
};
|
74
|
-
export declare type IKgFormSelectBeforeSetDatasEventListener = ((param: IKgFormSelectBeforeSetDatasEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
75
|
-
export declare type IKgFormSelectChangeEventListenerParameter = {
|
76
|
-
/**
|
77
|
-
* 表单控件所处环境.
|
78
|
-
*/
|
79
|
-
context: KG_FORM_CONTEXT;
|
80
|
-
/** @deprecated */
|
81
|
-
isCopying: boolean | null;
|
82
|
-
/** @deprecated */
|
83
|
-
isCreating: boolean | null;
|
84
|
-
/** @deprecated */
|
85
|
-
isDeleting: boolean | null;
|
86
|
-
/** 是否多选, 否则单选. */
|
87
|
-
isMultiple: boolean;
|
88
|
-
/** @deprecated */
|
89
|
-
isUpdating: boolean | null;
|
90
|
-
/** @deprecated */
|
91
|
-
model: Ref<Record<string, any> | null> | null;
|
92
|
-
/**
|
93
|
-
* 表单数据对象.
|
94
|
-
* @deprecated
|
95
|
-
*/
|
96
|
-
formModel: Ref<Record<string, any> | null> | null;
|
97
|
-
/** 选中的数据对象组成的数组, 如果是单选则数组中只有一个数据对象. */
|
98
|
-
rows: Array<any> | null;
|
99
|
-
/** 选中的数据组成的数组, 如果是单选则数组中只有一个数据. */
|
100
|
-
values: Array<any>;
|
101
|
-
/** 变量. */
|
102
|
-
var_nam: string;
|
103
|
-
};
|
104
|
-
export declare type IKgFormSelectChangeEventListener = ((param: IKgFormSelectChangeEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
105
|
-
export declare type IKgFormLookupBeforeOpenEventListenerParameter = {
|
106
|
-
/**
|
107
|
-
* 表单控件所处环境.
|
108
|
-
*/
|
109
|
-
context: KG_FORM_CONTEXT;
|
110
|
-
/** 查找弹出的界面标识. */
|
111
|
-
lookupFormID: string;
|
112
|
-
/** 变量. */
|
113
|
-
var_nam: string;
|
114
|
-
};
|
115
|
-
export declare type IKgFormLookupBeforeOpenEventListener = ((param: IKgFormLookupBeforeOpenEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
116
|
-
export declare type IKgFormLookupBeforeOkEventListenerParameter = {
|
117
|
-
/**
|
118
|
-
* 表单控件所处环境.
|
119
|
-
*/
|
120
|
-
context: KG_FORM_CONTEXT;
|
121
|
-
/** 是否多选, 否则单选. */
|
122
|
-
isMultiple: boolean;
|
123
|
-
/**
|
124
|
-
* 单选时, 勾选的那一行.
|
125
|
-
* @deprecated 请直接使用属性 rows.
|
126
|
-
*/
|
127
|
-
row?: IKgTableRow | null;
|
128
|
-
/** 勾选的所有行. */
|
129
|
-
rows?: Array<IKgTableRow> | null;
|
130
|
-
/**
|
131
|
-
* 单选时, 对应的一个值.
|
132
|
-
* @deprecated 请直接使用属性 values.
|
133
|
-
*/
|
134
|
-
value?: any | null;
|
135
|
-
/** 勾选的所有值. */
|
136
|
-
values?: Array<any> | null;
|
137
|
-
/** 变量. */
|
138
|
-
var_nam: string;
|
139
|
-
};
|
140
|
-
export declare type IKgFormLookupBeforeOkEventListener = ((param: IKgFormLookupBeforeOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
141
|
-
export declare type IKgFormLookupOkEventListenerParameter = {
|
142
|
-
/**
|
143
|
-
* 表单控件所处环境.
|
144
|
-
*/
|
145
|
-
context: KG_FORM_CONTEXT;
|
146
|
-
/** 是否多选, 否则单选. */
|
147
|
-
isMultiple: boolean;
|
148
|
-
/** 表单数据对象. */
|
149
|
-
model: ComputedRef<Record<string, any>>;
|
150
|
-
/**
|
151
|
-
* 单选时, 勾选的那一行.
|
152
|
-
* @deprecated 请直接使用属性 rows.
|
153
|
-
*/
|
154
|
-
row?: IKgTableRow | null;
|
155
|
-
/** 勾选的所有行. */
|
156
|
-
rows?: Array<IKgTableRow> | null;
|
157
|
-
/**
|
158
|
-
* 单选时, 对应的一个值.
|
159
|
-
* @deprecated 请直接使用属性 values.
|
160
|
-
*/
|
161
|
-
value?: any | null;
|
162
|
-
/** 勾选的所有值. */
|
163
|
-
values?: Array<any> | null;
|
164
|
-
/** 变量. */
|
165
|
-
var_nam: string;
|
166
|
-
};
|
167
|
-
export declare type IKgFormLookupOkEventListener = ((param: IKgFormLookupOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
168
|
-
export declare type IKgFormEventListenerParameter = IKgFormChangeEventListenerParameter | IKgFormSelectBeforeRequestEventListenerParameter | IKgFormSelectBeforeSetDatasEventListenerParameter | IKgFormSelectChangeEventListenerParameter | IKgFormLookupBeforeOpenEventListenerParameter | IKgFormLookupBeforeOkEventListenerParameter | IKgFormLookupOkEventListenerParameter;
|
169
|
-
export declare type IKgFormEventListener = IKgFormChangeEventListener | IKgFormSelectBeforeRequestEventListener | IKgFormSelectBeforeSetDatasEventListener | IKgFormSelectChangeEventListener | IKgFormLookupBeforeOpenEventListener | IKgFormLookupBeforeOkEventListener | IKgFormLookupOkEventListener;
|
2
|
+
import { IKgFormEvent, IKgFormEventListenerParameter, IKgFormOnBlurEventListener, IKgFormOnChangeEventListener, IKgFormOnLookupBeforeOkEventListener, IKgFormOnLookupBeforeOpenEventListener, IKgFormOnLookupOkEventListener, IKgFormOnSelectBeforeRequestEventListener, IKgFormOnSelectBeforeSetDatasEventListener, IKgFormOnSelectChangeEventListener } from './index.event';
|
170
3
|
export interface IUseKgFormStoreState {
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
4
|
+
onBlur: Map<string, Array<IKgFormOnBlurEventListener>>;
|
5
|
+
onChange: Map<string, Array<IKgFormOnChangeEventListener>>;
|
6
|
+
onLookupBeforeOk: Map<string, Array<IKgFormOnLookupBeforeOkEventListener>>;
|
7
|
+
onLookupBeforeOpen: Map<string, Array<IKgFormOnLookupBeforeOpenEventListener>>;
|
8
|
+
onLookupOk: Map<string, Array<IKgFormOnLookupOkEventListener>>;
|
9
|
+
onSelectBeforeRequest: Map<string, Array<IKgFormOnSelectBeforeRequestEventListener>>;
|
10
|
+
onSelectBeforeSetDatas: Map<string, Array<IKgFormOnSelectBeforeSetDatasEventListener>>;
|
11
|
+
onSelectChange: Map<string, Array<IKgFormOnSelectChangeEventListener>>;
|
178
12
|
}
|
179
13
|
export interface IUseKgFormStoreGetters {
|
180
14
|
}
|
@@ -205,9 +39,9 @@ export interface IUseKgFormStoreActions {
|
|
205
39
|
* 触发事件.
|
206
40
|
* @param formID 界面标识.
|
207
41
|
* @param event 事件名称.
|
208
|
-
* @param
|
42
|
+
* @param parameter 事件参数.
|
209
43
|
*/
|
210
|
-
emit<T = IKgFormEventListenerParameter>(formID: string | null | undefined, event: IKgFormEvent,
|
44
|
+
emit<T = IKgFormEventListenerParameter>(formID: string | null | undefined, event: IKgFormEvent, parameter: T): Promise<boolean>;
|
211
45
|
/**
|
212
46
|
* 退订事件监听.
|
213
47
|
* @param formID 界面标识.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { RuleObject } from 'ant-design-vue/es/form';
|
2
2
|
import { KgFormItemProps } from './index.vm';
|
3
|
-
export declare function
|
3
|
+
export declare function useFormRules(props: KgFormItemProps): {
|
4
4
|
/** 表单验证规则. */
|
5
5
|
formRules: import("vue").ComputedRef<RuleObject[]>;
|
6
6
|
isFormRulesChange: import("vue").Ref<boolean>;
|
@@ -6,6 +6,7 @@ import { KG_FORM_CONTEXT } from '../../../const';
|
|
6
6
|
declare const _default: import("vue").DefineComponent<{
|
7
7
|
kgVarName: {
|
8
8
|
type: import("vue").PropType<string>;
|
9
|
+
/** 是否勾选. */
|
9
10
|
required: boolean;
|
10
11
|
};
|
11
12
|
kgContext: {
|
@@ -44,9 +45,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
44
45
|
onKgSubmit: import("vue").PropType<() => void>;
|
45
46
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
46
47
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
47
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
48
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
48
49
|
kgVarName: {
|
49
50
|
type: import("vue").PropType<string>;
|
51
|
+
/** 是否勾选. */
|
50
52
|
required: boolean;
|
51
53
|
};
|
52
54
|
kgContext: {
|
@@ -19,8 +19,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
19
19
|
type: import("vue").PropType<boolean>;
|
20
20
|
default: boolean;
|
21
21
|
};
|
22
|
-
/** 是否全选. */
|
23
22
|
kgAllowClear: {
|
23
|
+
/** 是否全选. */
|
24
24
|
type: import("vue").PropType<boolean>;
|
25
25
|
default: undefined;
|
26
26
|
};
|
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
41
41
|
onKgSubmit: import("vue").PropType<() => void>;
|
42
42
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
43
43
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
44
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
44
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value" | "kgCheckboxGroupChange")[], "kgSubmit" | "update:value" | "kgCheckboxGroupChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
45
45
|
kgVarName: {
|
46
46
|
type: import("vue").PropType<string>;
|
47
47
|
required: boolean;
|
@@ -61,8 +61,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
61
61
|
type: import("vue").PropType<boolean>;
|
62
62
|
default: boolean;
|
63
63
|
};
|
64
|
-
/** 是否全选. */
|
65
64
|
kgAllowClear: {
|
65
|
+
/** 是否全选. */
|
66
66
|
type: import("vue").PropType<boolean>;
|
67
67
|
default: undefined;
|
68
68
|
};
|
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
41
41
|
onKgSubmit: import("vue").PropType<() => void>;
|
42
42
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
43
43
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
44
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
44
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
45
45
|
kgVarName: {
|
46
46
|
type: import("vue").PropType<string>;
|
47
47
|
required: boolean;
|
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
41
41
|
onKgSubmit: import("vue").PropType<() => void>;
|
42
42
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
43
43
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
44
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
44
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
45
45
|
kgVarName: {
|
46
46
|
type: import("vue").PropType<string>;
|
47
47
|
required: boolean;
|
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
40
|
onKgSubmit: import("vue").PropType<() => void>;
|
41
41
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
42
42
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
43
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
43
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
44
44
|
kgVarName: {
|
45
45
|
type: import("vue").PropType<string>;
|
46
46
|
required: boolean;
|
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
40
|
onKgSubmit: import("vue").PropType<() => void>;
|
41
41
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
42
42
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
43
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
43
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
44
44
|
kgVarName: {
|
45
45
|
type: import("vue").PropType<string>;
|
46
46
|
required: boolean;
|
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
40
|
onKgSubmit: import("vue").PropType<() => void>;
|
41
41
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
42
42
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
43
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
43
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
44
44
|
kgVarName: {
|
45
45
|
type: import("vue").PropType<string>;
|
46
46
|
required: boolean;
|
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
41
41
|
onKgSubmit: import("vue").PropType<() => void>;
|
42
42
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
43
43
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
44
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
44
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
45
45
|
kgVarName: {
|
46
46
|
type: import("vue").PropType<string>;
|
47
47
|
required: boolean;
|
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
40
|
onKgSubmit: import("vue").PropType<() => void>;
|
41
41
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
42
42
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
43
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
43
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgSelectChange" | "update:value" | "kgSelectDatasChange")[], "kgSubmit" | "kgSelectChange" | "update:value" | "kgSelectDatasChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
44
44
|
kgVarName: {
|
45
45
|
type: import("vue").PropType<string>;
|
46
46
|
required: boolean;
|
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
40
|
onKgSubmit: import("vue").PropType<() => void>;
|
41
41
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
42
42
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
43
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
43
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
44
44
|
kgVarName: {
|
45
45
|
type: import("vue").PropType<string>;
|
46
46
|
required: boolean;
|
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
40
|
onKgSubmit: import("vue").PropType<() => void>;
|
41
41
|
onKgSelectChange: import("vue").PropType<(value: any) => void>;
|
42
42
|
onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
|
43
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
43
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
44
44
|
kgVarName: {
|
45
45
|
type: import("vue").PropType<string>;
|
46
46
|
required: boolean;
|
@@ -24,7 +24,7 @@ export declare function _useHeight(param: {
|
|
24
24
|
maxHeight: import("vue").ComputedRef<number>;
|
25
25
|
minHeight: import("vue").ComputedRef<number>;
|
26
26
|
};
|
27
|
-
export declare function
|
27
|
+
export declare function useFormModel(param: {
|
28
28
|
kgResizableRef: Ref<any | null>;
|
29
29
|
formRef: Ref<FormInstance | null>;
|
30
30
|
}): {
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { IKgEventListener } from '@kengic/core.core';
|
2
|
+
import { IKgTableRequestParameter } from '../KgTable';
|
3
|
+
/**
|
4
|
+
* 事件类型.
|
5
|
+
* 'onReady': 查询字段初始完成, 组件渲染完成, 查询表单对象已经有值
|
6
|
+
* 'onSearch': 点击查询按钮, 并且表单验证通过
|
7
|
+
* 'onReset': 点击重置按钮
|
8
|
+
*/
|
9
|
+
export declare type IKgSearchEvent = 'onReady' | 'onSearch' | 'onReset';
|
10
|
+
export declare type IKgSearchOnReadyEventListenerParameter = {};
|
11
|
+
export declare type IKgSearchOnReadyEventListener = ((param: IKgSearchOnReadyEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
12
|
+
export declare type IKgSearchOnSearchEventListenerParameter = {} & IKgTableRequestParameter;
|
13
|
+
export declare type IKgSearchOnSearchEventListener = ((param: IKgSearchOnSearchEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
14
|
+
export declare type IKgSearchOnResetEventListenerParameter = {};
|
15
|
+
export declare type IKgSearchOnResetEventListener = ((param: IKgSearchOnResetEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
16
|
+
export declare type IKgSearchEventListenerParameter = IKgSearchOnReadyEventListenerParameter | IKgSearchOnSearchEventListenerParameter | IKgSearchOnResetEventListenerParameter;
|
17
|
+
export declare type IKgSearchEventListener = IKgSearchOnReadyEventListener | IKgSearchOnSearchEventListener | IKgSearchOnResetEventListener;
|
@@ -1,8 +1,9 @@
|
|
1
|
+
import { IRemoveEventListener } from '@kengic/core.core';
|
1
2
|
import { ComputedRef } from 'vue';
|
2
3
|
import { VarProfileDetail } from '../../api/WMS/models';
|
3
|
-
import { IRemoveEventListenerHandler } from '../../const';
|
4
4
|
import { IKgTableRequestParameter } from '../KgTable';
|
5
|
-
import {
|
5
|
+
import { IKgSearchOnReadyEventListener, IKgSearchOnResetEventListener, IKgSearchOnSearchEventListener } from './index.event';
|
6
|
+
import { IKgSearchStore } from './index.store';
|
6
7
|
export declare type IUseKgSearch = {
|
7
8
|
/**
|
8
9
|
* 当前查询字段列表.
|
@@ -39,19 +40,19 @@ export declare type IUseKgSearch = {
|
|
39
40
|
* @param listener 事件监听函数.
|
40
41
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
41
42
|
*/
|
42
|
-
onReady(listener:
|
43
|
+
onReady(listener: IKgSearchOnReadyEventListener, isOnce?: boolean): IRemoveEventListener;
|
43
44
|
/**
|
44
45
|
* 监听事件: reset, 点击重置按钮.
|
45
46
|
* @param listener 事件监听函数.
|
46
47
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
47
48
|
*/
|
48
|
-
onReset(listener:
|
49
|
+
onReset(listener: IKgSearchOnResetEventListener, isOnce?: boolean): IRemoveEventListener;
|
49
50
|
/**
|
50
51
|
* 监听事件: search, 点击查询按钮, 并且表单验证通过.
|
51
52
|
* @param listener 事件监听函数.
|
52
53
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
53
54
|
*/
|
54
|
-
onSearch(listener:
|
55
|
+
onSearch(listener: IKgSearchOnSearchEventListener, isOnce?: boolean): IRemoveEventListener;
|
55
56
|
/** 重置. */
|
56
57
|
reset(): void;
|
57
58
|
/** 查询. */
|
@@ -1,26 +1,11 @@
|
|
1
1
|
import { StoreDefinition } from 'pinia';
|
2
2
|
import { VarProfileMasterDTO } from '../../api/WMS/models';
|
3
|
-
import { IKgEventListener } from '../../const';
|
4
3
|
import { IKgTableRequestParameter } from '../KgTable';
|
5
|
-
|
6
|
-
* 事件类型.
|
7
|
-
* 'ready': 查询字段初始完成, 组件渲染完成, 查询表单对象已经有值
|
8
|
-
* 'search': 点击查询按钮, 并且表单验证通过
|
9
|
-
* 'reset': 点击重置按钮
|
10
|
-
*/
|
11
|
-
export declare type IKgSearchEvent = 'ready' | 'search' | 'reset';
|
12
|
-
export declare type IKgSearchReadyEventListenerParameter = {};
|
13
|
-
export declare type IKgSearchReadyEventListener = ((param: IKgSearchReadyEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
14
|
-
export declare type IKgSearchSearchEventListenerParameter = {} & IKgTableRequestParameter;
|
15
|
-
export declare type IKgSearchSearchEventListener = ((param: IKgSearchSearchEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
16
|
-
export declare type IKgSearchResetEventListenerParameter = {};
|
17
|
-
export declare type IKgSearchResetEventListener = ((param: IKgSearchResetEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
18
|
-
export declare type IKgSearchEventListenerParameter = IKgSearchReadyEventListenerParameter | IKgSearchSearchEventListenerParameter | IKgSearchResetEventListenerParameter;
|
19
|
-
export declare type IKgSearchEventListener = IKgSearchReadyEventListener | IKgSearchSearchEventListener | IKgSearchResetEventListener;
|
4
|
+
import { IKgSearchEvent, IKgSearchEventListenerParameter, IKgSearchOnReadyEventListener, IKgSearchOnResetEventListener, IKgSearchOnSearchEventListener } from './index.event';
|
20
5
|
/** 查询方法. */
|
21
|
-
export declare type
|
6
|
+
export declare type IKgSearchOnSearchFn = (param?: IKgTableRequestParameter) => void;
|
22
7
|
/** 重置方法. */
|
23
|
-
export declare type
|
8
|
+
export declare type IKgSearchOnResetFn = () => void;
|
24
9
|
export interface IUseKgSearchStoreState {
|
25
10
|
/**
|
26
11
|
* 高级查询操作符的表单数据对象.
|
@@ -33,15 +18,15 @@ export interface IUseKgSearchStoreState {
|
|
33
18
|
*/
|
34
19
|
isReadyMap: Map<string, boolean>;
|
35
20
|
/** 事件监听函数列表: ready. */
|
36
|
-
|
21
|
+
onReady: Map<string, Array<IKgSearchOnReadyEventListener>>;
|
37
22
|
/** 事件监听函数列表: reset. */
|
38
|
-
|
23
|
+
onReset: Map<string, Array<IKgSearchOnResetEventListener>>;
|
39
24
|
/** 事件监听函数列表: search. */
|
40
|
-
|
25
|
+
onSearch: Map<string, Array<IKgSearchOnSearchEventListener>>;
|
41
26
|
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
42
|
-
resetFnMap: Map<string,
|
27
|
+
resetFnMap: Map<string, IKgSearchOnResetFn>;
|
43
28
|
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
44
|
-
searchFnMap: Map<string,
|
29
|
+
searchFnMap: Map<string, IKgSearchOnSearchFn>;
|
45
30
|
}
|
46
31
|
export interface IUseKgSearchStoreGetters {
|
47
32
|
/**
|
@@ -67,13 +52,13 @@ export interface IUseKgSearchStoreGetters {
|
|
67
52
|
*
|
68
53
|
* @param formID 界面标识.
|
69
54
|
*/
|
70
|
-
getResetFn(): (formID: string | null | undefined) =>
|
55
|
+
getResetFn(): (formID: string | null | undefined) => IKgSearchOnResetFn | null;
|
71
56
|
/**
|
72
57
|
* 获取查询方法.
|
73
58
|
*
|
74
59
|
* @param formID 界面标识.
|
75
60
|
*/
|
76
|
-
getSearchFn(): (formID: string | null | undefined) =>
|
61
|
+
getSearchFn(): (formID: string | null | undefined) => IKgSearchOnSearchFn | null;
|
77
62
|
}
|
78
63
|
export interface IUseKgSearchStoreActions {
|
79
64
|
/**
|
@@ -92,9 +77,9 @@ export interface IUseKgSearchStoreActions {
|
|
92
77
|
* 触发事件.
|
93
78
|
* @param formID 界面标识.
|
94
79
|
* @param event 事件名称.
|
95
|
-
* @param
|
80
|
+
* @param parameter 事件参数.
|
96
81
|
*/
|
97
|
-
emit<T = IKgSearchEventListenerParameter>(formID: string, event: IKgSearchEvent,
|
82
|
+
emit<T = IKgSearchEventListenerParameter>(formID: string, event: IKgSearchEvent, parameter: T): Promise<boolean>;
|
98
83
|
/**
|
99
84
|
* 修改查询字段的高级查询操作符的部分属性.
|
100
85
|
*
|
@@ -134,13 +119,13 @@ export interface IUseKgSearchStoreActions {
|
|
134
119
|
* @param formID 界面标识.
|
135
120
|
* @param fn 重置方法.
|
136
121
|
*/
|
137
|
-
setResetFn(formID: string | null | undefined, fn?:
|
122
|
+
setResetFn(formID: string | null | undefined, fn?: IKgSearchOnResetFn | null): void;
|
138
123
|
/**
|
139
124
|
* 设置查询方法.
|
140
125
|
* @param formID 界面标识.
|
141
126
|
* @param fn 查询方法.
|
142
127
|
*/
|
143
|
-
setSearchFn(formID: string | null | undefined, fn?:
|
128
|
+
setSearchFn(formID: string | null | undefined, fn?: IKgSearchOnSearchFn | null): void;
|
144
129
|
}
|
145
130
|
export declare type IUseKgSearchStore = StoreDefinition<'KgSearch', IUseKgSearchStoreState, IUseKgSearchStoreGetters, IUseKgSearchStoreActions>;
|
146
131
|
export declare type IKgSearchStore = ReturnType<IUseKgSearchStore>;
|