@kengic/vue 0.28.0 → 0.28.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +14564 -14479
- package/dist/src/component/KgForm/KgForm.event.d.ts +3 -3
- package/dist/src/component/KgSubmit/KgSubmit.event.d.ts +6 -0
- package/dist/src/component/KgTable/KgTable.d.ts +3 -3
- package/dist/src/component/KgTable/KgTable.store.d.ts +7 -0
- package/dist/src/component/KgTable/KgTable.vm.d.ts +1 -1
- package/dist/src/component/KgVar/KgVar.hooks.d.ts +2 -1
- package/dist/src/component/KgVarConfig/KgVarConfig.hooks.d.ts +6 -2
- package/dist/src/component/KgVarConfig/KgVarConfig.store.d.ts +6 -2
- package/dist/src/component/KgVarConfig/components/KgVarConfigModal.d.ts +42 -4
- package/dist/src/const/const.vm.d.ts +17 -0
- package/dist/src/service/http-client.d.ts +1 -3
- package/package.json +1 -1
@@ -87,6 +87,8 @@ export declare type IKgFormOnSelectChangeEventListenerParameter = {
|
|
87
87
|
* 表单控件所处环境.
|
88
88
|
*/
|
89
89
|
context: KG_FORM_CONTEXT;
|
90
|
+
/** @deprecated 请直接使用 kgVar.kgSubmit.formModel */
|
91
|
+
formModel: Ref<Record<string, any> | null> | null;
|
90
92
|
/** @deprecated */
|
91
93
|
isCopying: boolean | null;
|
92
94
|
/** @deprecated */
|
@@ -99,14 +101,12 @@ export declare type IKgFormOnSelectChangeEventListenerParameter = {
|
|
99
101
|
isUpdating: boolean | null;
|
100
102
|
/** @deprecated */
|
101
103
|
model: Ref<Record<string, any> | null> | null;
|
102
|
-
/** @deprecated 请直接使用 kgVar.kgSubmit.formModel */
|
103
|
-
formModel: Ref<Record<string, any> | null> | null;
|
104
104
|
/** 选中的数据对象组成的数组, 如果是单选则数组中只有一个数据对象. */
|
105
105
|
rows: Array<any> | null;
|
106
106
|
/** 选中的数据组成的数组, 如果是单选则数组中只有一个数据. */
|
107
107
|
values: Array<any>;
|
108
108
|
/** 变量. */
|
109
|
-
|
109
|
+
varName: string;
|
110
110
|
};
|
111
111
|
export declare type IKgFormOnSelectChangeEventListener = ((param: IKgFormOnSelectChangeEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
112
112
|
export declare type IKgFormOnLookupBeforeOpenEventListenerParameter = {
|
@@ -70,11 +70,17 @@ export declare type IKgSubmitOnBeforeRequestEventListenerParameter = {
|
|
70
70
|
};
|
71
71
|
export declare type IKgSubmitOnBeforeRequestEventListener = ((param: IKgSubmitOnBeforeRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
72
72
|
export declare type IKgSubmitOnOkEventListenerParameter = {
|
73
|
+
/** @deprecated */
|
73
74
|
isCreating: boolean | null;
|
75
|
+
/** @deprecated */
|
74
76
|
isUpdating: boolean | null;
|
77
|
+
/** @deprecated */
|
75
78
|
isCopying: boolean | null;
|
79
|
+
/** @deprecated */
|
76
80
|
isDeleting: boolean | null;
|
81
|
+
/** @deprecated */
|
77
82
|
row: IKgTableRow | null;
|
83
|
+
/** @deprecated */
|
78
84
|
model: Ref<Record<string, any>>;
|
79
85
|
/** 接口返回结果. */
|
80
86
|
result: any | null;
|
@@ -3,7 +3,7 @@ import { ExtractPropTypes, PropType } from 'vue';
|
|
3
3
|
import './KgTable.less';
|
4
4
|
export declare const getProps: () => {
|
5
5
|
/** 是否禁用某行的勾选框. */
|
6
|
-
|
6
|
+
kgIsCheckboxDisabled: PropType<(row: any) => boolean>;
|
7
7
|
/** 是否禁用表格. */
|
8
8
|
kgDisabled: {
|
9
9
|
type: PropType<boolean>;
|
@@ -15,7 +15,7 @@ export declare const getProps: () => {
|
|
15
15
|
export declare type IKgTableProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
16
16
|
declare const _default: import("vue").DefineComponent<{
|
17
17
|
/** 是否禁用某行的勾选框. */
|
18
|
-
|
18
|
+
kgIsCheckboxDisabled: PropType<(row: any) => boolean>;
|
19
19
|
/** 是否禁用表格. */
|
20
20
|
kgDisabled: {
|
21
21
|
type: PropType<boolean>;
|
@@ -25,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
25
25
|
kgRowClassName: PropType<RowClassName<any>>;
|
26
26
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
27
27
|
/** 是否禁用某行的勾选框. */
|
28
|
-
|
28
|
+
kgIsCheckboxDisabled: PropType<(row: any) => boolean>;
|
29
29
|
/** 是否禁用表格. */
|
30
30
|
kgDisabled: {
|
31
31
|
type: PropType<boolean>;
|
@@ -125,6 +125,13 @@ export interface IUseKgTableStoreActions {
|
|
125
125
|
* @param selectedRows 勾选的行.
|
126
126
|
*/
|
127
127
|
setSelectedRows(formID: string | null | undefined, selectedRows: Array<IKgTableRow>): void;
|
128
|
+
/**
|
129
|
+
* 根据勾选行的主键, 设置勾选的行.
|
130
|
+
*
|
131
|
+
* @param formID 界面标识.
|
132
|
+
* @param selectedRowKeys 勾选行的主键.
|
133
|
+
*/
|
134
|
+
setSelectedRowsByKeys(formID: string | null | undefined, selectedRowKeys: Array<Key>): void;
|
128
135
|
setTableWidth(formID: string | null | undefined, value: number): void;
|
129
136
|
}
|
130
137
|
export declare type IUseKgTableStore = StoreDefinition<'KgTable', IUseKgTableStoreState, IUseKgTableStoreGetters, IUseKgTableStoreActions>;
|
@@ -62,6 +62,6 @@ export declare const KG_TABLE_TD_MAX_WIDTH = 1920;
|
|
62
62
|
/** 勾选列的宽度. */
|
63
63
|
export declare const KG_TABLE_TD_CHECK_WIDTH = 32;
|
64
64
|
/** 序号列的宽度. */
|
65
|
-
export declare const KG_TABLE_TD_INDEX_WIDTH =
|
65
|
+
export declare const KG_TABLE_TD_INDEX_WIDTH = 55;
|
66
66
|
/** 在表格内创建时, 空白行的临时主键. */
|
67
67
|
export declare const KG_TABLE_TEMP_ID = "__KG_TABLE_TEMP_ID__";
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { IRemoveEventListener } from '@kengic/core.core';
|
2
2
|
import { ComputedRef } from 'vue';
|
3
3
|
import { VarButton, VarChildDetail, VarConfigControl, VarConfigDescription, VarConfigPossibility, VarDda, VarGridConfig, VarGridDetail, VarGridMasterDTO, VarProfileConfig, VarProfileMasterDTO, VarVariable } from '../../api/WMS/models';
|
4
|
-
import { KG__VAR_BUTTON__TYPE } from '../../const';
|
4
|
+
import { IKgVarGridConfigProperties, KG__VAR_BUTTON__TYPE } from '../../const';
|
5
5
|
import { IUseKgButton } from '../KgButton';
|
6
6
|
import { IUseKgForm } from '../KgForm';
|
7
7
|
import { type IUseKgSearch } from '../KgSearch';
|
@@ -238,6 +238,7 @@ export declare type IUseKgVar = {
|
|
238
238
|
varChildDetails: ComputedRef<Array<VarChildDetail>>;
|
239
239
|
varDda: ComputedRef<VarDda | null>;
|
240
240
|
varGridConfig: ComputedRef<VarGridConfig | null>;
|
241
|
+
varGridConfig$Props$$: ComputedRef<IKgVarGridConfigProperties>;
|
241
242
|
/**
|
242
243
|
* 所有的「表格视图」.
|
243
244
|
*/
|
@@ -3,9 +3,13 @@ export interface IUseKgVarConfig {
|
|
3
3
|
/**
|
4
4
|
* 打开变量配置弹窗, 并使用传入的宿主界面标识.
|
5
5
|
*
|
6
|
-
* @param hostFormID 宿主界面标识
|
6
|
+
* @param param.hostFormID 宿主界面标识
|
7
|
+
* @param param.kgContext {@link KG_VAR_CONFIG_MODAL__CONTEXT}
|
7
8
|
*/
|
8
|
-
open(
|
9
|
+
open(param: {
|
10
|
+
hostFormID: string;
|
11
|
+
kgContext?: string;
|
12
|
+
}): void;
|
9
13
|
/**
|
10
14
|
* 状态数据.
|
11
15
|
*/
|
@@ -7,9 +7,13 @@ export interface IUseKgVarConfigStoreActions {
|
|
7
7
|
/**
|
8
8
|
* 打开变量配置弹窗, 并使用传入的宿主界面标识.
|
9
9
|
*
|
10
|
-
* @param hostFormID 宿主界面标识
|
10
|
+
* @param param.hostFormID 宿主界面标识
|
11
|
+
* @param param.kgContext {@link KG_VAR_CONFIG_MODAL__CONTEXT}
|
11
12
|
*/
|
12
|
-
open(
|
13
|
+
open(param: {
|
14
|
+
hostFormID: string;
|
15
|
+
kgContext?: string;
|
16
|
+
}): void;
|
13
17
|
}
|
14
18
|
export declare type IUseKgVarConfigStore = StoreDefinition<'KgVarConfig', IUseKgVarConfigStoreState, IUseKgVarConfigStoreGetters, IUseKgVarConfigStoreActions>;
|
15
19
|
export declare type IKgVarConfigStore = ReturnType<IUseKgVarConfigStore>;
|
@@ -1,15 +1,53 @@
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
2
|
+
export declare const KG_VAR_CONFIG_MODAL__CONTEXT: {
|
3
|
+
/**
|
4
|
+
* 默认, 通过快捷键 CTRL+SHIFT+F5 打开, 显示所有的配置.
|
5
|
+
*/
|
6
|
+
DEFAULT: string;
|
7
|
+
/**
|
8
|
+
* 从查询条件组件中, 点击配置按钮打开, 只显示查询条件视图配置.
|
9
|
+
*/
|
10
|
+
SEARCH: string;
|
11
|
+
/**
|
12
|
+
* 从表格中, 点击视图配置菜单打开, 只显示表格视图配置.
|
13
|
+
*/
|
14
|
+
TABLE: string;
|
15
|
+
};
|
16
|
+
export declare type KgVarConfigModalTab = 'variable' | 'search' | 'table' | 'button' | 'submit';
|
2
17
|
export declare const getProps: () => {
|
3
|
-
|
18
|
+
/**
|
19
|
+
* @see KG_VAR_CONFIG_MODAL__CONTEXT
|
20
|
+
*/
|
21
|
+
kgContext: {
|
22
|
+
type: PropType<string>;
|
23
|
+
default: string;
|
24
|
+
};
|
4
25
|
'onUpdate:visible': PropType<(value: boolean) => void>;
|
26
|
+
visible: PropType<boolean>;
|
5
27
|
};
|
6
28
|
export declare type KgVarConfigModalProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
7
29
|
export declare const KgVarConfigModal: import("vue").DefineComponent<{
|
8
|
-
|
30
|
+
/**
|
31
|
+
* @see KG_VAR_CONFIG_MODAL__CONTEXT
|
32
|
+
*/
|
33
|
+
kgContext: {
|
34
|
+
type: PropType<string>;
|
35
|
+
default: string;
|
36
|
+
};
|
9
37
|
'onUpdate:visible': PropType<(value: boolean) => void>;
|
10
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:visible"[], "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
11
38
|
visible: PropType<boolean>;
|
39
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:visible"[], "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
40
|
+
/**
|
41
|
+
* @see KG_VAR_CONFIG_MODAL__CONTEXT
|
42
|
+
*/
|
43
|
+
kgContext: {
|
44
|
+
type: PropType<string>;
|
45
|
+
default: string;
|
46
|
+
};
|
12
47
|
'onUpdate:visible': PropType<(value: boolean) => void>;
|
48
|
+
visible: PropType<boolean>;
|
13
49
|
}>> & {
|
14
50
|
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
15
|
-
}, {
|
51
|
+
}, {
|
52
|
+
kgContext: string;
|
53
|
+
}>;
|
@@ -674,11 +674,28 @@ export interface IKgVarDdaProperties {
|
|
674
674
|
* <p>额外的配置属性. 对应 {@link VarGridConfig#props} 字段.</p>
|
675
675
|
*/
|
676
676
|
export interface IKgVarGridConfigProperties {
|
677
|
+
/**
|
678
|
+
* <p>是否禁用某行的勾选框.</p>
|
679
|
+
* <p>该属性的值是一个字符串, 这个字符串会被作为方法体的代码来解析, 即作为 new Function() 构造函数的最后一个参数.</p>
|
680
|
+
* <p>在这个字符串表示的代码中可以访问如下参数:</p>
|
681
|
+
* <ul>
|
682
|
+
* <li>row: 被判断的行,</li>
|
683
|
+
* </ul>
|
684
|
+
* <p>该代码需要返回 true 或者 false, 即表示是否禁用勾选框.</p>
|
685
|
+
*/
|
686
|
+
isCheckboxDisabled?: string;
|
677
687
|
}
|
678
688
|
/**
|
679
689
|
* <p>额外的配置属性. 对应 {@link VarGridDetail#props} 字段.</p>
|
680
690
|
*/
|
681
691
|
export interface IKgVarGridDetailProperties {
|
692
|
+
/**
|
693
|
+
* <p>是否进行翻译.</p>
|
694
|
+
* <p>如果为 true, 则把内容作为 i18n 的 key 对内容进行翻译.</p>
|
695
|
+
*
|
696
|
+
* @default false
|
697
|
+
*/
|
698
|
+
isTranslateText?: boolean;
|
682
699
|
}
|
683
700
|
/**
|
684
701
|
* <p>额外的配置属性. 对应 {@link VarGridMaster#props} 字段.</p>
|
@@ -8,8 +8,6 @@ interface IHttpClient {
|
|
8
8
|
} & AxiosRequestConfig;
|
9
9
|
request<T = any>(config: IRequestConfig, options?: IRequestOptions): Promise<T>;
|
10
10
|
}
|
11
|
-
/** @deprecated 已弃用, 请使用 {@link kgSetupHttpClient}. */
|
12
|
-
declare function setupHttpClient(httpClient: IHttpClient | null): void;
|
13
11
|
/**
|
14
12
|
* 设置 httpClient 实例.
|
15
13
|
*/
|
@@ -90,4 +88,4 @@ interface IRequestOptions {
|
|
90
88
|
*/
|
91
89
|
withToken?: boolean;
|
92
90
|
}
|
93
|
-
export {
|
91
|
+
export { kgSetupHttpClient, httpClient, type IRequestConfig, type IRequestOptions };
|
package/package.json
CHANGED