@aplus-frontend/ui 6.24.1 → 6.25.0
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/es/src/ag-grid/hooks/use-search-form.d.ts +3 -0
- package/es/src/ag-grid/hooks/use-search-form.mjs +41 -0
- package/es/src/ag-grid/index.vue.mjs +248 -270
- package/es/src/ag-grid/interface.d.ts +1 -0
- package/es/src/ap-form/interface.d.ts +1 -2
- package/es/src/ap-form/search-form/hooks/use-count-per-row.mjs +27 -24
- package/es/src/ap-form/search-form/index.vue.d.ts +9 -3
- package/es/src/ap-form/search-form/index.vue.mjs +116 -108
- package/es/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
- package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +2 -1
- package/es/src/ap-pro-card/components/statistic/index.vue2.mjs +43 -37
- package/es/src/ap-pro-card/interface.d.ts +3 -1
- package/es/src/ap-pro-card/utils/css-var.mjs +10 -10
- package/es/src/business/ap-value-select-card/index.vue.d.ts +6 -0
- package/es/src/business/ap-value-select-card/index.vue2.mjs +88 -80
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/hooks/use-search-form.d.ts +3 -0
- package/lib/src/ag-grid/hooks/use-search-form.js +1 -0
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +1 -0
- package/lib/src/ap-form/interface.d.ts +1 -2
- package/lib/src/ap-form/search-form/hooks/use-count-per-row.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +9 -3
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
- package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +2 -1
- package/lib/src/ap-pro-card/components/statistic/index.vue2.js +1 -1
- package/lib/src/ap-pro-card/interface.d.ts +3 -1
- package/lib/src/ap-pro-card/utils/css-var.js +1 -1
- package/lib/src/business/ap-value-select-card/index.vue.d.ts +6 -0
- package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +5 -5
- package/theme/ap-grid/index.css +4 -0
- package/theme/ap-grid/index.less +4 -0
- package/theme/ap-pro-card/index.css +36 -29
- package/theme/ap-pro-card/index.less +39 -20
- package/theme/ap-value-select-card/index.css +1 -0
- package/theme/ap-value-select-card/index.less +1 -0
- package/theme/index.css +41 -29
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { AgGridVue as
|
|
3
|
-
import { ModuleRegistry as
|
|
4
|
-
import { Spin as
|
|
5
|
-
import { isUndefined as
|
|
1
|
+
import { defineComponent as ze, useSlots as Ae, ref as v, toRef as j, computed as l, unref as a, nextTick as Ke, watch as k, createElementBlock as D, openBlock as g, normalizeStyle as b, normalizeClass as c, createCommentVNode as q, createElementVNode as S, createVNode as z, mergeProps as U, createSlots as Ne, withCtx as $, Fragment as Ve, renderList as Ie, createBlock as J, resolveDynamicComponent as Ee, renderSlot as Q, withDirectives as Pe, vShow as Me } from "vue";
|
|
2
|
+
import { AgGridVue as We } from "ag-grid-vue3";
|
|
3
|
+
import { ModuleRegistry as Le, AllCommunityModule as Oe } from "ag-grid-community";
|
|
4
|
+
import { Spin as Ge, Pagination as He } from "@aplus-frontend/antdv";
|
|
5
|
+
import { isUndefined as R, isFunction as je } from "lodash-unified";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
|
-
import { ApForm as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { useNamespace as
|
|
22
|
-
|
|
23
|
-
const Ko = /* @__PURE__ */ Ne({
|
|
7
|
+
import { ApForm as qe } from "../ap-form/index.mjs";
|
|
8
|
+
import { recursionApColumns as Ue } from "../ap-table/utils.mjs";
|
|
9
|
+
import { useTablePaging as $e } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
10
|
+
import Je from "./hooks/use-row-selection.mjs";
|
|
11
|
+
import { useProvideSorter as Qe } from "./context.mjs";
|
|
12
|
+
import { useProvideApTable as Xe } from "../ap-table/context.mjs";
|
|
13
|
+
import { sizeReverseMap as Ye, sizeMap as Ze } from "../ap-grid/constants.mjs";
|
|
14
|
+
import { useToken as _e } from "@aplus-frontend/antdv/es/theme/internal";
|
|
15
|
+
import { useTheme as eo } from "./theme.mjs";
|
|
16
|
+
import { useColumns as oo } from "./hooks/use-columns.mjs";
|
|
17
|
+
import { useColumnsDef as to } from "./hooks/use-columns-def.mjs";
|
|
18
|
+
import { isDef as ao } from "../utils/index.mjs";
|
|
19
|
+
import { getValidVNodeList as ro } from "../utils/slot.mjs";
|
|
20
|
+
import { useSearchForm as no } from "./hooks/use-search-form.mjs";
|
|
21
|
+
import { useNamespace as lo } from "../config-provider/hooks/use-namespace.mjs";
|
|
22
|
+
const Do = /* @__PURE__ */ ze({
|
|
24
23
|
name: "AgGrid",
|
|
25
24
|
__name: "index",
|
|
26
25
|
props: {
|
|
@@ -86,368 +85,347 @@ const Ko = /* @__PURE__ */ Ne({
|
|
|
86
85
|
advanceRenderer: { type: Boolean },
|
|
87
86
|
browserTooltips: { type: Boolean }
|
|
88
87
|
},
|
|
89
|
-
setup(
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
let w = !!
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
return Z(l.order) - i;
|
|
100
|
-
})) == null ? void 0 : a.map((r) => {
|
|
101
|
-
const l = Qe(
|
|
102
|
-
r,
|
|
103
|
-
Xe(r.fieldProps, {})
|
|
104
|
-
), i = {
|
|
105
|
-
...r,
|
|
106
|
-
fieldProps: {
|
|
107
|
-
label: r.title,
|
|
108
|
-
name: r.dataIndex,
|
|
109
|
-
// tips: 在表格中的查询表单项默认是带边框的
|
|
110
|
-
bordered: !0,
|
|
111
|
-
...l || {},
|
|
112
|
-
_signal: z
|
|
113
|
-
},
|
|
114
|
-
renderNode: void 0
|
|
115
|
-
};
|
|
116
|
-
return i.renderNode = Ye(
|
|
117
|
-
i,
|
|
118
|
-
n(ae)
|
|
119
|
-
), i;
|
|
120
|
-
})) || [];
|
|
121
|
-
}), { shownColumns: u, shownColumnsBackup: ne } = so(t), { defaultColDef: le, columnDefs: se } = io(
|
|
122
|
-
u,
|
|
123
|
-
t
|
|
124
|
-
), N = b({});
|
|
125
|
-
oo({
|
|
126
|
-
sorter: N,
|
|
88
|
+
setup(X, { expose: Y }) {
|
|
89
|
+
Le.registerModules([Oe]);
|
|
90
|
+
const o = X, h = Ae(), { e: y, b: i, be: Z } = lo("ag-grid"), p = v(o.size), _ = eo(p, j(o, "rowHeight")), f = v(), [, ee] = _e();
|
|
91
|
+
let w = !!o.dataSource;
|
|
92
|
+
const A = no(o), { shownColumns: d, shownColumnsBackup: oe } = oo(o), { defaultColDef: te, columnDefs: ae } = to(
|
|
93
|
+
d,
|
|
94
|
+
o
|
|
95
|
+
), K = v({});
|
|
96
|
+
Qe({
|
|
97
|
+
sorter: K,
|
|
127
98
|
setSorter(e) {
|
|
128
|
-
|
|
99
|
+
K.value = e;
|
|
129
100
|
}
|
|
130
101
|
});
|
|
131
|
-
const
|
|
102
|
+
const re = {
|
|
132
103
|
asc: "ascend",
|
|
133
104
|
desc: "descend"
|
|
134
105
|
};
|
|
135
|
-
function
|
|
136
|
-
var
|
|
137
|
-
const e = (
|
|
106
|
+
function ne() {
|
|
107
|
+
var s;
|
|
108
|
+
const e = (s = f.value.getColumns()) == null ? void 0 : s.filter((T) => T.getSort() !== void 0);
|
|
138
109
|
if (!(e != null && e.length))
|
|
139
110
|
return;
|
|
140
|
-
const
|
|
111
|
+
const t = e[0], r = t.getColDef(), n = t.getSort();
|
|
141
112
|
V(void 0, void 0, {
|
|
142
|
-
column:
|
|
143
|
-
field:
|
|
144
|
-
order:
|
|
113
|
+
column: r,
|
|
114
|
+
field: r.field,
|
|
115
|
+
order: n ? re[n] : null
|
|
145
116
|
});
|
|
146
117
|
}
|
|
147
|
-
const
|
|
118
|
+
const le = l(() => Ue(a(d), (e) => {
|
|
148
119
|
if (e.sorter === !0)
|
|
149
120
|
return e.key || e.dataIndex;
|
|
150
|
-
}).filter(Boolean)),
|
|
151
|
-
var
|
|
152
|
-
return
|
|
153
|
-
var
|
|
154
|
-
return ((
|
|
121
|
+
}).filter(Boolean)), se = l(() => {
|
|
122
|
+
var t;
|
|
123
|
+
return ao(o.manual) ? o.manual : ro(((t = h.searchFormExtra) == null ? void 0 : t.call(h)) || []).some((r) => {
|
|
124
|
+
var n;
|
|
125
|
+
return ((n = r.type) == null ? void 0 : n.name) === "ApView";
|
|
155
126
|
});
|
|
156
127
|
}), {
|
|
157
|
-
formRef:
|
|
158
|
-
submit:
|
|
159
|
-
reset:
|
|
160
|
-
data:
|
|
161
|
-
tableProps:
|
|
128
|
+
formRef: u,
|
|
129
|
+
submit: C,
|
|
130
|
+
reset: F,
|
|
131
|
+
data: m,
|
|
132
|
+
tableProps: N,
|
|
162
133
|
handleTableChangeOptional: V,
|
|
163
|
-
submitWith:
|
|
164
|
-
refresh:
|
|
165
|
-
getPaging:
|
|
166
|
-
setPaging:
|
|
167
|
-
|
|
134
|
+
submitWith: I,
|
|
135
|
+
refresh: E,
|
|
136
|
+
getPaging: ie,
|
|
137
|
+
setPaging: de,
|
|
138
|
+
setDataSource: ce
|
|
139
|
+
} = $e({
|
|
168
140
|
async request(e) {
|
|
169
|
-
var
|
|
170
|
-
if (w = !1, !
|
|
171
|
-
const
|
|
141
|
+
var r;
|
|
142
|
+
if (w = !1, !R(o.dataSource)) {
|
|
143
|
+
const n = e.pageSize * (e.current - 1);
|
|
172
144
|
return {
|
|
173
|
-
data: (
|
|
174
|
-
total:
|
|
145
|
+
data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(n, n + e.pageSize)) || [],
|
|
146
|
+
total: o.dataSource.length || 0
|
|
175
147
|
};
|
|
176
148
|
}
|
|
177
|
-
const
|
|
149
|
+
const t = await ((r = o.request) == null ? void 0 : r.call(o, e));
|
|
178
150
|
return {
|
|
179
|
-
data: (
|
|
180
|
-
total: (
|
|
151
|
+
data: (t == null ? void 0 : t.data) || [],
|
|
152
|
+
total: (t == null ? void 0 : t.total) || 0
|
|
181
153
|
};
|
|
182
154
|
},
|
|
183
155
|
namespace: "ap-grid",
|
|
184
|
-
filterFields:
|
|
185
|
-
params:
|
|
186
|
-
defaultData:
|
|
187
|
-
manual:
|
|
188
|
-
formatParams:
|
|
189
|
-
pagination:
|
|
190
|
-
sortFields:
|
|
191
|
-
}),
|
|
192
|
-
() =>
|
|
156
|
+
filterFields: v([]),
|
|
157
|
+
params: j(o, "params"),
|
|
158
|
+
defaultData: o.defaultData,
|
|
159
|
+
manual: a(se),
|
|
160
|
+
formatParams: o.beforeSearchSubmit,
|
|
161
|
+
pagination: o.pagination,
|
|
162
|
+
sortFields: le
|
|
163
|
+
}), ue = l(
|
|
164
|
+
() => R(o.dataSource) ? m.records : o.dataSource
|
|
193
165
|
), {
|
|
194
|
-
select:
|
|
195
|
-
unSelect:
|
|
166
|
+
select: me,
|
|
167
|
+
unSelect: pe,
|
|
196
168
|
selectedRows: B,
|
|
197
|
-
selectedRowKeys:
|
|
198
|
-
clearAll:
|
|
199
|
-
selectMultiByKeys:
|
|
200
|
-
} =
|
|
201
|
-
...
|
|
202
|
-
dataSource:
|
|
203
|
-
rowKey:
|
|
204
|
-
}),
|
|
169
|
+
selectedRowKeys: fe,
|
|
170
|
+
clearAll: we,
|
|
171
|
+
selectMultiByKeys: ge
|
|
172
|
+
} = Je({
|
|
173
|
+
...o.rowSelection === !0 ? {} : o.rowSelection,
|
|
174
|
+
dataSource: ue,
|
|
175
|
+
rowKey: o.rowKey
|
|
176
|
+
}), Se = {
|
|
205
177
|
checkbox: "multiRow",
|
|
206
178
|
radio: "singleRow"
|
|
207
|
-
},
|
|
208
|
-
if (!
|
|
179
|
+
}, he = l(() => {
|
|
180
|
+
if (!o.rowSelection)
|
|
209
181
|
return;
|
|
210
|
-
const { type: e = "checkbox", disabled:
|
|
182
|
+
const { type: e = "checkbox", disabled: t } = o.rowSelection === !0 ? {} : o.rowSelection;
|
|
211
183
|
return {
|
|
212
|
-
mode:
|
|
213
|
-
isRowSelectable: (
|
|
184
|
+
mode: Se[e],
|
|
185
|
+
isRowSelectable: (r) => t ? !t(r.data) : !0
|
|
214
186
|
};
|
|
215
|
-
}),
|
|
216
|
-
if (!
|
|
187
|
+
}), ye = l(() => {
|
|
188
|
+
if (!o.rowSelection)
|
|
217
189
|
return;
|
|
218
|
-
const e =
|
|
219
|
-
let
|
|
220
|
-
return
|
|
221
|
-
(
|
|
190
|
+
const e = o.rowSelection === !0 ? {} : o.rowSelection;
|
|
191
|
+
let t = e.fixed;
|
|
192
|
+
return t === void 0 && (t = d.value.some(
|
|
193
|
+
(r) => r.fixed === "left" || r.fixed === !0
|
|
222
194
|
) ? "left" : void 0), {
|
|
223
195
|
sortable: !1,
|
|
224
196
|
resizable: !1,
|
|
225
197
|
width: e.columnWidth || 60,
|
|
226
|
-
pinned:
|
|
198
|
+
pinned: t
|
|
227
199
|
};
|
|
228
200
|
});
|
|
229
|
-
function
|
|
230
|
-
return
|
|
201
|
+
function x(e) {
|
|
202
|
+
return je(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
|
|
231
203
|
}
|
|
232
|
-
const
|
|
233
|
-
api: e =
|
|
204
|
+
const P = ({
|
|
205
|
+
api: e = f.value
|
|
234
206
|
}) => {
|
|
235
|
-
if (!
|
|
207
|
+
if (!o.rowSelection)
|
|
236
208
|
return;
|
|
237
|
-
const
|
|
238
|
-
if (!
|
|
209
|
+
const t = B.value;
|
|
210
|
+
if (!t.length)
|
|
239
211
|
return;
|
|
240
212
|
w = !1;
|
|
241
|
-
const
|
|
242
|
-
e.forEachNode((
|
|
243
|
-
const
|
|
244
|
-
|
|
245
|
-
}), e.setNodesSelected({ nodes:
|
|
213
|
+
const r = [];
|
|
214
|
+
e.forEachNode((n) => {
|
|
215
|
+
const s = n.data, T = x(s);
|
|
216
|
+
t.find((De) => x(De) === T) && r.push(n);
|
|
217
|
+
}), e.setNodesSelected({ nodes: r, newValue: !0 }), setTimeout(() => {
|
|
246
218
|
w = !0;
|
|
247
219
|
}, 0);
|
|
248
|
-
},
|
|
249
|
-
w && (e.node.isSelected() ?
|
|
250
|
-
},
|
|
220
|
+
}, ve = (e) => {
|
|
221
|
+
w && (e.node.isSelected() ? me(e.data) : pe(e.data));
|
|
222
|
+
}, be = () => {
|
|
251
223
|
w = !0;
|
|
252
224
|
}, M = () => {
|
|
253
225
|
var e;
|
|
254
|
-
|
|
226
|
+
we(), (e = f.value) == null || e.deselectAll();
|
|
255
227
|
};
|
|
256
|
-
function
|
|
257
|
-
|
|
258
|
-
|
|
228
|
+
function Re(e) {
|
|
229
|
+
ge(e), Ke(() => {
|
|
230
|
+
P({});
|
|
259
231
|
});
|
|
260
232
|
}
|
|
261
|
-
function
|
|
262
|
-
var
|
|
263
|
-
const
|
|
264
|
-
return (
|
|
233
|
+
function W(e = !1) {
|
|
234
|
+
var r, n, s;
|
|
235
|
+
const t = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
236
|
+
return (s = (n = (r = u.value) == null ? void 0 : r.apForm) == null ? void 0 : n[t]) == null ? void 0 : s.call(n, !0);
|
|
265
237
|
}
|
|
266
|
-
function
|
|
267
|
-
var
|
|
268
|
-
(
|
|
238
|
+
function L(e) {
|
|
239
|
+
var t, r, n;
|
|
240
|
+
(n = (r = (t = u.value) == null ? void 0 : t.apForm) == null ? void 0 : r.setFieldsValue) == null || n.call(r, e);
|
|
269
241
|
}
|
|
270
|
-
function
|
|
242
|
+
function O() {
|
|
271
243
|
var e;
|
|
272
|
-
return ((e =
|
|
244
|
+
return ((e = u.value) == null ? void 0 : e.getSorterItems()) || [];
|
|
273
245
|
}
|
|
274
246
|
function G(e) {
|
|
275
|
-
var
|
|
276
|
-
(
|
|
247
|
+
var t;
|
|
248
|
+
(t = u.value) == null || t.setSorterItems(e);
|
|
277
249
|
}
|
|
278
250
|
function H() {
|
|
279
251
|
var e;
|
|
280
|
-
(e =
|
|
252
|
+
(e = u.value) == null || e.resetSorterItems();
|
|
281
253
|
}
|
|
282
|
-
|
|
283
|
-
columns:
|
|
284
|
-
columnsBackup:
|
|
285
|
-
size:
|
|
254
|
+
Xe({
|
|
255
|
+
columns: l(() => d.value),
|
|
256
|
+
columnsBackup: l(() => oe.value),
|
|
257
|
+
size: l(() => Ze[p.value]),
|
|
286
258
|
updateColumns(e) {
|
|
287
|
-
var
|
|
288
|
-
console.log(e),
|
|
259
|
+
var t;
|
|
260
|
+
console.log(e), d.value = e, (t = o.onShownColumnsChange) == null || t.call(o, e);
|
|
289
261
|
},
|
|
290
262
|
updateSize(e) {
|
|
291
|
-
|
|
263
|
+
p.value = Ye[e];
|
|
292
264
|
},
|
|
293
|
-
renderConfig:
|
|
294
|
-
className:
|
|
295
|
-
color:
|
|
265
|
+
renderConfig: l(() => ({
|
|
266
|
+
className: Z("table-header", "title"),
|
|
267
|
+
color: ee.value.colorTextTertiary
|
|
296
268
|
})),
|
|
297
|
-
dataSource:
|
|
298
|
-
getSearchFormValues:
|
|
299
|
-
setSearchFormValues:
|
|
300
|
-
submit:
|
|
301
|
-
submitWith:
|
|
302
|
-
reset:
|
|
303
|
-
refresh:
|
|
304
|
-
getSearchFormSorterItems:
|
|
269
|
+
dataSource: l(() => a(m).records),
|
|
270
|
+
getSearchFormValues: W,
|
|
271
|
+
setSearchFormValues: L,
|
|
272
|
+
submit: C,
|
|
273
|
+
submitWith: I,
|
|
274
|
+
reset: F,
|
|
275
|
+
refresh: E,
|
|
276
|
+
getSearchFormSorterItems: O,
|
|
305
277
|
setSearchFormSorterItems: G,
|
|
306
278
|
resetSearchFormSorterItems: H
|
|
307
279
|
});
|
|
308
|
-
const
|
|
309
|
-
() =>
|
|
310
|
-
),
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
].filter(Boolean)),
|
|
280
|
+
const Ce = l(
|
|
281
|
+
() => R(o.loading) ? m.loading : o.loading
|
|
282
|
+
), Fe = l(() => [
|
|
283
|
+
i(),
|
|
284
|
+
o.card ? null : i("wrapper"),
|
|
285
|
+
i("adaptive"),
|
|
286
|
+
i(`size-${p.value}`)
|
|
287
|
+
].filter(Boolean)), Be = l(() => ({
|
|
316
288
|
height: "100%",
|
|
317
|
-
...
|
|
318
|
-
})),
|
|
319
|
-
V({ current: e, pageSize:
|
|
289
|
+
...o.tableStyle || {}
|
|
290
|
+
})), xe = (e, t) => {
|
|
291
|
+
V({ current: e, pageSize: t });
|
|
320
292
|
};
|
|
321
|
-
function
|
|
322
|
-
const
|
|
323
|
-
return
|
|
293
|
+
function Te(e) {
|
|
294
|
+
const t = e.data;
|
|
295
|
+
return x(t);
|
|
324
296
|
}
|
|
325
|
-
function
|
|
326
|
-
var
|
|
327
|
-
(
|
|
297
|
+
function ke(e, t) {
|
|
298
|
+
var r;
|
|
299
|
+
(r = f.value) == null || r.ensureIndexVisible(e, t);
|
|
328
300
|
}
|
|
329
|
-
return
|
|
330
|
-
() =>
|
|
301
|
+
return k(
|
|
302
|
+
() => o.dataSource,
|
|
303
|
+
(e) => {
|
|
304
|
+
ce(e);
|
|
305
|
+
},
|
|
306
|
+
{ immediate: !0, deep: !0 }
|
|
307
|
+
), k(
|
|
308
|
+
() => o.size,
|
|
331
309
|
(e) => {
|
|
332
|
-
|
|
310
|
+
p.value = e;
|
|
333
311
|
}
|
|
334
|
-
),
|
|
335
|
-
() =>
|
|
312
|
+
), k(
|
|
313
|
+
() => a(m).loading,
|
|
336
314
|
(e) => {
|
|
337
|
-
var
|
|
338
|
-
(
|
|
315
|
+
var t;
|
|
316
|
+
(t = o.onLoadingChange) == null || t.call(o, e);
|
|
339
317
|
}
|
|
340
|
-
),
|
|
341
|
-
submit:
|
|
342
|
-
reset:
|
|
343
|
-
refresh:
|
|
344
|
-
submitWith:
|
|
345
|
-
setSearchFormValues:
|
|
346
|
-
getSearchFormValues:
|
|
347
|
-
getShowColumns: () =>
|
|
318
|
+
), Y({
|
|
319
|
+
submit: C,
|
|
320
|
+
reset: F,
|
|
321
|
+
refresh: E,
|
|
322
|
+
submitWith: I,
|
|
323
|
+
setSearchFormValues: L,
|
|
324
|
+
getSearchFormValues: W,
|
|
325
|
+
getShowColumns: () => a(d),
|
|
348
326
|
rowSelection: {
|
|
349
|
-
selectedRows:
|
|
350
|
-
setSelectedRowKeys:
|
|
327
|
+
selectedRows: l(() => B.value),
|
|
328
|
+
setSelectedRowKeys: Re,
|
|
351
329
|
clearAll: M
|
|
352
330
|
},
|
|
353
|
-
scrollToRow:
|
|
354
|
-
getDataSource: () =>
|
|
355
|
-
getPaging:
|
|
356
|
-
setPaging:
|
|
357
|
-
getSearchFormSorterItems:
|
|
331
|
+
scrollToRow: ke,
|
|
332
|
+
getDataSource: () => a(m.records),
|
|
333
|
+
getPaging: ie,
|
|
334
|
+
setPaging: de,
|
|
335
|
+
getSearchFormSorterItems: O,
|
|
358
336
|
setSearchFormSorterItems: G,
|
|
359
337
|
resetSearchFormSorterItems: H
|
|
360
|
-
}), (e,
|
|
361
|
-
var
|
|
362
|
-
return
|
|
363
|
-
class: c(
|
|
364
|
-
style:
|
|
338
|
+
}), (e, t) => {
|
|
339
|
+
var r, n;
|
|
340
|
+
return g(), D("div", {
|
|
341
|
+
class: c(Fe.value),
|
|
342
|
+
style: b(e.wrapperStyle)
|
|
365
343
|
}, [
|
|
366
|
-
|
|
344
|
+
a(R)(e.dataSource) && e.searchForm !== !1 && a(A).length > 0 ? (g(), D("div", {
|
|
367
345
|
key: 0,
|
|
368
|
-
class: c(e.card ?
|
|
369
|
-
style:
|
|
346
|
+
class: c(e.card ? a(y)("search-wrapper") : null),
|
|
347
|
+
style: b(e.searchFormWrapperStyle)
|
|
370
348
|
}, [
|
|
371
|
-
|
|
349
|
+
z(a(qe).SearchForm, U(e.searchForm || {}, {
|
|
372
350
|
ref_key: "formRef",
|
|
373
|
-
ref:
|
|
351
|
+
ref: u,
|
|
374
352
|
"custom-reset": "",
|
|
375
|
-
"submit-loading":
|
|
376
|
-
onSubmit:
|
|
377
|
-
onReset:
|
|
378
|
-
}),
|
|
379
|
-
default:
|
|
380
|
-
(
|
|
381
|
-
key:
|
|
353
|
+
"submit-loading": a(N).loading,
|
|
354
|
+
onSubmit: a(C),
|
|
355
|
+
onReset: a(F)
|
|
356
|
+
}), Ne({
|
|
357
|
+
default: $(() => [
|
|
358
|
+
(g(!0), D(Ve, null, Ie(a(A), (s) => (g(), J(Ee(s.renderNode), {
|
|
359
|
+
key: s.dataIndex
|
|
382
360
|
}))), 128))
|
|
383
361
|
]),
|
|
384
362
|
_: 2
|
|
385
363
|
}, [
|
|
386
|
-
|
|
364
|
+
h.searchFormExtra ? {
|
|
387
365
|
name: "extra",
|
|
388
|
-
fn:
|
|
389
|
-
|
|
366
|
+
fn: $(() => [
|
|
367
|
+
Q(e.$slots, "searchFormExtra")
|
|
390
368
|
]),
|
|
391
369
|
key: "0"
|
|
392
370
|
} : void 0
|
|
393
371
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
394
|
-
], 6)) :
|
|
395
|
-
|
|
396
|
-
class: c([
|
|
397
|
-
style:
|
|
372
|
+
], 6)) : q("", !0),
|
|
373
|
+
S("div", {
|
|
374
|
+
class: c([a(y)("table-wrapper"), e.card ? a(y)("table-wrapper-card") : null]),
|
|
375
|
+
style: b(e.tableWrapperStyle)
|
|
398
376
|
}, [
|
|
399
|
-
|
|
400
|
-
class: c(
|
|
377
|
+
S("div", {
|
|
378
|
+
class: c(a(i)("header-wrapper"))
|
|
401
379
|
}, [
|
|
402
|
-
|
|
403
|
-
selectedRows:
|
|
404
|
-
selectedRowKeys:
|
|
405
|
-
shownColumns:
|
|
380
|
+
Q(e.$slots, "title", {
|
|
381
|
+
selectedRows: a(B),
|
|
382
|
+
selectedRowKeys: a(fe),
|
|
383
|
+
shownColumns: a(d),
|
|
406
384
|
clearAll: M
|
|
407
385
|
})
|
|
408
386
|
], 2),
|
|
409
|
-
|
|
410
|
-
class: c(
|
|
387
|
+
S("div", {
|
|
388
|
+
class: c(a(i)("grid-wrapper"))
|
|
411
389
|
}, [
|
|
412
|
-
|
|
413
|
-
style:
|
|
414
|
-
"row-data":
|
|
415
|
-
"column-defs":
|
|
416
|
-
"default-col-def":
|
|
390
|
+
z(a(We), {
|
|
391
|
+
style: b(Be.value),
|
|
392
|
+
"row-data": a(m).records,
|
|
393
|
+
"column-defs": a(ae),
|
|
394
|
+
"default-col-def": a(te),
|
|
417
395
|
"locale-text": {
|
|
418
396
|
noRowsToShow: ""
|
|
419
397
|
// 为了隐藏默认的无数据提示,因为外部已经自行实现了loading
|
|
420
398
|
},
|
|
421
|
-
"row-selection":
|
|
422
|
-
"selection-column-def":
|
|
423
|
-
"get-row-id":
|
|
424
|
-
"pinned-top-row-data": (
|
|
425
|
-
"pinned-bottom-row-data": (
|
|
426
|
-
theme:
|
|
399
|
+
"row-selection": he.value,
|
|
400
|
+
"selection-column-def": ye.value,
|
|
401
|
+
"get-row-id": Te,
|
|
402
|
+
"pinned-top-row-data": (r = e.summary) == null ? void 0 : r.top,
|
|
403
|
+
"pinned-bottom-row-data": (n = e.summary) == null ? void 0 : n.bottom,
|
|
404
|
+
theme: a(_),
|
|
427
405
|
"tooltip-show-delay": 500,
|
|
428
406
|
"enable-browser-tooltips": e.browserTooltips,
|
|
429
407
|
"tooltip-interaction": "",
|
|
430
|
-
onSortChanged:
|
|
431
|
-
onGridReady:
|
|
432
|
-
onRowDataUpdated:
|
|
433
|
-
onRowSelected:
|
|
434
|
-
onFirstDataRendered:
|
|
408
|
+
onSortChanged: ne,
|
|
409
|
+
onGridReady: t[0] || (t[0] = (s) => f.value = s.api),
|
|
410
|
+
onRowDataUpdated: P,
|
|
411
|
+
onRowSelected: ve,
|
|
412
|
+
onFirstDataRendered: be
|
|
435
413
|
}, null, 8, ["style", "row-data", "column-defs", "default-col-def", "row-selection", "selection-column-def", "pinned-top-row-data", "pinned-bottom-row-data", "theme", "enable-browser-tooltips"]),
|
|
436
|
-
|
|
437
|
-
class: c(
|
|
414
|
+
Pe(S("div", {
|
|
415
|
+
class: c(a(y)("table-loading-wrapper"))
|
|
438
416
|
}, [
|
|
439
|
-
|
|
417
|
+
z(a(Ge), { delay: 300 })
|
|
440
418
|
], 2), [
|
|
441
|
-
[
|
|
419
|
+
[Me, Ce.value]
|
|
442
420
|
])
|
|
443
421
|
], 2),
|
|
444
|
-
|
|
445
|
-
class: c(
|
|
422
|
+
S("div", {
|
|
423
|
+
class: c(a(i)("pagination-wrapper"))
|
|
446
424
|
}, [
|
|
447
|
-
e.pagination !== !1 ? (
|
|
425
|
+
e.pagination !== !1 ? (g(), J(a(He), U({
|
|
448
426
|
key: 0,
|
|
449
|
-
class:
|
|
450
|
-
},
|
|
427
|
+
class: a(i)("pagination")
|
|
428
|
+
}, a(N).pagination, { onChange: xe }), null, 16, ["class"])) : q("", !0)
|
|
451
429
|
], 2)
|
|
452
430
|
], 6)
|
|
453
431
|
], 6);
|
|
@@ -455,5 +433,5 @@ const Ko = /* @__PURE__ */ Ne({
|
|
|
455
433
|
}
|
|
456
434
|
});
|
|
457
435
|
export {
|
|
458
|
-
|
|
436
|
+
Do as default
|
|
459
437
|
};
|