@kengic/vue 0.19.1 → 0.19.2-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 CHANGED
@@ -18,9 +18,43 @@
18
18
  kgTable.store.setDatas({ frmId: frmId, datas: datas });
19
19
  ```
20
20
 
21
- 2. 移除 `IKgTableBeforeSetDatasCbParam.setDatas()` 参数方法, 可以直接调用 `kgTable.store.setDatas()` 方法,
21
+ 2. 移除 `kgTable.onBeforeSetDatas()` 事件回调函数参数中的 `setDatas` 方法, 改为直接调用 `kgTable.store.setDatas()` 方法,
22
22
 
23
- 3. 移除 `IKgTableAfterSearchCbParam.setDatas()` 参数方法, 可以直接调用 `kgTable.store.setDatas()` 方法,
23
+ ```typescript
24
+ // 旧
25
+ // --------------------------------------------------
26
+ kgTable.onBeforeSetDatas(async ({ datas, setDatas }) => {
27
+ setDatas([]);
28
+ });
29
+
30
+ // 新
31
+ // --------------------------------------------------
32
+ kgTable.onBeforeSetDatas(async ({ datas }) => {
33
+ kgTable.store.setDatas({
34
+ frmId: '',
35
+ datas: [],
36
+ });
37
+ });
38
+ ```
39
+
40
+ 3. 移除 `kgTable.onAfterSearch()` 事件回调函数参数中的 `setDatas` 方法, 改为直接调用 `kgTable.store.setDatas()` 方法,
41
+
42
+ ```typescript
43
+ // 旧
44
+ // --------------------------------------------------
45
+ kgTable.onAfterSearch(async ({ datas, setDatas }) => {
46
+ setDatas([]);
47
+ });
48
+
49
+ // 新
50
+ // --------------------------------------------------
51
+ kgTable.onAfterSearch(async ({ datas }) => {
52
+ kgTable.store.setDatas({
53
+ frmId: '',
54
+ datas: [],
55
+ });
56
+ });
57
+ ```
24
58
 
25
59
  ---
26
60