@kengic/vue 0.23.0 → 0.23.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +4 -0
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +6479 -5667
- package/dist/project/build/script/buildConf.ts +1 -2
- package/dist/project/build/script/postBuild.ts +1 -1
- package/dist/project/src/api/sys/model/userModel.ts +1 -0
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/index.d.ts +0 -7
- package/dist/src/apis/WMS/Controllers/VarConfigPossibilityController/ExecuteQuery.d.ts +18 -0
- package/dist/src/apis/WMS/Controllers/VarConfigPossibilityController/index.d.ts +1 -0
- package/dist/src/apis/WMS/Controllers/index.d.ts +1 -0
- package/dist/src/apis/WMS/models.d.ts +20 -4
- package/dist/src/components/KgAppSelect/index.hooks.d.ts +3 -3
- package/dist/src/components/KgAppSelect/index.store.d.ts +30 -29
- package/dist/src/components/KgButton/KgButton.d.ts +18 -12
- package/dist/src/components/KgButton/index.d.ts +4 -4
- package/dist/src/components/KgButton/index.hooks.d.ts +7 -5
- package/dist/src/components/KgButton/index.store.d.ts +19 -16
- package/dist/src/components/KgForm/index.hooks.d.ts +21 -8
- package/dist/src/components/KgForm/index.store.d.ts +74 -34
- package/dist/src/components/KgForm.Item/KgForm.Item.d.ts +3 -3
- package/dist/src/components/KgForm.Item/KgForm.Item.service.d.ts +3 -3
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Checkbox.d.ts +8 -7
- package/dist/src/components/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +6 -7
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Date.d.ts +6 -5
- package/dist/src/components/KgForm.Item/components/KgForm.Item.DateRange.d.ts +6 -5
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Image.d.ts +3 -3
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Input.d.ts +6 -5
- package/dist/src/components/KgForm.Item/components/KgForm.Item.InputNumber.d.ts +6 -5
- package/dist/src/components/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +6 -5
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.d.ts +7 -3
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.service.d.ts +16 -13
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Switch.d.ts +6 -5
- package/dist/src/components/KgForm.Item/components/KgForm.Item.TextArea.d.ts +6 -5
- package/dist/src/components/KgForm.Item/index.d.ts +1 -1
- package/dist/src/components/KgForm.Item/index.vm.d.ts +9 -7
- package/dist/src/components/KgResizable/KgResizable.d.ts +52 -52
- package/dist/src/components/KgSearch/KgSearch.d.ts +0 -16
- package/dist/src/components/KgSearch/KgSearch.service.d.ts +20 -16
- package/dist/src/components/KgSearch/index.hooks.d.ts +33 -9
- package/dist/src/components/KgSearch/index.store.d.ts +44 -37
- package/dist/src/components/KgSubmit/index.hooks.d.ts +48 -15
- package/dist/src/components/KgSubmit/index.store.d.ts +44 -45
- package/dist/src/components/KgSubmit/index.vm.d.ts +2 -1
- package/dist/src/components/KgTable/components/setting/KgTable.Setting.service.d.ts +1 -1
- package/dist/src/components/KgTable/index.hooks.d.ts +23 -8
- package/dist/src/components/KgTable/index.store.d.ts +48 -34
- package/dist/src/components/KgTable/index.vm.d.ts +1 -1
- package/dist/src/components/KgVar/index.hooks.d.ts +9 -11
- package/dist/src/components/KgVar/index.store.d.ts +51 -60
- package/dist/src/components/KgVar/index.store.service.d.ts +2 -1
- package/dist/src/components/KgVar/index.vm.d.ts +7 -7
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigInput.d.ts +2 -0
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigLookup.d.ts +2 -0
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigPossibility.d.ts +2 -0
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigTip.d.ts +2 -0
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarVariable.d.ts +2 -0
- package/dist/src/components/KgVarConfig/index.store.d.ts +23 -16
- package/dist/src/components/KgVarConfig/index.vm.d.ts +32 -0
- package/dist/src/components/KgWarehouse/index.hooks.d.ts +10 -6
- package/dist/src/components/KgWarehouse/index.store.d.ts +15 -14
- package/dist/src/components/util.d.ts +7 -7
- package/dist/src/consts/i18n/en.d.ts +10 -7
- package/dist/src/consts/i18n/zh_CN.d.ts +10 -7
- package/dist/src/consts/index.d.ts +0 -284
- package/dist/src/consts/index.vm.d.ts +425 -24
- package/dist/src/pages/KgPageDda/components/KgPageDda.Create.store.d.ts +6 -0
- package/dist/src/utils/kg-var.util.d.ts +4 -3
- package/dist/src/utils/kg.util.d.ts +11 -14
- package/package.json +2 -2
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/Delete.d.ts +0 -18
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/DeleteBatch.d.ts +0 -18
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/Edit.d.ts +0 -16
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/ExportXls.d.ts +0 -30
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/ImportExcel.d.ts +0 -15
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/List.d.ts +0 -37
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/QueryById.d.ts +0 -19
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.CreateModal.d.ts +0 -32
- /package/dist/src/components/KgTable/components/setting/config/{KgTable.Setting.ConfigModal.VarGridMaster.hooks.d.ts → KgTable.Setting.ConfigModal.VarGridMaster.service.d.ts} +0 -0
- /package/dist/src/components/KgVarConfig/components/var/{KgVarConfig.Modal.Var.Vars.d.ts → KgVarConfig.Modal.Var.VarConfigControl.d.ts} +0 -0
@@ -31,8 +31,7 @@ function createConfig(params: CreateConfigParams) {
|
|
31
31
|
fs.mkdirp(getRootPath(OUTPUT_DIR));
|
32
32
|
writeFileSync(getRootPath(`${OUTPUT_DIR}/${configFileName}`), configStr);
|
33
33
|
|
34
|
-
console.log(colors.
|
35
|
-
console.log(colors.gray(OUTPUT_DIR + '/' + colors.green(configFileName)) + '\n');
|
34
|
+
console.log(colors.green(`配置文件构建成功: `) + colors.gray(OUTPUT_DIR + '/' + colors.green(configFileName)));
|
36
35
|
} catch (error) {
|
37
36
|
console.log(colors.red('configuration file configuration file failed to package:\n' + error));
|
38
37
|
}
|
@@ -1,8 +1 @@
|
|
1
1
|
export { Add, AddQuery } from './Add';
|
2
|
-
export { Delete, DeleteQuery } from './Delete';
|
3
|
-
export { DeleteBatch, DeleteBatchQuery } from './DeleteBatch';
|
4
|
-
export { Edit, EditQuery } from './Edit';
|
5
|
-
export { ExportXls, ExportXlsQuery } from './ExportXls';
|
6
|
-
export { ImportExcel, ImportExcelQuery } from './ImportExcel';
|
7
|
-
export { List, ListQuery } from './List';
|
8
|
-
export { QueryById, QueryByIdQuery } from './QueryById';
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { IRequestConfig, IRequestOptions } from '../../../../services';
|
2
|
+
/** 请求参数. */
|
3
|
+
export declare class ExecuteQueryQuery {
|
4
|
+
/** 主键. */
|
5
|
+
id: string | null;
|
6
|
+
constructor(obj?: ExecuteQueryQuery);
|
7
|
+
}
|
8
|
+
/**
|
9
|
+
* 执行查询语句, 查询列表数据.
|
10
|
+
*
|
11
|
+
* @param config 请求配置.
|
12
|
+
* @param option 请求选项.
|
13
|
+
*/
|
14
|
+
export declare function ExecuteQuery(config?: IRequestConfig<ExecuteQueryQuery, {}>, option?: IRequestOptions): Promise<Array<Record<string, Record<string, any>>>>;
|
15
|
+
export declare namespace ExecuteQuery {
|
16
|
+
var method: "GET";
|
17
|
+
var url: string;
|
18
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { ExecuteQuery, ExecuteQueryQuery } from './ExecuteQuery';
|
@@ -2,6 +2,7 @@ export * as DescriptionController from './DescriptionController';
|
|
2
2
|
export * as SysPermissionController from './SysPermissionController';
|
3
3
|
export * as VarController from './VarController';
|
4
4
|
export * as VarConfigDescriptionController from './VarConfigDescriptionController';
|
5
|
+
export * as VarConfigPossibilityController from './VarConfigPossibilityController';
|
5
6
|
export * as VarDdaController from './VarDdaController';
|
6
7
|
export * as VarGridMasterController from './VarGridMasterController';
|
7
8
|
export * as VarProfileMasterController from './VarProfileMasterController';
|
@@ -433,6 +433,8 @@ export declare class VarConfigDescription {
|
|
433
433
|
}
|
434
434
|
/** 变量配置:表单输入验证. */
|
435
435
|
export declare class VarConfigInput {
|
436
|
+
/** 转换大小写的方式. */
|
437
|
+
case_conversion_type?: string | null;
|
436
438
|
/** 定制级别(CustomLevel). */
|
437
439
|
cust_lvl?: number | null;
|
438
440
|
/** 数据类型(DataType). */
|
@@ -449,10 +451,18 @@ export declare class VarConfigInput {
|
|
449
451
|
max?: number | null;
|
450
452
|
/** 是否包含最大值. */
|
451
453
|
max_include_flg?: number | null;
|
454
|
+
/** 最大长度. */
|
455
|
+
max_length?: number | null;
|
452
456
|
/** 最小值. */
|
453
457
|
min?: number | null;
|
454
458
|
/** 是否包含最小值. */
|
455
459
|
min_include_flg?: number | null;
|
460
|
+
/** 最小长度. */
|
461
|
+
min_length?: number | null;
|
462
|
+
/** 正则表达式. */
|
463
|
+
regular_expression?: string | null;
|
464
|
+
/** 验证方式. */
|
465
|
+
validation_type?: string | null;
|
456
466
|
/** 变量名称(VariableName). */
|
457
467
|
var_nam?: string | null;
|
458
468
|
constructor(obj?: VarConfigInput);
|
@@ -461,8 +471,6 @@ export declare class VarConfigInput {
|
|
461
471
|
export declare class VarConfigLookup {
|
462
472
|
/** 定制级别(CustomLevel). */
|
463
473
|
cust_lvl?: number | null;
|
464
|
-
/** 是否启用(EnableFlag). */
|
465
|
-
ena_flg?: number | null;
|
466
474
|
/** 界面标识(FormID). */
|
467
475
|
frm_id?: string | null;
|
468
476
|
/** 分组(GroupName). */
|
@@ -491,6 +499,8 @@ export declare class VarConfigPossibility {
|
|
491
499
|
cmd_prm?: string | null;
|
492
500
|
/** 定制级别(CustomLevel). */
|
493
501
|
cust_lvl?: number | null;
|
502
|
+
/** 数据源的类型. */
|
503
|
+
data_source_type?: string | null;
|
494
504
|
/** 界面标识(FormID). */
|
495
505
|
frm_id?: string | null;
|
496
506
|
/** 分组(GroupName). */
|
@@ -501,9 +511,11 @@ export declare class VarConfigPossibility {
|
|
501
511
|
lbl_clm?: string | null;
|
502
512
|
/** 语言(LocaleID). */
|
503
513
|
locale_id?: string | null;
|
514
|
+
/** SQL. */
|
515
|
+
sql?: string | null;
|
504
516
|
/** 数据列(ValueColumn). */
|
505
517
|
val_clm?: string | null;
|
506
|
-
/**
|
518
|
+
/** 数据类型. */
|
507
519
|
val_data_type?: string | null;
|
508
520
|
/** 变量名称(VariableName). */
|
509
521
|
var_nam?: string | null;
|
@@ -519,6 +531,8 @@ export declare class VarConfigTip {
|
|
519
531
|
id?: string | null;
|
520
532
|
/** 语言(LocaleID). */
|
521
533
|
locale_id?: string | null;
|
534
|
+
/** 位置. */
|
535
|
+
placement?: string | null;
|
522
536
|
/** 提示文本. */
|
523
537
|
tip?: string | null;
|
524
538
|
/** 变量名称(VariableName). */
|
@@ -699,6 +713,8 @@ export declare class VarProfileConfig {
|
|
699
713
|
id?: string | null;
|
700
714
|
/** 是否支持拖动高度. */
|
701
715
|
resizable_flg?: number | null;
|
716
|
+
/** 是否显示视图下拉列表以及配置按钮. */
|
717
|
+
show_config_button_flag?: number | null;
|
702
718
|
/** 是否显示(VisibleFlag). */
|
703
719
|
vis_flg?: number | null;
|
704
720
|
constructor(obj?: VarProfileConfig);
|
@@ -733,7 +749,7 @@ export declare class VarProfileDetail {
|
|
733
749
|
var_nam?: string | null;
|
734
750
|
/** 是否可见(VisibleFlag). */
|
735
751
|
vis_flg?: number | null;
|
736
|
-
/**
|
752
|
+
/** 表单控件宽度. */
|
737
753
|
width?: number | null;
|
738
754
|
constructor(obj?: VarProfileDetail);
|
739
755
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { IRemoveEventListenerHandler, KG_APP, Menu } from '../../consts';
|
2
|
-
import {
|
2
|
+
import { IKgAppSelectGotoAppEventListener, IKgAppSelectGotoPathEventListener, IKgAppSelectStore } from './index.store';
|
3
3
|
export declare type IUseKgAppSelect = {
|
4
4
|
/** 状态数据. */
|
5
5
|
store: IKgAppSelectStore;
|
@@ -30,12 +30,12 @@ export declare type IUseKgAppSelect = {
|
|
30
30
|
* @param cb 回调函数.
|
31
31
|
* @param once 是否只会触发一次. 默认为 undefined.
|
32
32
|
*/
|
33
|
-
onGotoApp(cb:
|
33
|
+
onGotoApp(cb: IKgAppSelectGotoAppEventListener, once?: boolean): IRemoveEventListenerHandler;
|
34
34
|
/**
|
35
35
|
* 事件: 进入某个地址.
|
36
36
|
* @param cb 回调函数.
|
37
37
|
* @param once 是否只会触发一次. 默认为 undefined.
|
38
38
|
*/
|
39
|
-
onGotoPath(cb:
|
39
|
+
onGotoPath(cb: IKgAppSelectGotoPathEventListener, once?: boolean): IRemoveEventListenerHandler;
|
40
40
|
};
|
41
41
|
export declare function useKgAppSelect(): IUseKgAppSelect;
|
@@ -1,51 +1,45 @@
|
|
1
1
|
import { StoreDefinition } from 'pinia';
|
2
|
-
import {
|
2
|
+
import { IKgEventListener, KG_APP, Menu } from '../../consts';
|
3
3
|
/**
|
4
4
|
* 事件类型.
|
5
5
|
* 'gotoApp': 进入某个模块
|
6
6
|
* 'gotoPath': 进入某个地址
|
7
7
|
*/
|
8
8
|
export declare type IKgAppSelectEvent = 'gotoApp' | 'gotoPath';
|
9
|
-
|
10
|
-
export declare type IKgAppSelectGotoAppCbParam = {
|
9
|
+
export declare type IKgAppSelectGotoAppEventListenerParameter = {
|
11
10
|
app: string;
|
12
11
|
};
|
13
|
-
export declare type
|
14
|
-
|
15
|
-
export declare type IKgAppSelectGotoPathCbParam = {
|
12
|
+
export declare type IKgAppSelectGotoAppEventListener = ((param: IKgAppSelectGotoAppEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
13
|
+
export declare type IKgAppSelectGotoPathEventListenerParameter = {
|
16
14
|
path: string;
|
17
15
|
};
|
18
|
-
export declare type
|
19
|
-
export declare type
|
20
|
-
export
|
21
|
-
|
22
|
-
gotoAppListenersMap: Map<string, Array<IKgAppSelectGotoAppCb>>;
|
23
|
-
gotoPathListenersMap: Map<string, Array<IKgAppSelectGotoPathCb>>;
|
24
|
-
}
|
25
|
-
export declare type IKgAppSelectStoreDefinition = StoreDefinition<'KgAppSelect', IKgAppSelectState, {
|
16
|
+
export declare type IKgAppSelectGotoPathEventListener = ((param: IKgAppSelectGotoPathEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
17
|
+
export declare type IKgAppSelectEventListenerParameter = IKgAppSelectGotoAppEventListenerParameter | IKgAppSelectGotoPathEventListenerParameter;
|
18
|
+
export declare type IKgAppSelectEventListener = IKgAppSelectGotoAppEventListener | IKgAppSelectGotoPathEventListener;
|
19
|
+
export interface IUseKgAppSelectStoreState {
|
26
20
|
/**
|
27
21
|
* 当前模块.
|
28
22
|
*/
|
23
|
+
currentApp: KG_APP | null;
|
24
|
+
gotoAppEventListenersMap: Map<string, Array<IKgAppSelectGotoAppEventListener>>;
|
25
|
+
gotoPathEventListenersMap: Map<string, Array<IKgAppSelectGotoPathEventListener>>;
|
26
|
+
}
|
27
|
+
export interface IUseKgAppSelectStoreGetters {
|
29
28
|
getCurrentApp(): KG_APP;
|
30
|
-
}
|
29
|
+
}
|
30
|
+
export interface IUseKgAppSelectStoreActions {
|
31
31
|
/**
|
32
32
|
* 注册事件监听.
|
33
33
|
* @param event 事件名称.
|
34
34
|
* @param cb 回调函数.
|
35
35
|
*/
|
36
|
-
addEventListener(event: IKgAppSelectEvent, cb:
|
37
|
-
/**
|
38
|
-
* 退订事件监听.
|
39
|
-
* @param event 事件名称.
|
40
|
-
* @param cb 回调函数.
|
41
|
-
*/
|
42
|
-
removeEventListener(event: IKgAppSelectEvent, cb?: IKgAppSelectCb): void;
|
36
|
+
addEventListener(event: IKgAppSelectEvent, cb: IKgAppSelectEventListener): void;
|
43
37
|
/**
|
44
38
|
* 触发事件.
|
45
39
|
* @param event 事件名称.
|
46
40
|
* @param param 参数.
|
47
41
|
*/
|
48
|
-
emit(event: IKgAppSelectEvent, param?:
|
42
|
+
emit<T = IKgAppSelectEventListenerParameter>(event: IKgAppSelectEvent, param?: T | null): Promise<boolean>;
|
49
43
|
/**
|
50
44
|
* 进入某个模块.
|
51
45
|
* @param app 要进入的模块.
|
@@ -57,6 +51,11 @@ export declare type IKgAppSelectStoreDefinition = StoreDefinition<'KgAppSelect',
|
|
57
51
|
* @param path 要进入的地址.
|
58
52
|
*/
|
59
53
|
gotoPath(path: string): Promise<void>;
|
54
|
+
/**
|
55
|
+
* 初始化.
|
56
|
+
* 1. 需要根据当前地址设置当前模块.
|
57
|
+
*/
|
58
|
+
init(): void;
|
60
59
|
/**
|
61
60
|
* 判断某个菜单是否属于当前模块.
|
62
61
|
* @param menu 菜单.
|
@@ -64,10 +63,12 @@ export declare type IKgAppSelectStoreDefinition = StoreDefinition<'KgAppSelect',
|
|
64
63
|
*/
|
65
64
|
isMenuInCurrentApp(menu: Menu): boolean;
|
66
65
|
/**
|
67
|
-
*
|
68
|
-
*
|
66
|
+
* 退订事件监听.
|
67
|
+
* @param event 事件名称.
|
68
|
+
* @param cb 回调函数.
|
69
69
|
*/
|
70
|
-
|
71
|
-
}
|
72
|
-
export declare type
|
73
|
-
export declare
|
70
|
+
removeEventListener(event: IKgAppSelectEvent, cb?: IKgAppSelectEventListener): void;
|
71
|
+
}
|
72
|
+
export declare type IUseKgAppSelectStore = StoreDefinition<'KgAppSelect', IUseKgAppSelectStoreState, IUseKgAppSelectStoreGetters, IUseKgAppSelectStoreActions>;
|
73
|
+
export declare type IKgAppSelectStore = ReturnType<IUseKgAppSelectStore>;
|
74
|
+
export declare const useKgAppSelectStore: IUseKgAppSelectStore;
|
@@ -3,32 +3,38 @@ import { VarButton } from '../../apis/WMS/models';
|
|
3
3
|
import './KgButton.less';
|
4
4
|
export declare const getProps: () => {
|
5
5
|
/**
|
6
|
-
*
|
6
|
+
* <p>按钮是否处于加载状态.</p>
|
7
|
+
* <p>返回 true 表示处于加载状态.</p>
|
7
8
|
*/
|
8
|
-
|
9
|
+
KgLoading: PropType<(button: VarButton) => boolean | undefined>;
|
9
10
|
/**
|
10
|
-
*
|
11
|
+
* <p>按钮是否禁用.</p>
|
12
|
+
* <p>返回 true 表示禁用. 返回 undefined 表示由组件决定是否禁用.</p>
|
11
13
|
*/
|
12
|
-
|
14
|
+
kgDisabled: PropType<(button: VarButton) => boolean | undefined>;
|
13
15
|
};
|
14
16
|
export declare type IKgButtonProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
15
17
|
declare const _default: import("vue").DefineComponent<{
|
16
18
|
/**
|
17
|
-
*
|
18
|
-
|
19
|
-
kgDisabled: PropType<(button: VarButton) => boolean | undefined>;
|
20
|
-
/**
|
21
|
-
* 按钮是否处于加载状态. 返回 true 表示处于加载状态.
|
19
|
+
* <p>按钮是否处于加载状态.</p>
|
20
|
+
* <p>返回 true 表示处于加载状态.</p>
|
22
21
|
*/
|
23
22
|
KgLoading: PropType<(button: VarButton) => boolean | undefined>;
|
24
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
25
23
|
/**
|
26
|
-
*
|
24
|
+
* <p>按钮是否禁用.</p>
|
25
|
+
* <p>返回 true 表示禁用. 返回 undefined 表示由组件决定是否禁用.</p>
|
27
26
|
*/
|
28
27
|
kgDisabled: PropType<(button: VarButton) => boolean | undefined>;
|
28
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
29
29
|
/**
|
30
|
-
*
|
30
|
+
* <p>按钮是否处于加载状态.</p>
|
31
|
+
* <p>返回 true 表示处于加载状态.</p>
|
31
32
|
*/
|
32
33
|
KgLoading: PropType<(button: VarButton) => boolean | undefined>;
|
34
|
+
/**
|
35
|
+
* <p>按钮是否禁用.</p>
|
36
|
+
* <p>返回 true 表示禁用. 返回 undefined 表示由组件决定是否禁用.</p>
|
37
|
+
*/
|
38
|
+
kgDisabled: PropType<(button: VarButton) => boolean | undefined>;
|
33
39
|
}>>, {}>;
|
34
40
|
export default _default;
|
@@ -4,8 +4,8 @@ declare const _default: {
|
|
4
4
|
$: import("vue").ComponentInternalInstance;
|
5
5
|
$data: {};
|
6
6
|
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
7
|
-
kgDisabled: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
|
8
7
|
KgLoading: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
|
8
|
+
kgDisabled: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
|
9
9
|
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
10
10
|
$attrs: {
|
11
11
|
[x: string]: unknown;
|
@@ -21,8 +21,8 @@ declare const _default: {
|
|
21
21
|
$emit: (event: string, ...args: any[]) => void;
|
22
22
|
$el: any;
|
23
23
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
24
|
-
kgDisabled: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
|
25
24
|
KgLoading: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
|
25
|
+
kgDisabled: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
|
26
26
|
}>>, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & {
|
27
27
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
28
28
|
created?: ((() => void) | (() => void)[]) | undefined;
|
@@ -44,15 +44,15 @@ declare const _default: {
|
|
44
44
|
$nextTick: typeof import("vue").nextTick;
|
45
45
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
46
46
|
} & Readonly<import("vue").ExtractPropTypes<{
|
47
|
-
kgDisabled: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
|
48
47
|
KgLoading: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
|
48
|
+
kgDisabled: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
|
49
49
|
}>> & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & import("vue").ComponentCustomProperties & {};
|
50
50
|
__isFragment?: undefined;
|
51
51
|
__isTeleport?: undefined;
|
52
52
|
__isSuspense?: undefined;
|
53
53
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
54
|
-
kgDisabled: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
|
55
54
|
KgLoading: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
|
55
|
+
kgDisabled: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
|
56
56
|
}>>, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
57
57
|
Item: typeof KgButtonItem;
|
58
58
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ComputedRef } from 'vue';
|
2
2
|
import { IRemoveEventListenerHandler, KG_BUTTON_TYPE } from '../../consts';
|
3
|
-
import {
|
3
|
+
import { IKgButtonClickEventListener, IKgButtonImportOkEventListener, IKgButtonStore, IKgButtonSubmitCancelEventListener, IKgButtonSubmitSaveEventListener } from './index.store';
|
4
4
|
export interface IUseKgButton {
|
5
5
|
/**
|
6
6
|
* <p>手动点击某个按钮.</p>
|
@@ -81,28 +81,28 @@ export interface IUseKgButton {
|
|
81
81
|
* @param cb 回调函数.
|
82
82
|
* @param once 是否只会触发一次. 默认为 undefined.
|
83
83
|
*/
|
84
|
-
onClick(cb:
|
84
|
+
onClick(cb: IKgButtonClickEventListener, once?: boolean): IRemoveEventListenerHandler;
|
85
85
|
/**
|
86
86
|
* 事件: 导入成功, 导入接口调用成功.
|
87
87
|
*
|
88
88
|
* @param cb 回调函数.
|
89
89
|
* @param once 是否只会触发一次. 默认为 undefined.
|
90
90
|
*/
|
91
|
-
onImportOk(cb:
|
91
|
+
onImportOk(cb: IKgButtonImportOkEventListener, once?: boolean): IRemoveEventListenerHandler;
|
92
92
|
/**
|
93
93
|
* 事件: 表格内编辑时, 点击取消按钮.
|
94
94
|
*
|
95
95
|
* @param cb 回调函数.
|
96
96
|
* @param once 是否只会触发一次. 默认为 undefined.
|
97
97
|
*/
|
98
|
-
onSubmitCancel(cb:
|
98
|
+
onSubmitCancel(cb: IKgButtonSubmitCancelEventListener, once?: boolean): IRemoveEventListenerHandler;
|
99
99
|
/**
|
100
100
|
* 事件: 表格内编辑时, 点击保存按钮.
|
101
101
|
*
|
102
102
|
* @param cb 回调函数.
|
103
103
|
* @param once 是否只会触发一次. 默认为 undefined.
|
104
104
|
*/
|
105
|
-
onSubmitSave(cb:
|
105
|
+
onSubmitSave(cb: IKgButtonSubmitSaveEventListener, once?: boolean): IRemoveEventListenerHandler;
|
106
106
|
/**
|
107
107
|
* <p>「查询按钮」.</p>
|
108
108
|
*/
|
@@ -169,6 +169,8 @@ export interface IUseKgButton {
|
|
169
169
|
* 状态数据.
|
170
170
|
*/
|
171
171
|
store: IKgButtonStore;
|
172
|
+
/** 所有按钮. */
|
173
|
+
varButtons: ComputedRef<ReturnType<IKgButtonStore['getVarButtons']>>;
|
172
174
|
}
|
173
175
|
/**
|
174
176
|
* @param formID 界面标识.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { StoreDefinition } from 'pinia';
|
2
2
|
import { VarButton } from '../../apis/WMS/models';
|
3
|
-
import {
|
3
|
+
import { IKgEventListener, KG_BUTTON_TYPE } from '../../consts';
|
4
4
|
/**
|
5
5
|
* 事件类型.
|
6
6
|
* 'click': 点击按钮
|
@@ -9,29 +9,31 @@ import { IKgEventCb, KG_BUTTON_TYPE } from '../../consts';
|
|
9
9
|
* 'submitCancel': 表格内编辑时, 点击取消按钮
|
10
10
|
*/
|
11
11
|
export declare type IKgButtonEvent = 'click' | 'importOk' | 'submitSave' | 'submitCancel';
|
12
|
-
export declare type
|
12
|
+
export declare type IKgButtonClickEventListenerParameter = {
|
13
13
|
/**
|
14
14
|
* 被点击的按钮.
|
15
15
|
*/
|
16
16
|
button: VarButton;
|
17
17
|
};
|
18
|
-
export declare type
|
19
|
-
export declare type
|
18
|
+
export declare type IKgButtonClickEventListener = ((param: IKgButtonClickEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
19
|
+
export declare type IKgButtonImportOkEventListenerParameter = {
|
20
20
|
button?: VarButton | null;
|
21
21
|
};
|
22
|
-
export declare type
|
23
|
-
export declare type
|
24
|
-
export declare type
|
25
|
-
export declare type
|
26
|
-
export declare type
|
22
|
+
export declare type IKgButtonImportOkEventListener = ((param: IKgButtonImportOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
23
|
+
export declare type IKgButtonSubmitSaveEventListenerParameter = {};
|
24
|
+
export declare type IKgButtonSubmitSaveEventListener = ((param: IKgButtonSubmitSaveEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
25
|
+
export declare type IKgButtonSubmitCancelEventListenerParameter = {};
|
26
|
+
export declare type IKgButtonSubmitCancelEventListener = ((param: IKgButtonSubmitCancelEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
27
|
+
export declare type IKgButtonEventListenerParameter = IKgButtonClickEventListenerParameter | IKgButtonImportOkEventListenerParameter | IKgButtonSubmitSaveEventListenerParameter | IKgButtonSubmitCancelEventListenerParameter;
|
28
|
+
export declare type IKgButtonEventListener = IKgButtonClickEventListener | IKgButtonImportOkEventListener | IKgButtonSubmitSaveEventListener | IKgButtonSubmitCancelEventListener;
|
27
29
|
export interface IUseKgButtonStoreState {
|
28
|
-
|
30
|
+
clickEventListenersMap: Map<string, Array<IKgButtonClickEventListener>>;
|
29
31
|
/**
|
30
32
|
* <p>当前按钮.</p>
|
31
33
|
* <p>同一时间最多只会有一个按钮处于「正在执行」状态, 比如点击了创建按钮, 则当前按钮就是创建按钮.</p>
|
32
34
|
*/
|
33
35
|
currentButtonMap: Map<string, VarButton | null>;
|
34
|
-
|
36
|
+
importOkEventListenersMap: Map<string, Array<IKgButtonImportOkEventListener>>;
|
35
37
|
/**
|
36
38
|
* <p>按钮的 click 事件是否被拦截.</p>
|
37
39
|
* <p>用户调用 kgVar.kgButton.onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
|
@@ -43,12 +45,13 @@ export interface IUseKgButtonStoreState {
|
|
43
45
|
* <p>比如点击了创建按钮, 打开了创建弹窗, 此时「当前按钮」指的就是创建按钮. 当点击弹窗中的保存按钮时, 表示正在请求后端接口.</p>
|
44
46
|
*/
|
45
47
|
isCurrentButtonRequestingMap: Map<string, boolean>;
|
46
|
-
|
47
|
-
|
48
|
+
submitCancelEventListenersMap: Map<string, Array<IKgButtonSubmitCancelEventListener>>;
|
49
|
+
submitSaveEventListenersMap: Map<string, Array<IKgButtonSubmitSaveEventListener>>;
|
48
50
|
}
|
49
51
|
export interface IUseKgButtonStoreGetters {
|
50
52
|
getCurrentButton(): (formID: string | null | undefined) => VarButton | null;
|
51
53
|
getSearchButton(): (formID: string | null | undefined) => VarButton | null;
|
54
|
+
getVarButtons(): (formID: string | null | undefined) => Array<VarButton>;
|
52
55
|
isClickIntercepted(): (formID: string | undefined | null, param: {
|
53
56
|
type?: KG_BUTTON_TYPE;
|
54
57
|
varName?: string | null;
|
@@ -66,7 +69,7 @@ export interface IUseKgButtonStoreActions {
|
|
66
69
|
* @param event 事件名称.
|
67
70
|
* @param cb 回调函数.
|
68
71
|
*/
|
69
|
-
addEventListener(formID: string, event: IKgButtonEvent, cb:
|
72
|
+
addEventListener(formID: string, event: IKgButtonEvent, cb: IKgButtonEventListener): void;
|
70
73
|
/**
|
71
74
|
* <p>手动点击某个按钮.</p>
|
72
75
|
* <p>调用此方法相当于手动触发某个按钮的点击事件.</p>
|
@@ -83,14 +86,14 @@ export interface IUseKgButtonStoreActions {
|
|
83
86
|
* @param event 事件名称.
|
84
87
|
* @param param 数据.
|
85
88
|
*/
|
86
|
-
emit(formID: string, event: IKgButtonEvent, param:
|
89
|
+
emit<T = IKgButtonEventListenerParameter>(formID: string, event: IKgButtonEvent, param: T): Promise<boolean>;
|
87
90
|
/**
|
88
91
|
* 退订事件监听.
|
89
92
|
* @param formID 界面标识.
|
90
93
|
* @param event 事件名称.
|
91
94
|
* @param cb 回调函数.
|
92
95
|
*/
|
93
|
-
removeEventListener(formID: string, event: IKgButtonEvent, cb?:
|
96
|
+
removeEventListener(formID: string, event: IKgButtonEvent, cb?: IKgButtonEventListener): void;
|
94
97
|
setCurrentButton(formID: string, param: {
|
95
98
|
type?: KG_BUTTON_TYPE;
|
96
99
|
varName?: string | null;
|
@@ -1,43 +1,56 @@
|
|
1
1
|
import { IRemoveEventListenerHandler } from '../../consts';
|
2
|
-
import {
|
2
|
+
import { IKgFormChangeEventListener, IKgFormLookupBeforeOkEventListener, IKgFormLookupBeforeOpenEventListener, IKgFormLookupOkEventListener, IKgFormSelectBeforeRequestEventListener, IKgFormSelectBeforeSetDatasEventListener, IKgFormSelectChangeEventListener, IKgFormStore } from './index.store';
|
3
3
|
export declare type IUseKgForm = {
|
4
4
|
formID: string;
|
5
5
|
/**
|
6
|
-
* 事件:
|
6
|
+
* 事件: 表单控件的值发生变更.
|
7
|
+
*
|
7
8
|
* @param cb 回调函数.
|
8
9
|
* @param once 是否只会触发一次. 默认为 undefined.
|
9
10
|
*/
|
10
|
-
onChange(cb:
|
11
|
+
onChange(cb: IKgFormChangeEventListener, once?: boolean): IRemoveEventListenerHandler;
|
11
12
|
/**
|
12
13
|
* 事件: 查找弹窗点击确定之前. 如果返回 true 则查找弹窗不会触发 kgOk 事件.
|
14
|
+
*
|
13
15
|
* @param cb 回调函数.
|
14
16
|
* @param once 是否只会触发一次. 默认为 undefined.
|
15
17
|
*/
|
16
|
-
onLookupBeforeOk(cb:
|
18
|
+
onLookupBeforeOk(cb: IKgFormLookupBeforeOkEventListener, once?: boolean): IRemoveEventListenerHandler;
|
17
19
|
/**
|
18
20
|
* 事件: 查找弹窗打开之前.
|
21
|
+
*
|
19
22
|
* @param cb 回调函数.
|
20
23
|
* @param once 是否只会触发一次. 默认为 undefined.
|
21
24
|
*/
|
22
|
-
onLookupBeforeOpen(cb:
|
25
|
+
onLookupBeforeOpen(cb: IKgFormLookupBeforeOpenEventListener, once?: boolean): IRemoveEventListenerHandler;
|
23
26
|
/**
|
24
27
|
* 事件: 查找弹窗点击确定.
|
28
|
+
*
|
25
29
|
* @param cb 回调函数.
|
26
30
|
* @param once 是否只会触发一次. 默认为 undefined.
|
27
31
|
*/
|
28
|
-
onLookupOk(cb:
|
32
|
+
onLookupOk(cb: IKgFormLookupOkEventListener, once?: boolean): IRemoveEventListenerHandler;
|
33
|
+
/**
|
34
|
+
* 事件: 即将发起查询请求, 如果返回 true 表示不会发起请求.
|
35
|
+
*
|
36
|
+
* @param cb 回调函数.
|
37
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
38
|
+
*/
|
39
|
+
onSelectBeforeRequest(cb: IKgFormSelectBeforeRequestEventListener, once?: boolean): IRemoveEventListenerHandler;
|
29
40
|
/**
|
30
41
|
* 事件: 查询请求成功, 列表数据尚未赋值. 此处可以对查询接口返回的列表数据作处理.
|
42
|
+
*
|
31
43
|
* @param cb 回调函数.
|
32
44
|
* @param once 是否只会触发一次. 默认为 undefined.
|
33
45
|
*/
|
34
|
-
onSelectBeforeSetDatas(cb:
|
46
|
+
onSelectBeforeSetDatas(cb: IKgFormSelectBeforeSetDatasEventListener, once?: boolean): IRemoveEventListenerHandler;
|
35
47
|
/**
|
36
48
|
* 事件: 下拉列表选中某个(可能多个)数据.
|
49
|
+
*
|
37
50
|
* @param cb 回调函数.
|
38
51
|
* @param once 是否只会触发一次. 默认为 undefined.
|
39
52
|
*/
|
40
|
-
onSelectChange(cb:
|
53
|
+
onSelectChange(cb: IKgFormSelectChangeEventListener, once?: boolean): IRemoveEventListenerHandler;
|
41
54
|
/**
|
42
55
|
* 状态数据.
|
43
56
|
*/
|