@kengic/vue 0.23.7-beta.0 → 0.23.8-beta.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 界面标识.
@@ -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
  */
@@ -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
  /** 查询. */
@@ -6,26 +6,26 @@ export declare const getProps: () => {
6
6
  * @default false
7
7
  */
8
8
  kgVisible: PropType<boolean>;
9
- 'onUpdate:kgVisible': PropType<(value: boolean) => void>;
10
9
  onKgOk: PropType<() => void>;
10
+ 'onUpdate:kgVisible': PropType<(value: boolean) => void>;
11
11
  };
12
- export declare type IKgPageDdaCreateProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
12
+ export declare type KgPageDdaCreateProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
13
13
  declare const _default: import("vue").DefineComponent<{
14
14
  /**
15
15
  * 是否显示.
16
16
  * @default false
17
17
  */
18
18
  kgVisible: PropType<boolean>;
19
- 'onUpdate:kgVisible': PropType<(value: boolean) => void>;
20
19
  onKgOk: PropType<() => void>;
20
+ 'onUpdate:kgVisible': PropType<(value: boolean) => void>;
21
21
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgOk" | "update:kgVisible")[], "kgOk" | "update:kgVisible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
22
22
  /**
23
23
  * 是否显示.
24
24
  * @default false
25
25
  */
26
26
  kgVisible: PropType<boolean>;
27
- 'onUpdate:kgVisible': PropType<(value: boolean) => void>;
28
27
  onKgOk: PropType<() => void>;
28
+ 'onUpdate:kgVisible': PropType<(value: boolean) => void>;
29
29
  }>> & {
30
30
  onKgOk?: ((...args: any[]) => any) | undefined;
31
31
  "onUpdate:kgVisible"?: ((...args: any[]) => any) | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.23.7-beta.0",
3
+ "version": "0.23.8-beta.0",
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",