@kengic/vue 0.25.1-beta.1 → 0.25.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/kengic-vue.js +2733 -2678
- package/dist/src/apis/WMS/models.d.ts +2 -2
- package/dist/src/components/KgForm/index.store.d.ts +13 -2
- package/dist/src/components/KgForm.Item/addon/KgForm.Item.Addon.DynamicQueryOperator.d.ts +1 -1
- package/dist/src/components/KgTable/index.hooks.d.ts +13 -9
- package/dist/src/components/KgTable/index.store.d.ts +7 -7
- package/dist/src/components/KgVar/index.store.service.d.ts +7 -8
- package/dist/src/consts/i18n/en.d.ts +1 -1
- package/dist/src/consts/i18n/zh_CN.d.ts +1 -1
- package/dist/src/utils/kg-var.util.d.ts +17 -3
- package/package.json +1 -1
@@ -503,7 +503,7 @@ export declare class VarConfigLookup {
|
|
503
503
|
var_nam?: string | null;
|
504
504
|
constructor(obj?: VarConfigLookup);
|
505
505
|
}
|
506
|
-
/**
|
506
|
+
/** 变量配置:列表数据. */
|
507
507
|
export declare class VarConfigPossibility {
|
508
508
|
/** 接口地址(Command). */
|
509
509
|
cmd?: string | null;
|
@@ -777,7 +777,7 @@ export declare class VarProfileDetail {
|
|
777
777
|
export declare class VarProfileMaster {
|
778
778
|
/** 定制级别(CustomLevel). */
|
779
779
|
cust_lvl?: number | null;
|
780
|
-
/**
|
780
|
+
/** 是否是默认的视图(DefaultFlag). */
|
781
781
|
def_flg?: number | null;
|
782
782
|
/** 是否启用高级查询(DynamicQueryFlag). */
|
783
783
|
dyn_flg?: number | null;
|
@@ -60,9 +60,13 @@ export declare type IKgFormSelectBeforeSetDatasEventListenerParameter<T = any> =
|
|
60
60
|
context: KG_FORM_CONTEXT;
|
61
61
|
/** 列表数据. */
|
62
62
|
datas: Ref<Array<T>>;
|
63
|
+
/** @deprecated */
|
63
64
|
isCopying: boolean | null;
|
65
|
+
/** @deprecated */
|
64
66
|
isCreating: boolean | null;
|
67
|
+
/** @deprecated */
|
65
68
|
isDeleting: boolean | null;
|
69
|
+
/** @deprecated */
|
66
70
|
isUpdating: boolean | null;
|
67
71
|
/** 变量名称. */
|
68
72
|
varName: string;
|
@@ -73,15 +77,22 @@ export declare type IKgFormSelectChangeEventListenerParameter = {
|
|
73
77
|
* 表单控件所处环境.
|
74
78
|
*/
|
75
79
|
context: KG_FORM_CONTEXT;
|
80
|
+
/** @deprecated */
|
76
81
|
isCopying: boolean | null;
|
82
|
+
/** @deprecated */
|
77
83
|
isCreating: boolean | null;
|
84
|
+
/** @deprecated */
|
78
85
|
isDeleting: boolean | null;
|
79
86
|
/** 是否多选, 否则单选. */
|
80
87
|
isMultiple: boolean;
|
88
|
+
/** @deprecated */
|
81
89
|
isUpdating: boolean | null;
|
82
|
-
/** @deprecated
|
90
|
+
/** @deprecated */
|
83
91
|
model: Ref<Record<string, any> | null> | null;
|
84
|
-
/**
|
92
|
+
/**
|
93
|
+
* 表单数据对象.
|
94
|
+
* @deprecated
|
95
|
+
*/
|
85
96
|
formModel: Ref<Record<string, any> | null> | null;
|
86
97
|
/** 选中的数据对象组成的数组, 如果是单选则数组中只有一个数据对象. */
|
87
98
|
rows: Array<any> | null;
|
@@ -55,24 +55,31 @@ export interface IUseKgTable {
|
|
55
55
|
* @param listener 事件监听函数.
|
56
56
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
57
57
|
*/
|
58
|
+
onAfterRequest(listener: IKgTableAfterRequestEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
59
|
+
/**
|
60
|
+
* @deprecated 已废弃, 请使用 onAfterRequest() 方法.
|
61
|
+
*/
|
58
62
|
onAfterSearch(listener: IKgTableAfterRequestEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
59
63
|
/**
|
60
|
-
*
|
64
|
+
* <p>监听事件: 即将解析请求参数.</p>
|
65
|
+
* <p>在该事件中, 可以修改解析前的参数.</p>
|
66
|
+
*
|
61
67
|
* @param listener 事件监听函数.
|
62
68
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
63
69
|
*/
|
64
|
-
|
70
|
+
onBeforeParseRequestParameter(listener: IKgTableBeforeParseParameterEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
65
71
|
/**
|
66
72
|
* 监听事件: 即将发起查询请求, 如果返回 true 表示不会发起请求.
|
67
73
|
* @param listener 事件监听函数.
|
68
74
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
69
|
-
|
75
|
+
*/
|
76
|
+
onBeforeRequest(listener: IKgTableBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
77
|
+
/**
|
78
|
+
* @deprecated 已废弃, 请使用 onBeforeRequest() 方法.
|
70
79
|
*/
|
71
80
|
onBeforeRetrieve(listener: IKgTableBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
72
81
|
/**
|
73
|
-
*
|
74
|
-
* @param listener 事件监听函数.
|
75
|
-
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
82
|
+
* @deprecated 已废弃, 请使用 onBeforeRequest() 方法.
|
76
83
|
*/
|
77
84
|
onBeforeSearch(listener: IKgTableBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
78
85
|
/**
|
@@ -88,9 +95,6 @@ export interface IUseKgTable {
|
|
88
95
|
*/
|
89
96
|
onReady(listener: IKgTableReadyEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
90
97
|
/**
|
91
|
-
* 监听事件: 查询请求成功, 表格数据已经赋值, 表格状态已经更新.
|
92
|
-
* @param listener 事件监听函数.
|
93
|
-
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
94
98
|
* @deprecated 已废弃, 请使用 onAfterSearch() 方法.
|
95
99
|
*/
|
96
100
|
onRetrieve(listener: IKgTableAfterRequestEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
@@ -8,12 +8,12 @@ import { IKgTableRow, IKgTableRowHeight } from './index.vm';
|
|
8
8
|
* 事件类型.
|
9
9
|
* 'ready': 就绪, 配置初始完成, 组件渲染完成
|
10
10
|
* 'rowDoubleClick': 双击某行
|
11
|
-
* '
|
12
|
-
* '
|
11
|
+
* 'beforeParseRequestParameter': 即将解析请求参数,
|
12
|
+
* 'beforeRequest': 即将发起查询请求, 如果返回 true 表示不会发起请求
|
13
13
|
* 'beforeSetDatas': 查询请求成功, 表格数据尚未赋值. 此处可以对查询接口返回的列表数据作处理
|
14
|
-
* '
|
14
|
+
* 'afterRequest': 查询请求成功, 表格数据已经赋值, 表格状态已经更新
|
15
15
|
*/
|
16
|
-
export declare type IKgTableEvent = 'ready' | 'rowDoubleClick' | '
|
16
|
+
export declare type IKgTableEvent = 'ready' | 'rowDoubleClick' | 'beforeParseRequestParameter' | 'beforeRequest' | 'beforeSetDatas' | 'afterRequest';
|
17
17
|
export declare type IKgTableReadyEventListenerParameter = {};
|
18
18
|
export declare type IKgTableReadyEventListener = ((param: IKgTableReadyEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
19
19
|
export declare type IKgTableRowDoubleClickEventListenerParameter = {
|
@@ -21,13 +21,13 @@ export declare type IKgTableRowDoubleClickEventListenerParameter = {
|
|
21
21
|
row: IKgTableRow;
|
22
22
|
};
|
23
23
|
export declare type IKgTableRowDoubleClickEventListener = ((param: IKgTableRowDoubleClickEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
24
|
-
export declare type
|
24
|
+
export declare type IKgTableBeforeParseRequestParameterEventListenerParameter = {
|
25
25
|
/**
|
26
26
|
* 查询接口请求参数, 尚未解析.
|
27
27
|
*/
|
28
28
|
params: Record<string, any>;
|
29
29
|
};
|
30
|
-
export declare type IKgTableBeforeParseParameterEventListener = ((param:
|
30
|
+
export declare type IKgTableBeforeParseParameterEventListener = ((param: IKgTableBeforeParseRequestParameterEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
31
31
|
export declare type IKgTableBeforeRequestEventListenerParameter = {
|
32
32
|
/** 查询接口请求参数. */
|
33
33
|
params: Record<string, any>;
|
@@ -55,7 +55,7 @@ export declare type IKgTableAfterRequestEventListenerParameter = {
|
|
55
55
|
datas: Ref<Array<IKgTableRow>>;
|
56
56
|
};
|
57
57
|
export declare type IKgTableAfterRequestEventListener = ((param: IKgTableAfterRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
58
|
-
export declare type IKgTableEventListenerParameter = IKgTableReadyEventListenerParameter | IKgTableRowDoubleClickEventListenerParameter |
|
58
|
+
export declare type IKgTableEventListenerParameter = IKgTableReadyEventListenerParameter | IKgTableRowDoubleClickEventListenerParameter | IKgTableBeforeParseRequestParameterEventListenerParameter | IKgTableBeforeRequestEventListenerParameter | IKgTableBeforeSetDatasEventListenerParameter | IKgTableAfterRequestEventListenerParameter;
|
59
59
|
export declare type IKgTableEventListener = IKgTableReadyEventListener | IKgTableRowDoubleClickEventListener | IKgTableBeforeParseParameterEventListener | IKgTableBeforeRequestEventListener | IKgTableBeforeSetDatasEventListener | IKgTableAfterRequestEventListener;
|
60
60
|
export interface IUseKgTableStoreState {
|
61
61
|
afterRequestEventListenersMap: Map<string, Array<IKgTableAfterRequestEventListener>>;
|
@@ -1,13 +1,17 @@
|
|
1
|
-
import { VarButton, VarButtonConfig, VarChildDetail, VarConfigPossibility, VarGridConfig, VarGridDetail, VarGridMasterDTO, VarProfileConfig, VarProfileDetail, VarProfileMasterDTO, VarSubmitConfig, VarSubmitDetail } from '../../apis/WMS/models';
|
1
|
+
import { VarButton, VarButtonConfig, VarChildDetail, VarConfigControl, VarConfigInput, VarConfigLookup, VarConfigPossibility, VarConfigTip, VarGridConfig, VarGridDetail, VarGridMasterDTO, VarProfileConfig, VarProfileDetail, VarProfileMasterDTO, VarSubmitConfig, VarSubmitDetail } from '../../apis/WMS/models';
|
2
2
|
export declare function transformVarProfileConfig(varProfileConfig: VarProfileConfig | null | undefined): VarProfileConfig | null;
|
3
3
|
export declare function transformVarGridConfig(varGridConfig: VarGridConfig | null | undefined): VarGridConfig | null;
|
4
|
-
export declare function
|
4
|
+
export declare function transformVarGridMasters(varGridMasters?: Array<VarGridMasterDTO> | null): Array<VarGridMasterDTO>;
|
5
5
|
export declare function transformVarChildDetails(varChildDetails: Array<VarChildDetail> | null | undefined): Array<VarChildDetail>;
|
6
|
-
export declare function
|
6
|
+
export declare function transformVarProfileMasters(varProfileMasters?: Array<VarProfileMasterDTO> | null): Array<VarProfileMasterDTO>;
|
7
7
|
export declare function transformVarSubmitConfigs(varSubmitConfigs?: Array<VarSubmitConfig> | null): Array<VarSubmitConfig>;
|
8
8
|
export declare function transformVarSubmitDetails(varSubmitDetails?: Array<VarSubmitDetail> | null): Array<VarSubmitDetail>;
|
9
9
|
export declare function transformVarButtons(varButtons?: Array<VarButton> | null): Array<VarButton>;
|
10
10
|
export declare function transformVarConfigPossibilities(varConfigPossibilities: Array<VarConfigPossibility> | null | undefined): Array<VarConfigPossibility>;
|
11
|
+
export declare function transformVarConfigControls(varConfigControls: Array<VarConfigControl> | null | undefined): Array<VarConfigControl>;
|
12
|
+
export declare function transformVarConfigLookups(varConfigLookups: Array<VarConfigLookup> | null | undefined): Array<VarConfigLookup>;
|
13
|
+
export declare function transformVarConfigTips(varConfigTips: Array<VarConfigTip> | null | undefined): Array<VarConfigTip>;
|
14
|
+
export declare function transformVarConfigInputs(varConfigInputs: Array<VarConfigInput> | null | undefined): Array<VarConfigInput>;
|
11
15
|
export declare function transformVarButtonConfig(varButtonConfig: VarButtonConfig | null | undefined): VarButtonConfig | null;
|
12
16
|
/**
|
13
17
|
* 处理 VarGridDetail 数据.
|
@@ -15,9 +19,4 @@ export declare function transformVarButtonConfig(varButtonConfig: VarButtonConfi
|
|
15
19
|
* @param varGridDetails 原始数据.
|
16
20
|
*/
|
17
21
|
export declare function transformVarGridDetails(varGridDetails?: Array<VarGridDetail> | null): Array<VarGridDetail>;
|
18
|
-
/**
|
19
|
-
* 处理 VarProfileDetail 数据.
|
20
|
-
*
|
21
|
-
* @param varProfileDetails 原始数据.
|
22
|
-
*/
|
23
22
|
export declare function transformVarProfileDetails(varProfileDetails?: Array<VarProfileDetail> | null): Array<VarProfileDetail>;
|
@@ -12,16 +12,30 @@ export declare class KgVarUtil {
|
|
12
12
|
*/
|
13
13
|
static parseRequestParamsToJSON(params: string | null | undefined): Record<string, any>;
|
14
14
|
/**
|
15
|
-
*
|
15
|
+
* <p>根据控件类型, 将表单控件的默认值转换为合法的值.</p>
|
16
|
+
* <ul>
|
17
|
+
* <li>
|
18
|
+
* {NOW}
|
19
|
+
* <p>当前时间(YYYY-MM-DD HH:mm:ss)</p>
|
20
|
+
* </li>
|
21
|
+
* <li>
|
22
|
+
* {USER}
|
23
|
+
* <p>当前登录的用户名.</p>
|
24
|
+
* </li>
|
25
|
+
* <li>
|
26
|
+
* {ROW}
|
27
|
+
* <p>当前勾选后对应的属性.</p>
|
28
|
+
* </li>
|
29
|
+
* </ul>
|
16
30
|
*
|
17
31
|
* @param param.$dayjs dayjs.
|
18
32
|
* @param param.buttonVarName 「变量配置:表单控件」所属的按钮的变量名称.
|
19
33
|
* @param param.formID 界面标识.
|
20
34
|
* @param param.value 原始的值.
|
21
35
|
* @param param.varName 变量名称.
|
22
|
-
* @return {}
|
36
|
+
* @return {} 转换之后的值.
|
23
37
|
*/
|
24
|
-
static
|
38
|
+
static transformFormItemDefaultValue(param: {
|
25
39
|
$dayjs: typeof dayjs;
|
26
40
|
buttonVarName: string | null | undefined;
|
27
41
|
formID: string;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kengic/vue",
|
3
|
-
"version": "0.25.1
|
3
|
+
"version": "0.25.1",
|
4
4
|
"scripts": {
|
5
5
|
"build": "npm run switch-node-version && rimraf dist && vue-tsc && vite build",
|
6
6
|
"build:dev": "npm run switch-node-version && rimraf dist && vue-tsc && vite build --mode development",
|