@kengic/vue 0.23.6 → 0.23.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +2620 -2295
- package/dist/src/components/KgButton/index.hooks.d.ts +0 -9
- package/dist/src/components/KgTable/index.hooks.d.ts +21 -1
- package/dist/src/components/KgTable/index.store.d.ts +26 -11
- package/dist/src/components/KgVar/index.hooks.d.ts +2 -2
- package/dist/src/components/KgVar/index.store.d.ts +2 -17
- package/dist/src/config/index.store.d.ts +17 -1
- package/dist/src/consts/i18n/en.d.ts +12 -0
- package/dist/src/consts/i18n/zh_CN.d.ts +12 -0
- package/dist/src/consts/index.vm.d.ts +8 -0
- package/package.json +1 -1
@@ -37,12 +37,10 @@ export interface IUseKgButton {
|
|
37
37
|
* <ul>
|
38
38
|
* <li>
|
39
39
|
* <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG__VAR_BUTTON__TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
|
40
|
-
* <p>调用方式如下: <code>isClickIntercepted({ type: KG__VAR_BUTTON__TYPE.CREATE });</code></p>
|
41
40
|
* </li>
|
42
41
|
* <li>
|
43
42
|
* <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG__VAR_BUTTON__TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
|
44
43
|
* <p>根据参数 {@link param.varName} 获取按钮.</p>
|
45
|
-
* <p>调用方式如下: <code>isClickIntercepted({ varName: 'SOME-OTHER-BUTTON' });</code></p>
|
46
44
|
* </li>
|
47
45
|
* </ul>
|
48
46
|
*
|
@@ -59,12 +57,10 @@ export interface IUseKgButton {
|
|
59
57
|
* <ul>
|
60
58
|
* <li>
|
61
59
|
* <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG__VAR_BUTTON__TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
|
62
|
-
* <p>调用方式如下: <code>isCurrentButton({ type: KG__VAR_BUTTON__TYPE.CREATE });</code></p>
|
63
60
|
* </li>
|
64
61
|
* <li>
|
65
62
|
* <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG__VAR_BUTTON__TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
|
66
63
|
* <p>根据参数 {@link param.varName} 获取按钮.</p>
|
67
|
-
* <p>调用方式如下: <code>isCurrentButton({ varName: 'SOME-OTHER-BUTTON' });</code></p>
|
68
64
|
* </li>
|
69
65
|
* </ul>
|
70
66
|
*
|
@@ -121,16 +117,13 @@ export interface IUseKgButton {
|
|
121
117
|
* <ul>
|
122
118
|
* <li>
|
123
119
|
* <p>如果参数 {@link param} === null, 表示清空「当前按钮」.</p>
|
124
|
-
* <p>调用方式如下: <code>setCurrentButton(null);</code></p>
|
125
120
|
* </li>
|
126
121
|
* <li>
|
127
122
|
* <p>否则, 如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG__VAR_BUTTON__TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
|
128
|
-
* <p>调用方式如下: <code>setCurrentButton({ type: KG__VAR_BUTTON__TYPE.CREATE });</code></p>
|
129
123
|
* </li>
|
130
124
|
* <li>
|
131
125
|
* <p>否则, 如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG__VAR_BUTTON__TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
|
132
126
|
* <p>根据参数 {@link param.varName} 获取按钮.</p>
|
133
|
-
* <p>调用方式如下: <code>setCurrentButton({ varName: 'SOME-OTHER-BUTTON' });</code></p>
|
134
127
|
* </li>
|
135
128
|
* </ul>
|
136
129
|
*
|
@@ -147,12 +140,10 @@ export interface IUseKgButton {
|
|
147
140
|
* <ul>
|
148
141
|
* <li>
|
149
142
|
* <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG__VAR_BUTTON__TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
|
150
|
-
* <p>调用方式如下: <code>setIsClickIntercepted({ type: KG__VAR_BUTTON__TYPE.CREATE, isIntercepted: true });</code></p>
|
151
143
|
* </li>
|
152
144
|
* <li>
|
153
145
|
* <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG__VAR_BUTTON__TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
|
154
146
|
* <p>根据参数 {@link param.varName} 获取按钮.</p>
|
155
|
-
* <p>调用方式如下: <code>setIsClickIntercepted({ varName: 'SOME-OTHER-BUTTON', isIntercepted: true });</code></p>
|
156
147
|
* </li>
|
157
148
|
* </ul>
|
158
149
|
*
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ComputedRef } from 'vue';
|
2
|
-
import { VarGridConfig } from '../../apis/WMS/models';
|
2
|
+
import { VarGridConfig, VarGridDetail } from '../../apis/WMS/models';
|
3
3
|
import { IRemoveEventListenerHandler } from '../../consts';
|
4
4
|
import { IKgTableAfterRequestEventListener, IKgTableBeforeParseParameterEventListener, IKgTableBeforeRequestEventListener, IKgTableBeforeSetDatasEventListener, IKgTableReadyEventListener, IKgTableRowDoubleClickEventListener, IKgTableStore } from './index.store';
|
5
5
|
export interface IUseKgTable {
|
@@ -9,6 +9,15 @@ export interface IUseKgTable {
|
|
9
9
|
datas: ComputedRef<ReturnType<IKgTableStore['getDatas']>>;
|
10
10
|
/** 界面标识. */
|
11
11
|
formID: string;
|
12
|
+
/**
|
13
|
+
* 获取某个「表格视图明细」.
|
14
|
+
*
|
15
|
+
* @param param
|
16
|
+
* @param param.varName 变量名称.
|
17
|
+
*/
|
18
|
+
getVarGridDetail(param: {
|
19
|
+
varName: string | null | undefined;
|
20
|
+
}): VarGridDetail | null;
|
12
21
|
/** 主键字段. */
|
13
22
|
id: ComputedRef<string>;
|
14
23
|
/** 是否自动查询. */
|
@@ -99,6 +108,17 @@ export interface IUseKgTable {
|
|
99
108
|
patchVarGridConfig(param: {
|
100
109
|
properties: VarGridConfig;
|
101
110
|
}): Promise<void>;
|
111
|
+
/**
|
112
|
+
* 修改「表格视图明细」的部分属性.
|
113
|
+
*
|
114
|
+
* @param param
|
115
|
+
* @param param.varName 变量名称.
|
116
|
+
* @param param.properties 要修改的部分属性.
|
117
|
+
*/
|
118
|
+
patchVarGridDetail(param: {
|
119
|
+
varName: string | null | undefined;
|
120
|
+
properties: VarGridDetail;
|
121
|
+
}): Promise<void>;
|
102
122
|
/**
|
103
123
|
* <p>查询参数.</p>
|
104
124
|
* <p>此查询参数是最终传给后端接口的参数, 包含了查询条件, 还包含了表格中的排序和分页, 还包含了表格配置中的参数.</p>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Key } from 'ant-design-vue/lib/_util/type';
|
2
2
|
import { StoreDefinition } from 'pinia';
|
3
3
|
import { Ref } from 'vue';
|
4
|
-
import { IPage, VarGridConfig } from '../../apis/WMS/models';
|
4
|
+
import { IPage, VarGridConfig, VarGridDetail } from '../../apis/WMS/models';
|
5
5
|
import { IKgEventListener } from '../../consts';
|
6
6
|
import { IKgTableRow, IKgTableRowHeight } from './index.vm';
|
7
7
|
/**
|
@@ -136,6 +136,9 @@ export interface IUseKgTableStoreGetters {
|
|
136
136
|
* 根据 formID 获取表格宽度.
|
137
137
|
*/
|
138
138
|
getTableWidth(): (formID: string | null | undefined) => number | null;
|
139
|
+
getVarGridDetail(): (formID: string | null | undefined, param: {
|
140
|
+
varName: string | null | undefined;
|
141
|
+
}) => VarGridDetail | null;
|
139
142
|
}
|
140
143
|
export interface IUseKgTableStoreActions {
|
141
144
|
/**
|
@@ -145,16 +148,6 @@ export interface IUseKgTableStoreActions {
|
|
145
148
|
* @param listener 事件监听函数.
|
146
149
|
*/
|
147
150
|
addEventListener(formID: string | null | undefined, event: IKgTableEvent, listener: IKgTableEventListener): void;
|
148
|
-
/**
|
149
|
-
* 修改「表格配置」的部分属性.
|
150
|
-
*
|
151
|
-
* @param formID 界面标识.
|
152
|
-
* @param param 其他参数.
|
153
|
-
* @param param.properties 要修改的部分属性.
|
154
|
-
*/
|
155
|
-
patchVarGridConfig(formID: string, param: {
|
156
|
-
properties: VarGridConfig;
|
157
|
-
}): Promise<void>;
|
158
151
|
/**
|
159
152
|
* 清空表格数据.
|
160
153
|
* @param formID 界面标识.
|
@@ -172,6 +165,28 @@ export interface IUseKgTableStoreActions {
|
|
172
165
|
* @param param 数据.
|
173
166
|
*/
|
174
167
|
emit<T = IKgTableEventListenerParameter>(formID: string | null | undefined, event: IKgTableEvent, param: T): Promise<boolean>;
|
168
|
+
/**
|
169
|
+
* 修改「表格配置」的部分属性.
|
170
|
+
*
|
171
|
+
* @param formID 界面标识.
|
172
|
+
* @param param
|
173
|
+
* @param param.properties 要修改的部分属性.
|
174
|
+
*/
|
175
|
+
patchVarGridConfig(formID: string, param: {
|
176
|
+
properties: VarGridConfig;
|
177
|
+
}): Promise<void>;
|
178
|
+
/**
|
179
|
+
* 修改「表格视图明细」的部分属性.
|
180
|
+
*
|
181
|
+
* @param formID 界面标识.
|
182
|
+
* @param param
|
183
|
+
* @param param.varName 变量名称.
|
184
|
+
* @param param.properties 要修改的部分属性.
|
185
|
+
*/
|
186
|
+
patchVarGridDetail(formID: string | null | undefined, param: {
|
187
|
+
varName: string | null | undefined;
|
188
|
+
properties: VarGridDetail;
|
189
|
+
}): Promise<void>;
|
175
190
|
/**
|
176
191
|
* 刷新勾选的行. 表格列表数据变更之后, 需要同步到勾选的行.
|
177
192
|
* @param formID 界面标识.
|
@@ -67,14 +67,14 @@ export declare type IUseKgVar = {
|
|
67
67
|
isDeletingRequesting: ComputedRef<ReturnType<IKgVarStore['isDeletingRequesting']>>;
|
68
68
|
/** 其他按钮:正在调用接口. */
|
69
69
|
isOtherRequesting: ComputedRef<ReturnType<IKgVarStore['isOtherRequesting']>>;
|
70
|
+
/** 变量配置是否查询完成. */
|
71
|
+
isRequested: ComputedRef<ReturnType<IKgVarStore['isRequested']>>;
|
70
72
|
/** 正在查询变量配置. */
|
71
73
|
isRetrieving: ComputedRef<ReturnType<IKgVarStore['isRetrieving']>>;
|
72
74
|
/** 正在查询 VarGridMaster. */
|
73
75
|
isRetrievingVarGridMaster: ComputedRef<ReturnType<IKgVarStore['isRetrievingVarGridMaster']>>;
|
74
76
|
/** 正在查询 VarProfileMaster. */
|
75
77
|
isRetrievingVarProfileMaster: ComputedRef<ReturnType<IKgVarStore['isRetrievingVarProfileMaster']>>;
|
76
|
-
/** 变量配置是否查询完成. */
|
77
|
-
isSearched: ComputedRef<ReturnType<IKgVarStore['isSearched']>>;
|
78
78
|
/**
|
79
79
|
* 是否正在更新.
|
80
80
|
*/
|
@@ -117,7 +117,6 @@ export interface IUseKgVarStoreGetters {
|
|
117
117
|
getVarGridConfig(): (formID: string | null | undefined) => VarGridConfig | null;
|
118
118
|
/** 获取所有的 VarGridConfig. */
|
119
119
|
getVarGridConfigMap(): Map<string, VarGridConfig | null>;
|
120
|
-
getVarGridDetail(): (formID: string | null | undefined, varName: string | null | undefined) => VarGridDetail | null;
|
121
120
|
/**
|
122
121
|
* 获取 VarGridMaster 列表.
|
123
122
|
*/
|
@@ -136,11 +135,11 @@ export interface IUseKgVarStoreGetters {
|
|
136
135
|
isCreatingRequesting(): (formID: string | null | undefined) => boolean | null;
|
137
136
|
isDeletingRequesting(): (formID: string | null | undefined) => boolean | null;
|
138
137
|
isOtherRequesting(): (formID: string | null | undefined) => boolean | null;
|
138
|
+
/** 变量配置是否查询完成. */
|
139
|
+
isRequested(): (formID: string | null | undefined) => boolean;
|
139
140
|
isRetrieving(): (formID: string | null | undefined) => boolean | null;
|
140
141
|
isRetrievingVarGridMaster(): (formID: string | null | undefined) => boolean | null;
|
141
142
|
isRetrievingVarProfileMaster(): (formID: string | null | undefined) => boolean | null;
|
142
|
-
/** 变量配置是否查询完成. */
|
143
|
-
isSearched(): (formID: string | null | undefined) => boolean;
|
144
143
|
isUpdatingRequesting(): (formID: string | null | undefined) => boolean | null;
|
145
144
|
/**
|
146
145
|
* 翻译变量.
|
@@ -185,13 +184,6 @@ export interface IUseKgVarStoreActions {
|
|
185
184
|
formID: string;
|
186
185
|
level: number;
|
187
186
|
}): Promise<void>;
|
188
|
-
/**
|
189
|
-
* 修改 VarGridDetail 的部分属性.
|
190
|
-
* @param formID 界面标识.
|
191
|
-
* @param var_nam 变量名称.
|
192
|
-
* @param properties 要修改的部分属性.
|
193
|
-
*/
|
194
|
-
patchVarGridDetail(formID: string, var_nam: string | null | undefined, properties: VarGridDetail): Promise<void>;
|
195
187
|
/**
|
196
188
|
* 修改 VarConfigPossibility 的接口参数 cmd_prm 的部分属性.
|
197
189
|
* @param formID 界面标识.
|
@@ -240,13 +232,6 @@ export interface IUseKgVarStoreActions {
|
|
240
232
|
setIsDeletingRequesting(formID: string, value: boolean): void;
|
241
233
|
setIsOtherRequesting(formID: string, value: boolean): void;
|
242
234
|
setIsUpdatingRequesting(formID: string, value: boolean): void;
|
243
|
-
/**
|
244
|
-
* 设置列的宽度.
|
245
|
-
* @param formID 界面标识.
|
246
|
-
* @param var_nam 变量名称.
|
247
|
-
* @param width 新的宽度.
|
248
|
-
*/
|
249
|
-
setVarGridDetailWidth(formID: string, var_nam: string | null | undefined, width: number): void;
|
250
235
|
/**
|
251
236
|
* 设置某个 VarConfigPossibility 配置.
|
252
237
|
* @param formID 界面标识.
|
@@ -72,7 +72,9 @@ export declare type IKgOption = {
|
|
72
72
|
*/
|
73
73
|
on?: boolean;
|
74
74
|
};
|
75
|
-
/**
|
75
|
+
/**
|
76
|
+
* 表格设置菜单.
|
77
|
+
*/
|
76
78
|
Setting?: {
|
77
79
|
/** 行高. */
|
78
80
|
rowHeight?: {
|
@@ -83,6 +85,20 @@ export declare type IKgOption = {
|
|
83
85
|
on?: boolean;
|
84
86
|
};
|
85
87
|
};
|
88
|
+
/**
|
89
|
+
* 表头.
|
90
|
+
*/
|
91
|
+
HeaderCell?: {
|
92
|
+
/**
|
93
|
+
* 右键菜单.
|
94
|
+
*/
|
95
|
+
contextMenu?: {
|
96
|
+
/**
|
97
|
+
* @default false
|
98
|
+
*/
|
99
|
+
isOn?: boolean;
|
100
|
+
};
|
101
|
+
};
|
86
102
|
};
|
87
103
|
/** 仓库选择. */
|
88
104
|
KgWarehouse?: {
|
@@ -115,6 +115,18 @@ declare const _default: {
|
|
115
115
|
totalText: string;
|
116
116
|
varGridMasters: string;
|
117
117
|
};
|
118
|
+
KgTableHeaderCell: {
|
119
|
+
align: string;
|
120
|
+
alignCenter: string;
|
121
|
+
alignLeft: string;
|
122
|
+
alignRight: string;
|
123
|
+
hide: string;
|
124
|
+
isEllipsis: string;
|
125
|
+
isFilter: string;
|
126
|
+
isFixToLeft: string;
|
127
|
+
isFixToRight: string;
|
128
|
+
isSort: string;
|
129
|
+
};
|
118
130
|
KgTableInfo: {
|
119
131
|
check: string;
|
120
132
|
clearCheck: string;
|
@@ -115,6 +115,18 @@ declare const _default: {
|
|
115
115
|
totalText: string;
|
116
116
|
varGridMasters: string;
|
117
117
|
};
|
118
|
+
KgTableHeaderCell: {
|
119
|
+
align: string;
|
120
|
+
alignCenter: string;
|
121
|
+
alignLeft: string;
|
122
|
+
alignRight: string;
|
123
|
+
hide: string;
|
124
|
+
isEllipsis: string;
|
125
|
+
isFilter: string;
|
126
|
+
isFixToLeft: string;
|
127
|
+
isFixToRight: string;
|
128
|
+
isSort: string;
|
129
|
+
};
|
118
130
|
KgTableInfo: {
|
119
131
|
check: string;
|
120
132
|
clearCheck: string;
|
@@ -166,6 +166,14 @@ export declare const enum KG__VAR_GRID_DETAIL__DISPLAY_TYPE {
|
|
166
166
|
*/
|
167
167
|
ICON = "ICON"
|
168
168
|
}
|
169
|
+
/**
|
170
|
+
* 表格单元格的对齐方式.
|
171
|
+
*/
|
172
|
+
export declare const enum KG__VAR_GRID_DETAIL__ALIGN {
|
173
|
+
LEFT = "left",
|
174
|
+
CENTER = "center",
|
175
|
+
RIGHT = "right"
|
176
|
+
}
|
169
177
|
/** @deprecated 已弃用, 请使用 {@link KG__VAR_BUTTON__TYPE}. */
|
170
178
|
export declare const enum KG_BUTTON_TYPE {
|
171
179
|
/** 查询. */
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kengic/vue",
|
3
|
-
"version": "0.23.
|
3
|
+
"version": "0.23.7",
|
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",
|