@kengic/vue 0.22.0 → 0.23.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +178 -139
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +4201 -3969
- package/dist/project/build/script/postBuild.ts +1 -1
- package/dist/src/apis/WMS/Controllers/DescriptionController/ListByCodeNamesAndCodeValues.d.ts +16 -0
- package/dist/src/apis/WMS/Controllers/DescriptionController/index.d.ts +1 -0
- package/dist/src/apis/WMS/models.d.ts +8 -0
- package/dist/src/components/KgButton/index.hooks.d.ts +74 -199
- package/dist/src/components/KgButton/index.store.d.ts +48 -184
- package/dist/src/components/KgForm/index.hooks.d.ts +22 -28
- package/dist/src/components/KgForm/index.store.d.ts +22 -15
- package/dist/src/components/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +2 -0
- package/dist/src/components/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +0 -2
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.d.ts +2 -4
- package/dist/src/components/KgSearch/index.hooks.d.ts +31 -136
- package/dist/src/components/KgSearch/index.store.d.ts +59 -175
- package/dist/src/components/KgSubmit/index.hooks.d.ts +80 -279
- package/dist/src/components/KgSubmit/index.store.d.ts +40 -225
- package/dist/src/components/KgTable/{KgTable.hooks.d.ts → KgTable.service.d.ts} +8 -16
- package/dist/src/components/KgTable/components/setting/KgTable.Setting.d.ts +0 -1
- package/dist/src/components/KgTable/components/setting/config/KgTable.Setting.ConfigModal.d.ts +0 -2
- package/dist/src/components/KgTable/index.hooks.d.ts +65 -428
- package/dist/src/components/KgTable/index.store.d.ts +87 -621
- package/dist/src/components/KgVar/index.hooks.d.ts +105 -3622
- package/dist/src/components/KgVar/index.store.d.ts +129 -3213
- package/dist/src/config/index.hooks.d.ts +31 -38
- package/dist/src/config/index.store.d.ts +74 -52
- package/dist/src/consts/i18n/en.d.ts +1 -0
- package/dist/src/consts/i18n/zh_CN.d.ts +1 -0
- package/dist/src/consts/index.d.ts +20 -13
- package/dist/src/consts/index.vm.d.ts +78 -51
- package/dist/src/pages/KgPageDda/components/KgPageDda.Create.store.d.ts +1 -1
- package/dist/src/utils/kg-route.util.d.ts +3 -2
- package/dist/src/utils/kg.util.d.ts +2 -2
- package/package.json +1 -1
- /package/dist/src/components/KgForm.Item/{KgForm.Item.hooks.d.ts → KgForm.Item.service.d.ts} +0 -0
- /package/dist/src/components/KgForm.Item/components/{KgForm.Item.Select.hooks.d.ts → KgForm.Item.Select.service.d.ts} +0 -0
- /package/dist/src/components/KgModal/{KgModal.hooks.d.ts → KgModal.service.d.ts} +0 -0
- /package/dist/src/components/KgSearch/{KgSearch.hooks.d.ts → KgSearch.service.d.ts} +0 -0
- /package/dist/src/components/KgSubmit/{KgSubmit.hooks.d.ts → KgSubmit.service.d.ts} +0 -0
- /package/dist/src/components/KgTable/components/setting/{KgTable.Setting.hooks.d.ts → KgTable.Setting.service.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
@@ -1,177 +1,216 @@
|
|
1
|
-
# 0.
|
1
|
+
# 0.23.0
|
2
|
+
|
3
|
+
### 1. 修改组件 API 的获取方式, 由方法改为属性,
|
4
|
+
|
5
|
+
```typescript
|
6
|
+
// 旧
|
7
|
+
// --------------------------------------------------
|
8
|
+
const kgVar = useKgVar();
|
9
|
+
|
10
|
+
kgVar.xxx;
|
11
|
+
kgVar.kgButton().xxx;
|
12
|
+
kgVar.kgForm().xxx;
|
13
|
+
kgVar.kgSearch().xxx;
|
14
|
+
kgVar.kgSubmit().xxx;
|
15
|
+
kgVar.kgTable().xxx;
|
16
|
+
|
17
|
+
// 新
|
18
|
+
// --------------------------------------------------
|
19
|
+
const kgVar = useKgVar();
|
20
|
+
|
21
|
+
kgVar.xxx;
|
22
|
+
kgVar.kgButton.xxx;
|
23
|
+
kgVar.kgForm.xxx;
|
24
|
+
kgVar.kgSearch.xxx;
|
25
|
+
kgVar.kgSubmit.xxx;
|
26
|
+
kgVar.kgTable.xxx;
|
27
|
+
```
|
28
|
+
|
29
|
+
# 0.22.0
|
30
|
+
|
31
|
+
### 1. 重命名类
|
2
32
|
|
3
|
-
|
33
|
+
| 旧 | 新 |
|
34
|
+
| :--------------------- | :------------------- |
|
35
|
+
| VarContext | VarVariable |
|
36
|
+
| VarVariableConfig | VarConfigControl |
|
37
|
+
| VarVariableCatalog | VarConfigDescription |
|
38
|
+
| VarVariableInput | VarConfigInput |
|
39
|
+
| VarVariableLookup | VarConfigLookup |
|
40
|
+
| VarVariablePossibility | VarConfigPossibility |
|
41
|
+
| VarSubmitField | VarSubmitDetail |
|
4
42
|
|
5
|
-
|
6
|
-
| :--------------------- | :------------------- |
|
7
|
-
| VarContext | VarVariable |
|
8
|
-
| VarVariableConfig | VarConfigControl |
|
9
|
-
| VarVariableCatalog | VarConfigDescription |
|
10
|
-
| VarVariableInput | VarConfigInput |
|
11
|
-
| VarVariableLookup | VarConfigLookup |
|
12
|
-
| VarVariablePossibility | VarConfigPossibility |
|
13
|
-
| VarSubmitField | VarSubmitDetail |
|
43
|
+
### 2. 重命名表
|
14
44
|
|
15
|
-
|
45
|
+
| 旧 | 新 |
|
46
|
+
| :---------- | :--------------------- |
|
47
|
+
| var_ctx | var_variable |
|
48
|
+
| var_btn | var_button |
|
49
|
+
| var_cfg | var_config_control |
|
50
|
+
| var_cat | var_config_description |
|
51
|
+
| var_var_ipt | var_config_input |
|
52
|
+
| var_lkp | var_config_lookup |
|
53
|
+
| var_psb | var_config_possibility |
|
54
|
+
| var_grd_cfg | var_grid_config |
|
55
|
+
| var_grd_dtl | var_grid_detail |
|
56
|
+
| var_grd_mst | var_grid_master |
|
57
|
+
| var_prf_cfg | var_profile_config |
|
58
|
+
| var_prf_dtl | var_profile_detail |
|
59
|
+
| var_prf_mst | var_profile_master |
|
60
|
+
| var_sbt_cfg | var_submit_config |
|
61
|
+
| var_sbt_fld | var_submit_detail |
|
16
62
|
|
17
|
-
|
18
|
-
| :---------- | :--------------------- |
|
19
|
-
| var_ctx | var_variable |
|
20
|
-
| var_btn | var_button |
|
21
|
-
| var_cfg | var_config_control |
|
22
|
-
| var_cat | var_config_description |
|
23
|
-
| var_var_ipt | var_config_input |
|
24
|
-
| var_lkp | var_config_lookup |
|
25
|
-
| var_psb | var_config_possibility |
|
26
|
-
| var_grd_cfg | var_grid_config |
|
27
|
-
| var_grd_dtl | var_grid_detail |
|
28
|
-
| var_grd_mst | var_grid_master |
|
29
|
-
| var_prf_cfg | var_profile_config |
|
30
|
-
| var_prf_dtl | var_profile_detail |
|
31
|
-
| var_prf_mst | var_profile_master |
|
32
|
-
| var_sbt_cfg | var_submit_config |
|
33
|
-
| var_sbt_fld | var_submit_detail |
|
63
|
+
### 3. `KgSearch`,`KgButton`,`KgTable`,`KgSubmit` 等组件的 API 不用再单独获取, 可以直接从 `kgVar` 中获取,
|
34
64
|
|
35
|
-
|
65
|
+
```typescript
|
66
|
+
// 旧
|
67
|
+
// --------------------------------------------------
|
68
|
+
const kgVar = useKgVar();
|
69
|
+
const kgButton = usekgButton();
|
70
|
+
const kgForm = usekgForm();
|
71
|
+
const kgSearch = useKgSearch();
|
72
|
+
const kgSubmit = useKgSubmit();
|
73
|
+
const kgTable = useKgTable();
|
36
74
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
// ...
|
75
|
+
kgVar.xxx;
|
76
|
+
kgButton.xxx;
|
77
|
+
kgForm.xxx;
|
78
|
+
kgSearch.xxx;
|
79
|
+
kgSubmit.xxx;
|
80
|
+
kgTable.xxx;
|
44
81
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
// ...
|
82
|
+
// 新
|
83
|
+
// --------------------------------------------------
|
84
|
+
const kgVar = useKgVar();
|
49
85
|
|
50
|
-
|
51
|
-
|
52
|
-
|
86
|
+
kgVar.xxx;
|
87
|
+
kgVar.kgButton().xxx;
|
88
|
+
kgVar.kgForm().xxx;
|
89
|
+
kgVar.kgSearch().xxx;
|
90
|
+
kgVar.kgSubmit().xxx;
|
91
|
+
kgVar.kgTable().xxx;
|
92
|
+
```
|
53
93
|
|
54
|
-
|
55
|
-
kgVar.kgSearch().onSearch();
|
56
|
-
kgVar.kgButton().onClick();
|
57
|
-
// ...
|
58
|
-
```
|
94
|
+
### 4. `kgVar` 中的部分方法移到对应的组件的 API 中并且重命名:
|
59
95
|
|
60
|
-
4.
|
96
|
+
#### 4.1. kgButton
|
61
97
|
|
62
|
-
|
98
|
+
`kgVar.setIsCreating(true)` 变更为 `kgVar.kgButton.setCurrentButton({ type: KG_BUTTON_TYPE.CREATE });`
|
63
99
|
|
64
|
-
|
100
|
+
`kgVar.setIsUpdating(true)` 变更为 `kgVar.kgButton.setCurrentButton({ type: KG_BUTTON_TYPE.UPDATE });`
|
65
101
|
|
66
|
-
|
102
|
+
`kgVar.setIsCopying(true)` 变更为 `kgVar.kgButton.setCurrentButton({ type: KG_BUTTON_TYPE.COPY });`
|
103
|
+
|
104
|
+
`kgVar.setIsDeleting(true)` 变更为 `kgVar.kgButton.setCurrentButton({ type: KG_BUTTON_TYPE.DELETE });`
|
105
|
+
|
106
|
+
`kgVar.setIsCreating(false)` 变更为 `kgVar.kgButton.setCurrentButton(null);`
|
107
|
+
|
108
|
+
`kgVar.setIsUpdating(false)` 变更为 `kgVar.kgButton.setCurrentButton(null);`
|
67
109
|
|
68
|
-
|
110
|
+
`kgVar.setIsCopying(false)` 变更为 `kgVar.kgButton.setCurrentButton(null);`
|
111
|
+
|
112
|
+
`kgVar.setIsDeleting(false)` 变更为 `kgVar.kgButton.setCurrentButton(null);`
|
69
113
|
|
70
|
-
|
114
|
+
#### 4.2. kgSubmit
|
71
115
|
|
72
|
-
|
116
|
+
`kgVar.patchVarSubmitField()` 变更为 `kgVar.kgSubmit.patchVarSubmitDetail()`
|
73
117
|
|
74
|
-
|
118
|
+
`kgButton.onDeleteOk()` 变更为 `kgVar.kgSubmit.onOk()`
|
75
119
|
|
76
|
-
|
120
|
+
### 5. kgVar.kgButton.onClick() 事件回调函数参数类型变更,
|
77
121
|
|
78
|
-
|
122
|
+
```typescript
|
123
|
+
// 旧
|
124
|
+
// --------------------------------------------------
|
125
|
+
kgVar.kgButton.onClick(async (button) => {});
|
79
126
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
---
|
127
|
+
// 新
|
128
|
+
// --------------------------------------------------
|
129
|
+
kgVar.kgButton.onClick(async ({ button }) => {});
|
130
|
+
```
|
85
131
|
|
86
132
|
# 0.21.0
|
87
133
|
|
88
|
-
1. 查询条件中的日期范围, 对右侧的日期做了处理, 如果格式是 `YYYY-MM-DD` 则加上一天, 如果格式是 `YYYY-MM-DD HH:mm:ss` 则加上一秒,
|
89
|
-
|
90
|
-
---
|
134
|
+
### 1. 查询条件中的日期范围, 对右侧的日期做了处理, 如果格式是 `YYYY-MM-DD` 则加上一天, 如果格式是 `YYYY-MM-DD HH:mm:ss` 则加上一秒,
|
91
135
|
|
92
136
|
# 0.20.0
|
93
137
|
|
94
|
-
1. `kg-search-header-teleport` 重命名为 `kg-layout-header-teleport`,
|
95
|
-
2. 添加配置 `IKgOption.KgLayoutTab.isTeleportToHeader` 并且默认为 `true`, 即多标签页默认会放到页面头部,
|
138
|
+
### 1. `kg-search-header-teleport` 重命名为 `kg-layout-header-teleport`,
|
96
139
|
|
97
|
-
|
140
|
+
### 2. 添加配置 `IKgOption.KgLayoutTab.isTeleportToHeader` 并且默认为 `true`, 即多标签页默认会放到页面头部,
|
98
141
|
|
99
142
|
# 0.19.0
|
100
143
|
|
101
|
-
1. 支持新版本的 DDA 的创建, 需要更新数据 `20240401000000000.sql`
|
102
|
-
|
103
|
-
---
|
144
|
+
### 1. 支持新版本的 DDA 的创建, 需要更新数据 `20240401000000000.sql`
|
104
145
|
|
105
146
|
# 0.18.0
|
106
147
|
|
107
|
-
1. `kgTable.store.setDatas()` 方法参数类型变更,
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
2. 移除 `kgTable.onBeforeSetDatas()` 事件回调函数参数中的 `setDatas` 方法, 改为直接调用 `kgTable.store.setDatas()` 方法,
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
148
|
+
### 1. `kgTable.store.setDatas()` 方法参数类型变更,
|
149
|
+
|
150
|
+
```typescript
|
151
|
+
// 旧
|
152
|
+
// --------------------------------------------------
|
153
|
+
kgTable.store.setDatas(frmId, datas);
|
154
|
+
|
155
|
+
// 新
|
156
|
+
// --------------------------------------------------
|
157
|
+
kgTable.store.setDatas({ frmId: frmId, datas: datas });
|
158
|
+
```
|
159
|
+
|
160
|
+
### 2. 移除 `kgTable.onBeforeSetDatas()` 事件回调函数参数中的 `setDatas` 方法, 改为直接调用 `kgTable.store.setDatas()` 方法,
|
161
|
+
|
162
|
+
```typescript
|
163
|
+
// 旧
|
164
|
+
// --------------------------------------------------
|
165
|
+
kgTable.onBeforeSetDatas(async ({ datas, setDatas }) => {
|
166
|
+
setDatas([]);
|
167
|
+
});
|
168
|
+
|
169
|
+
// 新
|
170
|
+
// --------------------------------------------------
|
171
|
+
kgTable.onBeforeSetDatas(async ({ datas }) => {
|
172
|
+
kgTable.store.setDatas({
|
173
|
+
frmId: '',
|
174
|
+
datas: [],
|
126
175
|
});
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
176
|
+
});
|
177
|
+
```
|
178
|
+
|
179
|
+
### 3. 移除 `kgTable.onAfterSearch()` 事件回调函数参数中的 `setDatas` 方法, 改为直接调用 `kgTable.store.setDatas()` 方法,
|
180
|
+
|
181
|
+
```typescript
|
182
|
+
// 旧
|
183
|
+
// --------------------------------------------------
|
184
|
+
kgTable.onAfterSearch(async ({ datas, setDatas }) => {
|
185
|
+
setDatas([]);
|
186
|
+
});
|
187
|
+
|
188
|
+
// 新
|
189
|
+
// --------------------------------------------------
|
190
|
+
kgTable.onAfterSearch(async ({ datas }) => {
|
191
|
+
kgTable.store.setDatas({
|
192
|
+
frmId: '',
|
193
|
+
datas: [],
|
135
194
|
});
|
136
|
-
|
137
|
-
|
138
|
-
3. 移除 `kgTable.onAfterSearch()` 事件回调函数参数中的 `setDatas` 方法, 改为直接调用 `kgTable.store.setDatas()` 方法,
|
139
|
-
|
140
|
-
```typescript
|
141
|
-
// 旧
|
142
|
-
// --------------------------------------------------
|
143
|
-
kgTable.onAfterSearch(async ({ datas, setDatas }) => {
|
144
|
-
setDatas([]);
|
145
|
-
});
|
146
|
-
|
147
|
-
// 新
|
148
|
-
// --------------------------------------------------
|
149
|
-
kgTable.onAfterSearch(async ({ datas }) => {
|
150
|
-
kgTable.store.setDatas({
|
151
|
-
frmId: '',
|
152
|
-
datas: [],
|
153
|
-
});
|
154
|
-
});
|
155
|
-
```
|
156
|
-
|
157
|
-
---
|
195
|
+
});
|
196
|
+
```
|
158
197
|
|
159
198
|
# 0.17.0
|
160
199
|
|
161
|
-
1. `kgForm.onSelectChange()` 事件回调函数参数类型变更,
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
200
|
+
### 1. `kgForm.onSelectChange()` 事件回调函数参数类型变更,
|
201
|
+
|
202
|
+
```typescript
|
203
|
+
// 旧
|
204
|
+
// --------------------------------------------------
|
205
|
+
kgForm.onSelectChange(async ({ rows }) => {
|
206
|
+
// rows 是单个对象
|
207
|
+
const item = rows as any;
|
208
|
+
});
|
209
|
+
|
210
|
+
// 新
|
211
|
+
// --------------------------------------------------
|
212
|
+
kgForm.onSelectChange(async ({ rows }) => {
|
213
|
+
// rows 是数组
|
214
|
+
const item = rows?.[0] as any;
|
215
|
+
});
|
216
|
+
```
|