@base-stone/hooks 1.0.9 → 1.1.2

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.
@@ -223,7 +223,9 @@ function le({ queryFn: s, params: t, dataKey: o, fieldNames: e }) {
223
223
  } else
224
224
  n((g) => ({ ...g, options: v }));
225
225
  u(!1);
226
- }, a = M(void 0);
226
+ }, a = M(() => {
227
+ c();
228
+ });
227
229
  z(() => {
228
230
  c();
229
231
  }, []);
@@ -257,17 +259,21 @@ function de({
257
259
  dataKey: e,
258
260
  initialValue: r
259
261
  }) {
260
- const n = r || (o === "Array" ? [] : /* @__PURE__ */ Object.create({})), [p, u] = S(n), [c, a] = S(!1), l = b(t), f = async (i) => {
262
+ const n = r || (o === "Array" ? [] : /* @__PURE__ */ Object.create({})), [p, u] = S(n), [c, a] = S(!1), l = b(t), f = async (v) => {
261
263
  a(!0);
262
- const v = await s(i ?? t);
263
- u(v.data);
264
+ const g = await s(v ?? t);
265
+ u(g.data);
264
266
  };
265
- return z(() => {
267
+ z(() => {
266
268
  f(l.current);
267
- }, []), {
269
+ }, []);
270
+ const i = M(() => {
271
+ f();
272
+ });
273
+ return {
268
274
  [e]: p,
269
275
  loading: c,
270
- refresh: void M(f)
276
+ refresh: i
271
277
  };
272
278
  }
273
279
  export {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@base-stone/hooks",
3
3
  "license": "MIT",
4
- "version": "1.0.9",
4
+ "version": "1.1.2",
5
5
  "author": {
6
6
  "name": "leafront",
7
7
  "email": "leafront@126.com"