@base-stone/hooks 1.2.3 → 1.2.5
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/dist/design-hooks.es.prod.d.ts +14 -14
- package/dist/design-hooks.es.prod.js +156 -154
- package/package.json +6 -6
|
@@ -33,7 +33,7 @@ declare interface GlobalTableConfig {
|
|
|
33
33
|
pageSize: number;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
declare type MapData<
|
|
36
|
+
declare type MapData<K extends string | number = string | number> = Map<K, string | number | undefined>;
|
|
37
37
|
|
|
38
38
|
declare interface ModalConfig<T = Record<string, any>> {
|
|
39
39
|
width: number;
|
|
@@ -72,11 +72,11 @@ declare type PickFunction<T extends noop> = (this: ThisParameterType<T>, ...args
|
|
|
72
72
|
|
|
73
73
|
declare type Placement = 'top' | 'bottom' | 'left' | 'right';
|
|
74
74
|
|
|
75
|
-
declare interface QueryOptions<
|
|
75
|
+
declare interface QueryOptions<T = Record<string, any>> {
|
|
76
76
|
queryFn: (data: QueryParamsData_2) => Promise<QueryResponse_2<T>>;
|
|
77
77
|
params?: Record<string, any> | undefined;
|
|
78
78
|
dataType: DataType;
|
|
79
|
-
dataKey:
|
|
79
|
+
dataKey: string;
|
|
80
80
|
transform?: (result: Record<string, any>) => Record<string, any>[];
|
|
81
81
|
initialValue?: Record<string, any> | Record<string, any>[];
|
|
82
82
|
}
|
|
@@ -101,11 +101,11 @@ declare interface QueryResponse_2<T> {
|
|
|
101
101
|
data: T;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
declare type QueryResult<
|
|
104
|
+
declare type QueryResult<T = Record<string, any>> = {
|
|
105
105
|
loading: boolean;
|
|
106
106
|
refresh: (params?: Record<string, any> | undefined) => void;
|
|
107
107
|
} & {
|
|
108
|
-
[P in
|
|
108
|
+
[P in string]?: T;
|
|
109
109
|
};
|
|
110
110
|
|
|
111
111
|
declare interface RequestFn {
|
|
@@ -115,10 +115,10 @@ declare interface RequestFn {
|
|
|
115
115
|
}>;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
declare interface SelectConfig
|
|
118
|
+
declare interface SelectConfig {
|
|
119
119
|
queryFn: (data: Record<string, any>) => Promise<QueryResponse>;
|
|
120
120
|
params?: Record<string, any>;
|
|
121
|
-
dataKey:
|
|
121
|
+
dataKey: string;
|
|
122
122
|
transform?: (result: Record<string, any>) => Record<string, any>[];
|
|
123
123
|
fieldNames?: {
|
|
124
124
|
label: string;
|
|
@@ -126,20 +126,20 @@ declare interface SelectConfig<K extends string> {
|
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
declare type SelectOption<
|
|
129
|
+
declare type SelectOption<K extends string | number = string | number> = {
|
|
130
130
|
label: string;
|
|
131
|
-
value:
|
|
131
|
+
value: K;
|
|
132
132
|
data?: Record<string, unknown>;
|
|
133
133
|
[key: string]: any;
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
-
declare type SelectOptionsResult<K extends string
|
|
136
|
+
declare type SelectOptionsResult<K extends string | number> = Readonly<{
|
|
137
137
|
loading: boolean;
|
|
138
138
|
refresh: () => void;
|
|
139
139
|
} & {
|
|
140
|
-
[P in `${K}Options`]: (SelectOption<
|
|
140
|
+
[P in `${K}Options`]: (SelectOption<K> & Record<string, any>)[];
|
|
141
141
|
} & {
|
|
142
|
-
[P in `${K}Map`]?: MapData<
|
|
142
|
+
[P in `${K}Map`]?: MapData<K>;
|
|
143
143
|
}>;
|
|
144
144
|
|
|
145
145
|
declare interface SuccessFn {
|
|
@@ -200,9 +200,9 @@ export declare function useFormSubmit(requestFn: RequestFn, successFn: SuccessFn
|
|
|
200
200
|
|
|
201
201
|
export declare function useMemoizedFn<T extends noop>(fn: T): PickFunction<T>;
|
|
202
202
|
|
|
203
|
-
export declare function useRequestQuery<
|
|
203
|
+
export declare function useRequestQuery<T = Record<string, any> | Record<string, any>[] | undefined>({ queryFn, params, dataType, dataKey, initialValue, transform }: QueryOptions<T>): QueryResult<T>;
|
|
204
204
|
|
|
205
|
-
export declare function useSelectOptions<
|
|
205
|
+
export declare function useSelectOptions<K extends string | number = string | number>({ queryFn, params, dataKey, fieldNames, transform }: SelectConfig): SelectOptionsResult<K>;
|
|
206
206
|
|
|
207
207
|
export declare function useTableList<T extends Record<string, any> = Record<string, any>>({ queryFn, params: initParams, transform, rowSelection }: TableOptions<T>): TableResult<T>;
|
|
208
208
|
|
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
import { Empty as
|
|
1
|
+
import { useRef as _, useMemo as I, useState as v, useEffectEvent as j, useEffect as P, useId as W, useCallback as X } from "react";
|
|
2
|
+
import { Empty as q, App as K } from "antd";
|
|
3
3
|
import { create as ee } from "zustand";
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var N = { exports: {} }, R = {};
|
|
5
|
+
var J;
|
|
6
6
|
function te() {
|
|
7
|
-
if (
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
function
|
|
7
|
+
if (J) return R;
|
|
8
|
+
J = 1;
|
|
9
|
+
var r = /* @__PURE__ */ Symbol.for("react.transitional.element"), a = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
10
|
+
function s(t, o, n) {
|
|
11
11
|
var u = null;
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
for (var c in
|
|
15
|
-
c !== "key" && (
|
|
16
|
-
} else
|
|
17
|
-
return
|
|
18
|
-
$$typeof:
|
|
19
|
-
type:
|
|
12
|
+
if (n !== void 0 && (u = "" + n), o.key !== void 0 && (u = "" + o.key), "key" in o) {
|
|
13
|
+
n = {};
|
|
14
|
+
for (var c in o)
|
|
15
|
+
c !== "key" && (n[c] = o[c]);
|
|
16
|
+
} else n = o;
|
|
17
|
+
return o = n.ref, {
|
|
18
|
+
$$typeof: r,
|
|
19
|
+
type: t,
|
|
20
20
|
key: u,
|
|
21
|
-
ref:
|
|
22
|
-
props:
|
|
21
|
+
ref: o !== void 0 ? o : null,
|
|
22
|
+
props: n
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
return R.Fragment = a, R.jsx =
|
|
25
|
+
return R.Fragment = a, R.jsx = s, R.jsxs = s, R;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return
|
|
27
|
+
var H;
|
|
28
|
+
function oe() {
|
|
29
|
+
return H || (H = 1, N.exports = te()), N.exports;
|
|
30
30
|
}
|
|
31
|
-
var
|
|
32
|
-
function
|
|
33
|
-
const a =
|
|
34
|
-
a.current =
|
|
35
|
-
const
|
|
36
|
-
return
|
|
37
|
-
return a.current.apply(this,
|
|
38
|
-
}),
|
|
31
|
+
var ae = oe();
|
|
32
|
+
function E(r) {
|
|
33
|
+
const a = _(r);
|
|
34
|
+
a.current = I(() => r, [r]);
|
|
35
|
+
const s = _(void 0);
|
|
36
|
+
return s.current || (s.current = function(...t) {
|
|
37
|
+
return a.current.apply(this, t);
|
|
38
|
+
}), s.current;
|
|
39
39
|
}
|
|
40
|
-
const
|
|
40
|
+
const T = {
|
|
41
41
|
sortField: ["orderType", "orderField"],
|
|
42
42
|
sortOrder: ["ASC", "DESC"],
|
|
43
43
|
pageSize: 10
|
|
44
44
|
};
|
|
45
|
-
function
|
|
46
|
-
Object.keys(
|
|
47
|
-
|
|
45
|
+
function ie(r) {
|
|
46
|
+
Object.keys(r).forEach((a) => {
|
|
47
|
+
T[a] = r[a];
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
queryFn:
|
|
50
|
+
function ce({
|
|
51
|
+
queryFn: r,
|
|
52
52
|
params: a,
|
|
53
|
-
transform:
|
|
54
|
-
rowSelection:
|
|
53
|
+
transform: s,
|
|
54
|
+
rowSelection: t
|
|
55
55
|
}) {
|
|
56
|
-
const
|
|
56
|
+
const o = T.pageSize, [n, u] = v({
|
|
57
57
|
pagination: {
|
|
58
58
|
showSizeChanger: !0,
|
|
59
59
|
showQuickJumper: !0,
|
|
60
60
|
total: 0,
|
|
61
|
-
pageSize:
|
|
61
|
+
pageSize: o,
|
|
62
62
|
current: 1
|
|
63
63
|
},
|
|
64
64
|
list: [],
|
|
65
65
|
queryParams: {
|
|
66
66
|
pageNo: 1,
|
|
67
|
-
pageSize:
|
|
67
|
+
pageSize: o,
|
|
68
68
|
...a
|
|
69
69
|
}
|
|
70
|
-
}), { pagination: c, list: f, queryParams:
|
|
71
|
-
if (
|
|
70
|
+
}), { pagination: c, list: f, queryParams: e } = n, { pageNo: l, pageSize: p } = e, [i, m] = v(!0), [g, y] = v([]), b = I(() => {
|
|
71
|
+
if (t)
|
|
72
72
|
return {
|
|
73
73
|
selectedRowKeys: g,
|
|
74
|
-
onChange: (d) =>
|
|
74
|
+
onChange: (d) => y(d)
|
|
75
75
|
};
|
|
76
|
-
}, [
|
|
76
|
+
}, [t, g]), x = E(
|
|
77
77
|
(d) => `共 ${d} 条记录 第 ${l}/${Math.ceil(d / p)} 页 `
|
|
78
78
|
), S = async (d) => {
|
|
79
79
|
const { pageNo: A } = d;
|
|
80
80
|
m(!0);
|
|
81
81
|
const M = { ...a, pageSize: p, ...d };
|
|
82
82
|
d.pageNo === void 0 && (M.pageNo = 1), d.pageSize === void 0 && (M.pageSize = p);
|
|
83
|
-
const { data:
|
|
84
|
-
|
|
85
|
-
list:
|
|
83
|
+
const { data: $ } = await r(M), k = s ? s($) : $, { list: O = [], totalCount: F = 0 } = k || {};
|
|
84
|
+
t && y([]), u({
|
|
85
|
+
list: O,
|
|
86
86
|
queryParams: M,
|
|
87
87
|
pagination: {
|
|
88
88
|
...c,
|
|
89
89
|
current: A,
|
|
90
90
|
pageSize: M.pageSize,
|
|
91
|
-
total:
|
|
91
|
+
total: F
|
|
92
92
|
}
|
|
93
93
|
}), m(!1);
|
|
94
|
-
},
|
|
95
|
-
S({ ...
|
|
96
|
-
}),
|
|
97
|
-
S({ ...
|
|
94
|
+
}, z = j(() => {
|
|
95
|
+
S({ ...e, pageNo: 1 });
|
|
96
|
+
}), C = (d) => {
|
|
97
|
+
S({ ...e, ...d, pageNo: 1 });
|
|
98
98
|
}, h = (d) => {
|
|
99
|
-
S({ ...
|
|
100
|
-
},
|
|
99
|
+
S({ ...e, ...d });
|
|
100
|
+
}, D = (d) => {
|
|
101
101
|
S({ ...d, pageSize: p, pageNo: 1 });
|
|
102
|
-
},
|
|
103
|
-
const { action:
|
|
104
|
-
if (["paginate", "sort"].includes(
|
|
105
|
-
const { current:
|
|
106
|
-
...
|
|
107
|
-
[Q]:
|
|
108
|
-
[Y]:
|
|
109
|
-
pageNo:
|
|
110
|
-
pageSize:
|
|
102
|
+
}, V = (d, A, M, $) => {
|
|
103
|
+
const { action: k } = $;
|
|
104
|
+
if (["paginate", "sort"].includes(k)) {
|
|
105
|
+
const { current: O, pageSize: F } = d, { field: G, order: L } = M, [Q, Y] = T.sortField, [Z, B] = T.sortOrder, U = {
|
|
106
|
+
...e,
|
|
107
|
+
[Q]: L ? L === "ascend" ? Z : B : void 0,
|
|
108
|
+
[Y]: G,
|
|
109
|
+
pageNo: O,
|
|
110
|
+
pageSize: F
|
|
111
111
|
};
|
|
112
112
|
S(U);
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
|
-
return
|
|
116
|
-
|
|
115
|
+
return P(() => {
|
|
116
|
+
z();
|
|
117
117
|
}, []), {
|
|
118
|
-
queryParams:
|
|
119
|
-
search:
|
|
120
|
-
refresh:
|
|
121
|
-
reset:
|
|
118
|
+
queryParams: e,
|
|
119
|
+
search: E(C),
|
|
120
|
+
refresh: E(h),
|
|
121
|
+
reset: E(D),
|
|
122
122
|
selectedRowKeys: g,
|
|
123
123
|
tableProps: {
|
|
124
124
|
bordered: !0,
|
|
@@ -127,55 +127,55 @@ function le({
|
|
|
127
127
|
rowSelection: b,
|
|
128
128
|
loading: i,
|
|
129
129
|
dataSource: f,
|
|
130
|
-
pagination: { ...c, showTotal:
|
|
131
|
-
onChange:
|
|
130
|
+
pagination: { ...c, showTotal: x },
|
|
131
|
+
onChange: E(V),
|
|
132
132
|
locale: {
|
|
133
|
-
emptyText: i ? "" : /* @__PURE__ */
|
|
133
|
+
emptyText: i ? "" : /* @__PURE__ */ ae.jsx(q, { image: q.PRESENTED_IMAGE_SIMPLE })
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
|
-
const
|
|
138
|
+
const w = ee((r) => ({
|
|
139
139
|
modals: {},
|
|
140
|
-
toggleModal: (a,
|
|
141
|
-
const
|
|
140
|
+
toggleModal: (a, s) => r((t) => {
|
|
141
|
+
const n = t.modals[a]?.visible || !1;
|
|
142
142
|
return {
|
|
143
143
|
modals: {
|
|
144
|
-
...
|
|
144
|
+
...t.modals,
|
|
145
145
|
[a]: {
|
|
146
|
-
visible: !
|
|
147
|
-
data:
|
|
146
|
+
visible: !n,
|
|
147
|
+
data: n ? {} : s || {}
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
151
|
}),
|
|
152
|
-
setModal: (a,
|
|
152
|
+
setModal: (a, s, t) => r((o) => ({
|
|
153
153
|
modals: {
|
|
154
|
-
...
|
|
154
|
+
...o.modals,
|
|
155
155
|
[a]: {
|
|
156
|
-
visible:
|
|
157
|
-
data:
|
|
156
|
+
visible: s,
|
|
157
|
+
data: s ? t || {} : {}
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
})),
|
|
161
|
-
clearModals: (a) =>
|
|
162
|
-
const
|
|
163
|
-
return a.forEach((
|
|
164
|
-
delete
|
|
165
|
-
}), { modals:
|
|
161
|
+
clearModals: (a) => r((s) => {
|
|
162
|
+
const t = { ...s.modals };
|
|
163
|
+
return a.forEach((o) => {
|
|
164
|
+
delete t[o];
|
|
165
|
+
}), { modals: t };
|
|
166
166
|
})
|
|
167
167
|
}));
|
|
168
|
-
function
|
|
169
|
-
const a =
|
|
170
|
-
|
|
171
|
-
(
|
|
168
|
+
function le(r) {
|
|
169
|
+
const a = w((e) => e.modals), s = w((e) => e.toggleModal), t = w((e) => e.setModal), o = w((e) => e.clearModals), n = W(), u = _([]), c = Object.keys(r);
|
|
170
|
+
P(() => (u.current = c.map(
|
|
171
|
+
(e) => `${n}-${e}`
|
|
172
172
|
), () => {
|
|
173
|
-
|
|
173
|
+
o(u.current);
|
|
174
174
|
}), []);
|
|
175
175
|
const f = {};
|
|
176
|
-
return c.forEach((
|
|
177
|
-
const l = `${
|
|
178
|
-
f[`${
|
|
176
|
+
return c.forEach((e) => {
|
|
177
|
+
const l = `${n}-${e}`, p = a[l] ?? { visible: !1, data: {} }, i = r[e], m = typeof i.title == "function" ? i.title(p.data) : i.title;
|
|
178
|
+
f[`${e}Modal`] = {
|
|
179
179
|
visible: p.visible,
|
|
180
180
|
data: p.data,
|
|
181
181
|
modalProps: {
|
|
@@ -185,7 +185,7 @@ function de(n) {
|
|
|
185
185
|
maskClosable: i.maskClosable ?? !1,
|
|
186
186
|
centered: i.centered ?? !0,
|
|
187
187
|
destroyOnHidden: i.destroyOnHidden ?? !0,
|
|
188
|
-
onCancel: i.onCancel ?? (() =>
|
|
188
|
+
onCancel: i.onCancel ?? (() => t(l, !1))
|
|
189
189
|
},
|
|
190
190
|
drawerProps: {
|
|
191
191
|
size: i.width,
|
|
@@ -194,98 +194,100 @@ function de(n) {
|
|
|
194
194
|
maskClosable: i.maskClosable ?? !0,
|
|
195
195
|
destroyOnHidden: i.destroyOnHidden ?? !0,
|
|
196
196
|
placement: i.placement ?? "right",
|
|
197
|
-
onClose: i.onClose ?? (() =>
|
|
197
|
+
onClose: i.onClose ?? (() => t(l, !1))
|
|
198
198
|
},
|
|
199
|
-
toggle: (g) =>
|
|
200
|
-
open: (g) =>
|
|
201
|
-
close: () =>
|
|
199
|
+
toggle: (g) => s(l, g),
|
|
200
|
+
open: (g) => t(l, !0, g),
|
|
201
|
+
close: () => t(l, !1)
|
|
202
202
|
};
|
|
203
|
-
}), f.toggle = (
|
|
204
|
-
|
|
205
|
-
}, f.open = (
|
|
206
|
-
|
|
207
|
-
}, f.close = (
|
|
208
|
-
|
|
203
|
+
}), f.toggle = (e, l) => {
|
|
204
|
+
s(`${n}-${e}`, l);
|
|
205
|
+
}, f.open = (e, l) => {
|
|
206
|
+
t(`${n}-${e}`, !0, l);
|
|
207
|
+
}, f.close = (e) => {
|
|
208
|
+
t(`${n}-${e}`, !1);
|
|
209
209
|
}, f;
|
|
210
210
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
const [r, u] = v({
|
|
211
|
+
function de({ queryFn: r, params: a, dataKey: s, fieldNames: t, transform: o }) {
|
|
212
|
+
const [n, u] = v({
|
|
214
213
|
list: [],
|
|
215
214
|
mapData: /* @__PURE__ */ new Map()
|
|
216
|
-
}), [c, f] = v(!0),
|
|
215
|
+
}), [c, f] = v(!0), e = async () => {
|
|
217
216
|
f(!0);
|
|
218
|
-
const { data: g } = await
|
|
219
|
-
if (
|
|
220
|
-
const
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
217
|
+
const { data: g } = await r(a), b = (o ? o(g) : g) || [], { label: x, value: S } = t, z = /* @__PURE__ */ new Map([]);
|
|
218
|
+
if (t) {
|
|
219
|
+
const C = b.map((h) => {
|
|
220
|
+
const D = h[S];
|
|
221
|
+
return z.set(D, x), {
|
|
222
|
+
label: h[x],
|
|
223
|
+
value: D,
|
|
224
|
+
data: h
|
|
225
|
+
};
|
|
226
|
+
});
|
|
227
|
+
u((h) => ({ ...h, list: C, mapData: z }));
|
|
226
228
|
} else
|
|
227
229
|
u((C) => ({ ...C, list: b }));
|
|
228
230
|
f(!1);
|
|
229
|
-
}, l =
|
|
230
|
-
|
|
231
|
+
}, l = j(e), p = E(() => {
|
|
232
|
+
e();
|
|
231
233
|
});
|
|
232
|
-
|
|
234
|
+
P(() => {
|
|
233
235
|
l();
|
|
234
236
|
}, []);
|
|
235
|
-
const { list: i, mapData: m } =
|
|
237
|
+
const { list: i, mapData: m } = n;
|
|
236
238
|
return {
|
|
237
239
|
loading: c,
|
|
238
240
|
refresh: p,
|
|
239
|
-
[`${
|
|
240
|
-
[`${
|
|
241
|
+
[`${s}Options`]: i,
|
|
242
|
+
[`${s}Map`]: m
|
|
241
243
|
};
|
|
242
244
|
}
|
|
243
|
-
function
|
|
244
|
-
const [
|
|
245
|
+
function ue(r, a) {
|
|
246
|
+
const [s, t] = v(!1), { message: o } = K.useApp(), n = X(async (u) => {
|
|
245
247
|
try {
|
|
246
|
-
|
|
247
|
-
const c = await
|
|
248
|
-
f == "success" && (a(c),
|
|
248
|
+
t(!0);
|
|
249
|
+
const c = await r(u), { status: f, info: e } = c;
|
|
250
|
+
f == "success" && (a(c), o.success(e));
|
|
249
251
|
} catch {
|
|
250
252
|
}
|
|
251
|
-
|
|
252
|
-
}, [
|
|
253
|
+
t(!1);
|
|
254
|
+
}, [r, a, o]);
|
|
253
255
|
return {
|
|
254
|
-
loading:
|
|
255
|
-
submit:
|
|
256
|
+
loading: s,
|
|
257
|
+
submit: n
|
|
256
258
|
};
|
|
257
259
|
}
|
|
258
|
-
function
|
|
259
|
-
queryFn:
|
|
260
|
+
function pe({
|
|
261
|
+
queryFn: r,
|
|
260
262
|
params: a,
|
|
261
|
-
dataType:
|
|
262
|
-
dataKey:
|
|
263
|
-
initialValue:
|
|
264
|
-
transform:
|
|
263
|
+
dataType: s,
|
|
264
|
+
dataKey: t,
|
|
265
|
+
initialValue: o,
|
|
266
|
+
transform: n
|
|
265
267
|
}) {
|
|
266
|
-
const u =
|
|
268
|
+
const u = o || (s === "Array" ? [] : /* @__PURE__ */ Object.create({})), [c, f] = v(u), [e, l] = v(!1), p = async (g) => {
|
|
267
269
|
l(!0);
|
|
268
|
-
const { data:
|
|
270
|
+
const { data: y } = await r(g ?? a), b = n ? n(y) : y;
|
|
269
271
|
f(b), l(!1);
|
|
270
|
-
}, i =
|
|
271
|
-
|
|
272
|
+
}, i = j(p);
|
|
273
|
+
P(() => {
|
|
272
274
|
i();
|
|
273
275
|
}, []);
|
|
274
|
-
const m =
|
|
276
|
+
const m = E((g) => {
|
|
275
277
|
p(g);
|
|
276
278
|
});
|
|
277
279
|
return {
|
|
278
|
-
[
|
|
279
|
-
loading:
|
|
280
|
+
[t]: c,
|
|
281
|
+
loading: e,
|
|
280
282
|
refresh: m
|
|
281
283
|
};
|
|
282
284
|
}
|
|
283
285
|
export {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
286
|
+
ie as configureTableOption,
|
|
287
|
+
le as useCreateModal,
|
|
288
|
+
ue as useFormSubmit,
|
|
289
|
+
E as useMemoizedFn,
|
|
290
|
+
pe as useRequestQuery,
|
|
291
|
+
de as useSelectOptions,
|
|
292
|
+
ce as useTableList
|
|
291
293
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@base-stone/hooks",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.5",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "leafront",
|
|
7
7
|
"email": "leafront@126.com"
|
|
@@ -37,23 +37,23 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@eslint/js": "^9.39.2",
|
|
40
|
-
"@types/node": "^25.0.
|
|
40
|
+
"@types/node": "^25.0.9",
|
|
41
41
|
"@types/react": "^19.2.8",
|
|
42
42
|
"@vitejs/plugin-react-swc": "^4.2.2",
|
|
43
43
|
"classnames": "^2.5.1",
|
|
44
44
|
"eslint": "^9.39.2",
|
|
45
|
-
"eslint-plugin-prettier": "^5.5.
|
|
45
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
46
46
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
47
47
|
"eslint-plugin-react-refresh": "^0.4.26",
|
|
48
|
-
"prettier": "^3.
|
|
48
|
+
"prettier": "^3.8.0",
|
|
49
49
|
"rollup-plugin-shell": "^1.0.9",
|
|
50
50
|
"typescript": "^5.9.3",
|
|
51
|
-
"typescript-eslint": "^8.
|
|
51
|
+
"typescript-eslint": "^8.53.0",
|
|
52
52
|
"vite": "^7.3.1",
|
|
53
53
|
"vite-plugin-dts": "^4.5.4"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"antd": "^6.
|
|
56
|
+
"antd": "^6.2.0",
|
|
57
57
|
"react": "^19.2.3",
|
|
58
58
|
"zustand": "^5.0.10"
|
|
59
59
|
}
|