@aplus-frontend/ui 6.25.0 → 6.26.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/es/src/ag-grid/components/empty/index.vue.d.ts +3 -0
- package/es/src/ag-grid/components/empty/index.vue.mjs +4 -0
- package/es/src/ag-grid/components/empty/index.vue2.mjs +15 -0
- package/es/src/ag-grid/index.vue.mjs +80 -76
- package/es/src/ap-form/search-form/index.vue.d.ts +2 -8
- package/es/src/ap-form/search-form/index.vue.mjs +23 -24
- package/es/src/ap-grid/editable/form-item.vue.mjs +1 -0
- package/es/src/ap-grid/editable/index.vue.mjs +1 -0
- package/es/src/ap-grid/index.vue.mjs +295 -262
- package/es/src/ap-grid/interface.d.ts +21 -2
- package/es/src/ap-pro-card/components/card/index.vue2.mjs +70 -75
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +41 -41
- package/es/src/utils/copy.mjs +14 -4
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/empty/index.vue.d.ts +3 -0
- package/lib/src/ag-grid/components/empty/index.vue.js +1 -0
- package/lib/src/ag-grid/components/empty/index.vue2.js +1 -0
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +2 -8
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +21 -2
- package/lib/src/ap-pro-card/components/card/index.vue2.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/utils/copy.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
- package/theme/ag-grid/index.css +1 -1
- package/theme/ag-grid/index.less +1 -1
- package/theme/ap-grid/index.css +1 -0
- package/theme/ap-grid/index.less +1 -0
- package/theme/ap-pro-card/index.css +22 -6
- package/theme/ap-pro-card/index.less +22 -7
- package/theme/css-var.css +32 -0
- package/theme/css-var.less +34 -0
- package/theme/index.css +56 -7
- package/es/src/ap-pro-card/utils/css-var.d.ts +0 -17
- package/es/src/ap-pro-card/utils/css-var.mjs +0 -29
- package/lib/src/ap-pro-card/utils/css-var.d.ts +0 -17
- package/lib/src/ap-pro-card/utils/css-var.js +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineComponent as t, createElementBlock as o, openBlock as r, createVNode as m, unref as e } from "vue";
|
|
2
|
+
import { Empty as n } from "@aplus-frontend/antdv";
|
|
3
|
+
const l = /* @__PURE__ */ t({
|
|
4
|
+
__name: "index",
|
|
5
|
+
setup(_) {
|
|
6
|
+
return (a, c) => (r(), o("div", null, [
|
|
7
|
+
m(e(n), {
|
|
8
|
+
image: e(n).PRESENTED_IMAGE_SIMPLE
|
|
9
|
+
}, null, 8, ["image"])
|
|
10
|
+
]));
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
l as default
|
|
15
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as ze, useSlots as Ae, ref as v, toRef as
|
|
1
|
+
import { defineComponent as ze, useSlots as Ae, ref as v, toRef as $, computed as l, unref as a, nextTick as Ke, watch as k, createElementBlock as D, openBlock as w, normalizeStyle as b, normalizeClass as c, createCommentVNode as j, createElementVNode as S, createVNode as z, mergeProps as q, createSlots as Ne, withCtx as U, Fragment as Ve, renderList as Ie, createBlock as J, resolveDynamicComponent as Ee, renderSlot as Q, withDirectives as Pe, vShow as Me } from "vue";
|
|
2
2
|
import { AgGridVue as We } from "ag-grid-vue3";
|
|
3
3
|
import { ModuleRegistry as Le, AllCommunityModule as Oe } from "ag-grid-community";
|
|
4
4
|
import { Spin as Ge, Pagination as He } from "@aplus-frontend/antdv";
|
|
5
|
-
import { isUndefined as
|
|
5
|
+
import { isUndefined as C, isFunction as $e } from "lodash-unified";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
|
-
import { ApForm as
|
|
8
|
-
import { recursionApColumns as
|
|
9
|
-
import { useTablePaging as
|
|
7
|
+
import { ApForm as je } from "../ap-form/index.mjs";
|
|
8
|
+
import { recursionApColumns as qe } from "../ap-table/utils.mjs";
|
|
9
|
+
import { useTablePaging as Ue } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
10
10
|
import Je from "./hooks/use-row-selection.mjs";
|
|
11
11
|
import { useProvideSorter as Qe } from "./context.mjs";
|
|
12
12
|
import { useProvideApTable as Xe } from "../ap-table/context.mjs";
|
|
@@ -18,8 +18,10 @@ import { useColumnsDef as to } from "./hooks/use-columns-def.mjs";
|
|
|
18
18
|
import { isDef as ao } from "../utils/index.mjs";
|
|
19
19
|
import { getValidVNodeList as ro } from "../utils/slot.mjs";
|
|
20
20
|
import { useSearchForm as no } from "./hooks/use-search-form.mjs";
|
|
21
|
+
import "./components/empty/index.vue.mjs";
|
|
21
22
|
import { useNamespace as lo } from "../config-provider/hooks/use-namespace.mjs";
|
|
22
|
-
|
|
23
|
+
import so from "./components/empty/index.vue2.mjs";
|
|
24
|
+
const Ko = /* @__PURE__ */ ze({
|
|
23
25
|
name: "AgGrid",
|
|
24
26
|
__name: "index",
|
|
25
27
|
props: {
|
|
@@ -87,8 +89,8 @@ const Do = /* @__PURE__ */ ze({
|
|
|
87
89
|
},
|
|
88
90
|
setup(X, { expose: Y }) {
|
|
89
91
|
Le.registerModules([Oe]);
|
|
90
|
-
const o = X,
|
|
91
|
-
let
|
|
92
|
+
const o = X, y = Ae(), { e: h, b: i, be: Z } = lo("ag-grid"), f = v(o.size), _ = eo(f, $(o, "rowHeight")), g = v(), [, ee] = _e();
|
|
93
|
+
let u = !!o.dataSource;
|
|
92
94
|
const A = no(o), { shownColumns: d, shownColumnsBackup: oe } = oo(o), { defaultColDef: te, columnDefs: ae } = to(
|
|
93
95
|
d,
|
|
94
96
|
o
|
|
@@ -105,7 +107,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
105
107
|
};
|
|
106
108
|
function ne() {
|
|
107
109
|
var s;
|
|
108
|
-
const e = (s =
|
|
110
|
+
const e = (s = g.value.getColumns()) == null ? void 0 : s.filter((T) => T.getSort() !== void 0);
|
|
109
111
|
if (!(e != null && e.length))
|
|
110
112
|
return;
|
|
111
113
|
const t = e[0], r = t.getColDef(), n = t.getSort();
|
|
@@ -115,20 +117,20 @@ const Do = /* @__PURE__ */ ze({
|
|
|
115
117
|
order: n ? re[n] : null
|
|
116
118
|
});
|
|
117
119
|
}
|
|
118
|
-
const le = l(() =>
|
|
120
|
+
const le = l(() => qe(a(d), (e) => {
|
|
119
121
|
if (e.sorter === !0)
|
|
120
122
|
return e.key || e.dataIndex;
|
|
121
123
|
}).filter(Boolean)), se = l(() => {
|
|
122
124
|
var t;
|
|
123
|
-
return ao(o.manual) ? o.manual : ro(((t =
|
|
125
|
+
return ao(o.manual) ? o.manual : ro(((t = y.searchFormExtra) == null ? void 0 : t.call(y)) || []).some((r) => {
|
|
124
126
|
var n;
|
|
125
127
|
return ((n = r.type) == null ? void 0 : n.name) === "ApView";
|
|
126
128
|
});
|
|
127
129
|
}), {
|
|
128
|
-
formRef:
|
|
129
|
-
submit:
|
|
130
|
+
formRef: m,
|
|
131
|
+
submit: R,
|
|
130
132
|
reset: F,
|
|
131
|
-
data:
|
|
133
|
+
data: p,
|
|
132
134
|
tableProps: N,
|
|
133
135
|
handleTableChangeOptional: V,
|
|
134
136
|
submitWith: I,
|
|
@@ -136,10 +138,10 @@ const Do = /* @__PURE__ */ ze({
|
|
|
136
138
|
getPaging: ie,
|
|
137
139
|
setPaging: de,
|
|
138
140
|
setDataSource: ce
|
|
139
|
-
} =
|
|
141
|
+
} = Ue({
|
|
140
142
|
async request(e) {
|
|
141
143
|
var r;
|
|
142
|
-
if (
|
|
144
|
+
if (u = !1, !C(o.dataSource)) {
|
|
143
145
|
const n = e.pageSize * (e.current - 1);
|
|
144
146
|
return {
|
|
145
147
|
data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(n, n + e.pageSize)) || [],
|
|
@@ -154,21 +156,21 @@ const Do = /* @__PURE__ */ ze({
|
|
|
154
156
|
},
|
|
155
157
|
namespace: "ap-grid",
|
|
156
158
|
filterFields: v([]),
|
|
157
|
-
params:
|
|
159
|
+
params: $(o, "params"),
|
|
158
160
|
defaultData: o.defaultData,
|
|
159
161
|
manual: a(se),
|
|
160
162
|
formatParams: o.beforeSearchSubmit,
|
|
161
163
|
pagination: o.pagination,
|
|
162
164
|
sortFields: le
|
|
163
165
|
}), ue = l(
|
|
164
|
-
() =>
|
|
166
|
+
() => C(o.dataSource) ? p.records : o.dataSource
|
|
165
167
|
), {
|
|
166
168
|
select: me,
|
|
167
169
|
unSelect: pe,
|
|
168
170
|
selectedRows: B,
|
|
169
171
|
selectedRowKeys: fe,
|
|
170
|
-
clearAll:
|
|
171
|
-
selectMultiByKeys:
|
|
172
|
+
clearAll: ge,
|
|
173
|
+
selectMultiByKeys: we
|
|
172
174
|
} = Je({
|
|
173
175
|
...o.rowSelection === !0 ? {} : o.rowSelection,
|
|
174
176
|
dataSource: ue,
|
|
@@ -176,7 +178,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
176
178
|
}), Se = {
|
|
177
179
|
checkbox: "multiRow",
|
|
178
180
|
radio: "singleRow"
|
|
179
|
-
},
|
|
181
|
+
}, ye = l(() => {
|
|
180
182
|
if (!o.rowSelection)
|
|
181
183
|
return;
|
|
182
184
|
const { type: e = "checkbox", disabled: t } = o.rowSelection === !0 ? {} : o.rowSelection;
|
|
@@ -184,7 +186,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
184
186
|
mode: Se[e],
|
|
185
187
|
isRowSelectable: (r) => t ? !t(r.data) : !0
|
|
186
188
|
};
|
|
187
|
-
}),
|
|
189
|
+
}), he = l(() => {
|
|
188
190
|
if (!o.rowSelection)
|
|
189
191
|
return;
|
|
190
192
|
const e = o.rowSelection === !0 ? {} : o.rowSelection;
|
|
@@ -199,77 +201,81 @@ const Do = /* @__PURE__ */ ze({
|
|
|
199
201
|
};
|
|
200
202
|
});
|
|
201
203
|
function x(e) {
|
|
202
|
-
return
|
|
204
|
+
return $e(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
|
|
203
205
|
}
|
|
204
206
|
const P = ({
|
|
205
|
-
api: e =
|
|
207
|
+
api: e = g.value
|
|
206
208
|
}) => {
|
|
207
209
|
if (!o.rowSelection)
|
|
208
210
|
return;
|
|
209
211
|
const t = B.value;
|
|
210
|
-
if (!t.length)
|
|
212
|
+
if (!t.length) {
|
|
213
|
+
setTimeout(() => {
|
|
214
|
+
u = !0;
|
|
215
|
+
}, 0);
|
|
211
216
|
return;
|
|
212
|
-
|
|
217
|
+
}
|
|
218
|
+
u = !1;
|
|
213
219
|
const r = [];
|
|
214
220
|
e.forEachNode((n) => {
|
|
215
221
|
const s = n.data, T = x(s);
|
|
216
222
|
t.find((De) => x(De) === T) && r.push(n);
|
|
217
223
|
}), e.setNodesSelected({ nodes: r, newValue: !0 }), setTimeout(() => {
|
|
218
|
-
|
|
224
|
+
u = !0;
|
|
219
225
|
}, 0);
|
|
220
226
|
}, ve = (e) => {
|
|
221
|
-
|
|
227
|
+
u && (e.node.isSelected() ? me(e.data) : pe(e.data));
|
|
222
228
|
}, be = () => {
|
|
223
|
-
|
|
229
|
+
u = !0;
|
|
224
230
|
}, M = () => {
|
|
225
231
|
var e;
|
|
226
|
-
|
|
232
|
+
ge(), (e = g.value) == null || e.deselectAll();
|
|
227
233
|
};
|
|
228
|
-
function
|
|
229
|
-
|
|
234
|
+
function Ce(e) {
|
|
235
|
+
we(e), Ke(() => {
|
|
230
236
|
P({});
|
|
231
237
|
});
|
|
232
238
|
}
|
|
233
239
|
function W(e = !1) {
|
|
234
240
|
var r, n, s;
|
|
235
241
|
const t = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
236
|
-
return (s = (n = (r =
|
|
242
|
+
return (s = (n = (r = m.value) == null ? void 0 : r.apForm) == null ? void 0 : n[t]) == null ? void 0 : s.call(n, !0);
|
|
237
243
|
}
|
|
238
244
|
function L(e) {
|
|
239
245
|
var t, r, n;
|
|
240
|
-
(n = (r = (t =
|
|
246
|
+
(n = (r = (t = m.value) == null ? void 0 : t.apForm) == null ? void 0 : r.setFieldsValue) == null || n.call(r, e);
|
|
241
247
|
}
|
|
242
248
|
function O() {
|
|
243
249
|
var e;
|
|
244
|
-
return ((e =
|
|
250
|
+
return ((e = m.value) == null ? void 0 : e.getSorterItems()) || [];
|
|
245
251
|
}
|
|
246
252
|
function G(e) {
|
|
247
253
|
var t;
|
|
248
|
-
(t =
|
|
254
|
+
(t = m.value) == null || t.setSorterItems(e);
|
|
249
255
|
}
|
|
250
256
|
function H() {
|
|
251
257
|
var e;
|
|
252
|
-
(e =
|
|
258
|
+
(e = m.value) == null || e.resetSorterItems();
|
|
253
259
|
}
|
|
254
260
|
Xe({
|
|
255
261
|
columns: l(() => d.value),
|
|
256
262
|
columnsBackup: l(() => oe.value),
|
|
257
|
-
size: l(() => Ze[
|
|
263
|
+
size: l(() => Ze[f.value]),
|
|
258
264
|
updateColumns(e) {
|
|
259
265
|
var t;
|
|
260
|
-
|
|
266
|
+
d.value = e, (t = o.onShownColumnsChange) == null || t.call(o, e);
|
|
261
267
|
},
|
|
262
268
|
updateSize(e) {
|
|
263
|
-
|
|
269
|
+
f.value = Ye[e];
|
|
264
270
|
},
|
|
265
271
|
renderConfig: l(() => ({
|
|
266
272
|
className: Z("table-header", "title"),
|
|
267
273
|
color: ee.value.colorTextTertiary
|
|
268
274
|
})),
|
|
269
|
-
dataSource: l(() => a(
|
|
275
|
+
dataSource: l(() => a(p).records),
|
|
270
276
|
getSearchFormValues: W,
|
|
271
277
|
setSearchFormValues: L,
|
|
272
|
-
submit:
|
|
278
|
+
submit: R,
|
|
273
279
|
submitWith: I,
|
|
274
280
|
reset: F,
|
|
275
281
|
refresh: E,
|
|
@@ -277,13 +283,13 @@ const Do = /* @__PURE__ */ ze({
|
|
|
277
283
|
setSearchFormSorterItems: G,
|
|
278
284
|
resetSearchFormSorterItems: H
|
|
279
285
|
});
|
|
280
|
-
const
|
|
281
|
-
() =>
|
|
286
|
+
const Re = l(
|
|
287
|
+
() => C(o.loading) ? p.loading : o.loading
|
|
282
288
|
), Fe = l(() => [
|
|
283
289
|
i(),
|
|
284
290
|
o.card ? null : i("wrapper"),
|
|
285
291
|
i("adaptive"),
|
|
286
|
-
i(`size-${
|
|
292
|
+
i(`size-${f.value}`)
|
|
287
293
|
].filter(Boolean)), Be = l(() => ({
|
|
288
294
|
height: "100%",
|
|
289
295
|
...o.tableStyle || {}
|
|
@@ -296,7 +302,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
296
302
|
}
|
|
297
303
|
function ke(e, t) {
|
|
298
304
|
var r;
|
|
299
|
-
(r =
|
|
305
|
+
(r = g.value) == null || r.ensureIndexVisible(e, t);
|
|
300
306
|
}
|
|
301
307
|
return k(
|
|
302
308
|
() => o.dataSource,
|
|
@@ -307,16 +313,16 @@ const Do = /* @__PURE__ */ ze({
|
|
|
307
313
|
), k(
|
|
308
314
|
() => o.size,
|
|
309
315
|
(e) => {
|
|
310
|
-
|
|
316
|
+
f.value = e;
|
|
311
317
|
}
|
|
312
318
|
), k(
|
|
313
|
-
() => a(
|
|
319
|
+
() => a(p).loading,
|
|
314
320
|
(e) => {
|
|
315
321
|
var t;
|
|
316
322
|
(t = o.onLoadingChange) == null || t.call(o, e);
|
|
317
323
|
}
|
|
318
324
|
), Y({
|
|
319
|
-
submit:
|
|
325
|
+
submit: R,
|
|
320
326
|
reset: F,
|
|
321
327
|
refresh: E,
|
|
322
328
|
submitWith: I,
|
|
@@ -325,11 +331,11 @@ const Do = /* @__PURE__ */ ze({
|
|
|
325
331
|
getShowColumns: () => a(d),
|
|
326
332
|
rowSelection: {
|
|
327
333
|
selectedRows: l(() => B.value),
|
|
328
|
-
setSelectedRowKeys:
|
|
334
|
+
setSelectedRowKeys: Ce,
|
|
329
335
|
clearAll: M
|
|
330
336
|
},
|
|
331
337
|
scrollToRow: ke,
|
|
332
|
-
getDataSource: () => a(
|
|
338
|
+
getDataSource: () => a(p.records),
|
|
333
339
|
getPaging: ie,
|
|
334
340
|
setPaging: de,
|
|
335
341
|
getSearchFormSorterItems: O,
|
|
@@ -337,41 +343,41 @@ const Do = /* @__PURE__ */ ze({
|
|
|
337
343
|
resetSearchFormSorterItems: H
|
|
338
344
|
}), (e, t) => {
|
|
339
345
|
var r, n;
|
|
340
|
-
return
|
|
346
|
+
return w(), D("div", {
|
|
341
347
|
class: c(Fe.value),
|
|
342
348
|
style: b(e.wrapperStyle)
|
|
343
349
|
}, [
|
|
344
|
-
a(
|
|
350
|
+
a(C)(e.dataSource) && e.searchForm !== !1 && a(A).length > 0 ? (w(), D("div", {
|
|
345
351
|
key: 0,
|
|
346
|
-
class: c(e.card ? a(
|
|
352
|
+
class: c(e.card ? a(h)("search-wrapper") : null),
|
|
347
353
|
style: b(e.searchFormWrapperStyle)
|
|
348
354
|
}, [
|
|
349
|
-
z(a(
|
|
355
|
+
z(a(je).SearchForm, q(e.searchForm || {}, {
|
|
350
356
|
ref_key: "formRef",
|
|
351
|
-
ref:
|
|
357
|
+
ref: m,
|
|
352
358
|
"custom-reset": "",
|
|
353
359
|
"submit-loading": a(N).loading,
|
|
354
|
-
onSubmit: a(
|
|
360
|
+
onSubmit: a(R),
|
|
355
361
|
onReset: a(F)
|
|
356
362
|
}), Ne({
|
|
357
|
-
default:
|
|
358
|
-
(
|
|
363
|
+
default: U(() => [
|
|
364
|
+
(w(!0), D(Ve, null, Ie(a(A), (s) => (w(), J(Ee(s.renderNode), {
|
|
359
365
|
key: s.dataIndex
|
|
360
366
|
}))), 128))
|
|
361
367
|
]),
|
|
362
368
|
_: 2
|
|
363
369
|
}, [
|
|
364
|
-
|
|
370
|
+
y.searchFormExtra ? {
|
|
365
371
|
name: "extra",
|
|
366
|
-
fn:
|
|
372
|
+
fn: U(() => [
|
|
367
373
|
Q(e.$slots, "searchFormExtra")
|
|
368
374
|
]),
|
|
369
375
|
key: "0"
|
|
370
376
|
} : void 0
|
|
371
377
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
372
|
-
], 6)) :
|
|
378
|
+
], 6)) : j("", !0),
|
|
373
379
|
S("div", {
|
|
374
|
-
class: c([a(
|
|
380
|
+
class: c([a(h)("table-wrapper"), e.card ? a(h)("table-wrapper-card") : null]),
|
|
375
381
|
style: b(e.tableWrapperStyle)
|
|
376
382
|
}, [
|
|
377
383
|
S("div", {
|
|
@@ -389,15 +395,12 @@ const Do = /* @__PURE__ */ ze({
|
|
|
389
395
|
}, [
|
|
390
396
|
z(a(We), {
|
|
391
397
|
style: b(Be.value),
|
|
392
|
-
"row-data": a(
|
|
398
|
+
"row-data": a(p).records,
|
|
393
399
|
"column-defs": a(ae),
|
|
394
400
|
"default-col-def": a(te),
|
|
395
|
-
"
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
},
|
|
399
|
-
"row-selection": he.value,
|
|
400
|
-
"selection-column-def": ye.value,
|
|
401
|
+
"suppress-loading-overlay": "",
|
|
402
|
+
"row-selection": ye.value,
|
|
403
|
+
"selection-column-def": he.value,
|
|
401
404
|
"get-row-id": Te,
|
|
402
405
|
"pinned-top-row-data": (r = e.summary) == null ? void 0 : r.top,
|
|
403
406
|
"pinned-bottom-row-data": (n = e.summary) == null ? void 0 : n.bottom,
|
|
@@ -405,27 +408,28 @@ const Do = /* @__PURE__ */ ze({
|
|
|
405
408
|
"tooltip-show-delay": 500,
|
|
406
409
|
"enable-browser-tooltips": e.browserTooltips,
|
|
407
410
|
"tooltip-interaction": "",
|
|
411
|
+
"no-rows-overlay-component": so,
|
|
408
412
|
onSortChanged: ne,
|
|
409
|
-
onGridReady: t[0] || (t[0] = (s) =>
|
|
413
|
+
onGridReady: t[0] || (t[0] = (s) => g.value = s.api),
|
|
410
414
|
onRowDataUpdated: P,
|
|
411
415
|
onRowSelected: ve,
|
|
412
416
|
onFirstDataRendered: be
|
|
413
417
|
}, 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"]),
|
|
414
418
|
Pe(S("div", {
|
|
415
|
-
class: c(a(
|
|
419
|
+
class: c(a(h)("table-loading-wrapper"))
|
|
416
420
|
}, [
|
|
417
421
|
z(a(Ge), { delay: 300 })
|
|
418
422
|
], 2), [
|
|
419
|
-
[Me,
|
|
423
|
+
[Me, Re.value]
|
|
420
424
|
])
|
|
421
425
|
], 2),
|
|
422
426
|
S("div", {
|
|
423
427
|
class: c(a(i)("pagination-wrapper"))
|
|
424
428
|
}, [
|
|
425
|
-
e.pagination !== !1 ? (
|
|
429
|
+
e.pagination !== !1 ? (w(), J(a(He), q({
|
|
426
430
|
key: 0,
|
|
427
431
|
class: a(i)("pagination")
|
|
428
|
-
}, a(N).pagination, { onChange: xe }), null, 16, ["class"])) :
|
|
432
|
+
}, a(N).pagination, { onChange: xe }), null, 16, ["class"])) : j("", !0)
|
|
429
433
|
], 2)
|
|
430
434
|
], 6)
|
|
431
435
|
], 6);
|
|
@@ -433,5 +437,5 @@ const Do = /* @__PURE__ */ ze({
|
|
|
433
437
|
}
|
|
434
438
|
});
|
|
435
439
|
export {
|
|
436
|
-
|
|
440
|
+
Ko as default
|
|
437
441
|
};
|
|
@@ -414,10 +414,7 @@ declare function __VLS_template(): {
|
|
|
414
414
|
default: string | number | ColSize;
|
|
415
415
|
};
|
|
416
416
|
xl: {
|
|
417
|
-
type: PropType<string | number |
|
|
418
|
-
*最后一行剩余的空间
|
|
419
|
-
tips: 如果有小数,则其包含误差, 会比实际值更大
|
|
420
|
-
*/).ColSize>;
|
|
417
|
+
type: PropType<string | number | ColSize>;
|
|
421
418
|
default: string | number | ColSize;
|
|
422
419
|
};
|
|
423
420
|
xxl: {
|
|
@@ -1256,10 +1253,7 @@ declare const __VLS_component: DefineComponent<ApFormSearchFormProps, {
|
|
|
1256
1253
|
default: string | number | ColSize;
|
|
1257
1254
|
};
|
|
1258
1255
|
xl: {
|
|
1259
|
-
type: PropType<string | number |
|
|
1260
|
-
*最后一行剩余的空间
|
|
1261
|
-
tips: 如果有小数,则其包含误差, 会比实际值更大
|
|
1262
|
-
*/).ColSize>;
|
|
1256
|
+
type: PropType<string | number | ColSize>;
|
|
1263
1257
|
default: string | number | ColSize;
|
|
1264
1258
|
};
|
|
1265
1259
|
xxl: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { isVNode as se, defineComponent as ie, useSlots as
|
|
1
|
+
import { isVNode as se, defineComponent as ie, useSlots as ue, ref as D, shallowRef as U, computed as _, unref as n, watch as z, createVNode as o, Fragment as w, createBlock as g, openBlock as d, mergeProps as ce, withCtx as B, resolveDynamicComponent as I, createElementBlock as pe, renderList as de, normalizeStyle as fe } from "vue";
|
|
2
2
|
import { Col as R, Flex as k, Button as M, Row as me } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../ap-form.vue.mjs";
|
|
4
4
|
import "../item/index.vue2.mjs";
|
|
5
5
|
import { genRealChildren as q } from "../item-group/helper.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { isArray as he, isBoolean as xe, omit as
|
|
7
|
+
import { isArray as he, isBoolean as xe, omit as ye } from "lodash-unified";
|
|
8
8
|
import { isDef as H } from "../../utils/index.mjs";
|
|
9
|
-
import { execFunc as G, diffFormItem as
|
|
9
|
+
import { execFunc as G, diffFormItem as ge } from "./utils.mjs";
|
|
10
10
|
import "./components/popover-filter.vue.mjs";
|
|
11
11
|
import { useCountPerRow as ve } from "./hooks/use-count-per-row.mjs";
|
|
12
12
|
import "./components/popover-sorter/index.vue.mjs";
|
|
@@ -121,7 +121,7 @@ const s = 100, Xe = /* @__PURE__ */ ie({
|
|
|
121
121
|
expose: Q
|
|
122
122
|
}) {
|
|
123
123
|
var W;
|
|
124
|
-
const i =
|
|
124
|
+
const i = ue(), t = f, {
|
|
125
125
|
b: m
|
|
126
126
|
} = _e("ap-form-search-form"), {
|
|
127
127
|
t: T
|
|
@@ -143,7 +143,7 @@ const s = 100, Xe = /* @__PURE__ */ ie({
|
|
|
143
143
|
handleClickConfirm: F
|
|
144
144
|
} = Ce(h);
|
|
145
145
|
z(() => i.default(), (e) => {
|
|
146
|
-
E = h.value, h.value =
|
|
146
|
+
E = h.value, h.value = ge(E, q(e)), L.value = !1;
|
|
147
147
|
}), z(() => {
|
|
148
148
|
var e;
|
|
149
149
|
return (e = i.extra) == null ? void 0 : e.call(i);
|
|
@@ -154,28 +154,27 @@ const s = 100, Xe = /* @__PURE__ */ ie({
|
|
|
154
154
|
return J(e * (s / 24), 4);
|
|
155
155
|
}
|
|
156
156
|
const l = _(() => {
|
|
157
|
-
const e = h.value, a = [], r = [],
|
|
158
|
-
console.log("_spanPerCol", c);
|
|
157
|
+
const e = h.value, a = [], r = [], y = [], u = n(O);
|
|
159
158
|
let C = 0, N = 0;
|
|
160
|
-
const ne = s * t.maxRows -
|
|
159
|
+
const ne = s * t.maxRows - u * (n(p) && !t.extraInAction ? 2 : 1);
|
|
161
160
|
e.forEach((A) => {
|
|
162
|
-
const
|
|
163
|
-
if (xe(
|
|
161
|
+
const c = Se(A).props;
|
|
162
|
+
if (xe(c.hidden) ? !!c.hidden : H(c.hidden))
|
|
164
163
|
a.push(A);
|
|
165
164
|
else {
|
|
166
|
-
let S =
|
|
165
|
+
let S = c.span ? te(c.span) : u;
|
|
167
166
|
const j = {
|
|
168
167
|
node: A,
|
|
169
168
|
span: S,
|
|
170
|
-
key: `ApFormSearchFormItem-${ee(
|
|
169
|
+
key: `ApFormSearchFormItem-${ee(c.name)}-${c._signal}`
|
|
171
170
|
}, V = s - C % s;
|
|
172
|
-
V < S && (S += V), C += S, C > ne ? r.push(j) : (N = C,
|
|
171
|
+
V < S && (S += V), C += S, C > ne ? r.push(j) : (N = C, y.push(j));
|
|
173
172
|
}
|
|
174
173
|
});
|
|
175
|
-
const $ = s - (N +
|
|
174
|
+
const $ = s - (N + u) % s, le = Math.ceil(N) % s < u, re = $ < u ? s : $;
|
|
176
175
|
return {
|
|
177
176
|
hideNode: o(w, null, [a]),
|
|
178
|
-
nodes:
|
|
177
|
+
nodes: y,
|
|
179
178
|
collapseNodes: r,
|
|
180
179
|
extraSpan: re,
|
|
181
180
|
lastRowOnlyIncludeActionAndExtra: le
|
|
@@ -226,7 +225,7 @@ const s = 100, Xe = /* @__PURE__ */ ie({
|
|
|
226
225
|
}), t.extraInAction ? n(p) : null]
|
|
227
226
|
})]
|
|
228
227
|
})]
|
|
229
|
-
}),
|
|
228
|
+
}), y = !t.extraInAction && n(p) ? o(R, {
|
|
230
229
|
flex: x(l.value.extraSpan),
|
|
231
230
|
key: "extraNode"
|
|
232
231
|
}, {
|
|
@@ -237,10 +236,10 @@ const s = 100, Xe = /* @__PURE__ */ ie({
|
|
|
237
236
|
default: () => [e]
|
|
238
237
|
})]
|
|
239
238
|
})]
|
|
240
|
-
}) : null,
|
|
239
|
+
}) : null, u = o(R, {
|
|
241
240
|
flex: x(l.value.extraSpan)
|
|
242
241
|
}, null);
|
|
243
|
-
return l.value.lastRowOnlyIncludeActionAndExtra ? o(w, null, [
|
|
242
|
+
return l.value.lastRowOnlyIncludeActionAndExtra ? o(w, null, [y || u, r]) : o(w, null, [r, y]);
|
|
244
243
|
});
|
|
245
244
|
function ae() {
|
|
246
245
|
var a;
|
|
@@ -252,24 +251,24 @@ const s = 100, Xe = /* @__PURE__ */ ie({
|
|
|
252
251
|
getSorterItems: () => b.value,
|
|
253
252
|
setSorterItems: F,
|
|
254
253
|
resetSorterItems: ae
|
|
255
|
-
}), (e, a) => (d(),
|
|
254
|
+
}), (e, a) => (d(), g(Fe, ce({
|
|
256
255
|
ref_key: "apForm",
|
|
257
256
|
ref: v,
|
|
258
257
|
class: n(m)()
|
|
259
|
-
}, n(
|
|
260
|
-
default: B(() => [(d(),
|
|
258
|
+
}, n(ye)(t, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
|
|
259
|
+
default: B(() => [(d(), g(I(l.value.hideNode))), o(n(me), {
|
|
261
260
|
gutter: 8
|
|
262
261
|
}, {
|
|
263
|
-
default: B(() => [(d(!0), pe(w, null, de(l.value.nodes, (r) => (d(),
|
|
262
|
+
default: B(() => [(d(!0), pe(w, null, de(l.value.nodes, (r) => (d(), g(n(R), {
|
|
264
263
|
key: r.key,
|
|
265
264
|
flex: x(r.span),
|
|
266
265
|
style: fe({
|
|
267
266
|
maxWidth: x(r.span)
|
|
268
267
|
})
|
|
269
268
|
}, {
|
|
270
|
-
default: B(() => [(d(),
|
|
269
|
+
default: B(() => [(d(), g(I(r.node)))]),
|
|
271
270
|
_: 2
|
|
272
|
-
}, 1032, ["flex", "style"]))), 128)), (d(),
|
|
271
|
+
}, 1032, ["flex", "style"]))), 128)), (d(), g(I(oe.value)))]),
|
|
273
272
|
_: 1
|
|
274
273
|
})]),
|
|
275
274
|
_: 1
|