@aplus-frontend/ui 6.24.2 → 6.26.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/index.vue.mjs +36 -32
- 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 +1 -1
- package/es/src/ap-form/search-form/index.vue.mjs +116 -109
- 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 +229 -212
- package/es/src/ap-grid/interface.d.ts +13 -1
- 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-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/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/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/index.vue.js +1 -1
- 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 +1 -1
- 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 +13 -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-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/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/utils/copy.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-pro-card/index.css +29 -25
- package/theme/ap-pro-card/index.less +32 -16
- package/theme/ap-value-select-card/index.css +1 -0
- package/theme/ap-value-select-card/index.less +1 -0
- package/theme/index.css +30 -25
|
@@ -87,8 +87,8 @@ const Do = /* @__PURE__ */ ze({
|
|
|
87
87
|
},
|
|
88
88
|
setup(X, { expose: Y }) {
|
|
89
89
|
Le.registerModules([Oe]);
|
|
90
|
-
const o = X, h = Ae(), { e: y, b: i, be: Z } = lo("ag-grid"),
|
|
91
|
-
let
|
|
90
|
+
const o = X, h = Ae(), { e: y, b: i, be: Z } = lo("ag-grid"), f = v(o.size), _ = eo(f, j(o, "rowHeight")), w = v(), [, ee] = _e();
|
|
91
|
+
let u = !!o.dataSource;
|
|
92
92
|
const A = no(o), { shownColumns: d, shownColumnsBackup: oe } = oo(o), { defaultColDef: te, columnDefs: ae } = to(
|
|
93
93
|
d,
|
|
94
94
|
o
|
|
@@ -105,7 +105,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
105
105
|
};
|
|
106
106
|
function ne() {
|
|
107
107
|
var s;
|
|
108
|
-
const e = (s =
|
|
108
|
+
const e = (s = w.value.getColumns()) == null ? void 0 : s.filter((T) => T.getSort() !== void 0);
|
|
109
109
|
if (!(e != null && e.length))
|
|
110
110
|
return;
|
|
111
111
|
const t = e[0], r = t.getColDef(), n = t.getSort();
|
|
@@ -125,10 +125,10 @@ const Do = /* @__PURE__ */ ze({
|
|
|
125
125
|
return ((n = r.type) == null ? void 0 : n.name) === "ApView";
|
|
126
126
|
});
|
|
127
127
|
}), {
|
|
128
|
-
formRef:
|
|
128
|
+
formRef: m,
|
|
129
129
|
submit: C,
|
|
130
130
|
reset: F,
|
|
131
|
-
data:
|
|
131
|
+
data: p,
|
|
132
132
|
tableProps: N,
|
|
133
133
|
handleTableChangeOptional: V,
|
|
134
134
|
submitWith: I,
|
|
@@ -139,7 +139,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
139
139
|
} = $e({
|
|
140
140
|
async request(e) {
|
|
141
141
|
var r;
|
|
142
|
-
if (
|
|
142
|
+
if (u = !1, !R(o.dataSource)) {
|
|
143
143
|
const n = e.pageSize * (e.current - 1);
|
|
144
144
|
return {
|
|
145
145
|
data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(n, n + e.pageSize)) || [],
|
|
@@ -161,7 +161,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
161
161
|
pagination: o.pagination,
|
|
162
162
|
sortFields: le
|
|
163
163
|
}), ue = l(
|
|
164
|
-
() => R(o.dataSource) ?
|
|
164
|
+
() => R(o.dataSource) ? p.records : o.dataSource
|
|
165
165
|
), {
|
|
166
166
|
select: me,
|
|
167
167
|
unSelect: pe,
|
|
@@ -202,28 +202,32 @@ const Do = /* @__PURE__ */ ze({
|
|
|
202
202
|
return je(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
|
|
203
203
|
}
|
|
204
204
|
const P = ({
|
|
205
|
-
api: e =
|
|
205
|
+
api: e = w.value
|
|
206
206
|
}) => {
|
|
207
207
|
if (!o.rowSelection)
|
|
208
208
|
return;
|
|
209
209
|
const t = B.value;
|
|
210
|
-
if (!t.length)
|
|
210
|
+
if (!t.length) {
|
|
211
|
+
setTimeout(() => {
|
|
212
|
+
u = !0;
|
|
213
|
+
}, 0);
|
|
211
214
|
return;
|
|
212
|
-
|
|
215
|
+
}
|
|
216
|
+
u = !1;
|
|
213
217
|
const r = [];
|
|
214
218
|
e.forEachNode((n) => {
|
|
215
219
|
const s = n.data, T = x(s);
|
|
216
220
|
t.find((De) => x(De) === T) && r.push(n);
|
|
217
221
|
}), e.setNodesSelected({ nodes: r, newValue: !0 }), setTimeout(() => {
|
|
218
|
-
|
|
222
|
+
u = !0;
|
|
219
223
|
}, 0);
|
|
220
224
|
}, ve = (e) => {
|
|
221
|
-
|
|
225
|
+
u && (e.node.isSelected() ? me(e.data) : pe(e.data));
|
|
222
226
|
}, be = () => {
|
|
223
|
-
|
|
227
|
+
u = !0;
|
|
224
228
|
}, M = () => {
|
|
225
229
|
var e;
|
|
226
|
-
we(), (e =
|
|
230
|
+
we(), (e = w.value) == null || e.deselectAll();
|
|
227
231
|
};
|
|
228
232
|
function Re(e) {
|
|
229
233
|
ge(e), Ke(() => {
|
|
@@ -233,40 +237,40 @@ const Do = /* @__PURE__ */ ze({
|
|
|
233
237
|
function W(e = !1) {
|
|
234
238
|
var r, n, s;
|
|
235
239
|
const t = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
236
|
-
return (s = (n = (r =
|
|
240
|
+
return (s = (n = (r = m.value) == null ? void 0 : r.apForm) == null ? void 0 : n[t]) == null ? void 0 : s.call(n, !0);
|
|
237
241
|
}
|
|
238
242
|
function L(e) {
|
|
239
243
|
var t, r, n;
|
|
240
|
-
(n = (r = (t =
|
|
244
|
+
(n = (r = (t = m.value) == null ? void 0 : t.apForm) == null ? void 0 : r.setFieldsValue) == null || n.call(r, e);
|
|
241
245
|
}
|
|
242
246
|
function O() {
|
|
243
247
|
var e;
|
|
244
|
-
return ((e =
|
|
248
|
+
return ((e = m.value) == null ? void 0 : e.getSorterItems()) || [];
|
|
245
249
|
}
|
|
246
250
|
function G(e) {
|
|
247
251
|
var t;
|
|
248
|
-
(t =
|
|
252
|
+
(t = m.value) == null || t.setSorterItems(e);
|
|
249
253
|
}
|
|
250
254
|
function H() {
|
|
251
255
|
var e;
|
|
252
|
-
(e =
|
|
256
|
+
(e = m.value) == null || e.resetSorterItems();
|
|
253
257
|
}
|
|
254
258
|
Xe({
|
|
255
259
|
columns: l(() => d.value),
|
|
256
260
|
columnsBackup: l(() => oe.value),
|
|
257
|
-
size: l(() => Ze[
|
|
261
|
+
size: l(() => Ze[f.value]),
|
|
258
262
|
updateColumns(e) {
|
|
259
263
|
var t;
|
|
260
|
-
|
|
264
|
+
d.value = e, (t = o.onShownColumnsChange) == null || t.call(o, e);
|
|
261
265
|
},
|
|
262
266
|
updateSize(e) {
|
|
263
|
-
|
|
267
|
+
f.value = Ye[e];
|
|
264
268
|
},
|
|
265
269
|
renderConfig: l(() => ({
|
|
266
270
|
className: Z("table-header", "title"),
|
|
267
271
|
color: ee.value.colorTextTertiary
|
|
268
272
|
})),
|
|
269
|
-
dataSource: l(() => a(
|
|
273
|
+
dataSource: l(() => a(p).records),
|
|
270
274
|
getSearchFormValues: W,
|
|
271
275
|
setSearchFormValues: L,
|
|
272
276
|
submit: C,
|
|
@@ -278,12 +282,12 @@ const Do = /* @__PURE__ */ ze({
|
|
|
278
282
|
resetSearchFormSorterItems: H
|
|
279
283
|
});
|
|
280
284
|
const Ce = l(
|
|
281
|
-
() => R(o.loading) ?
|
|
285
|
+
() => R(o.loading) ? p.loading : o.loading
|
|
282
286
|
), Fe = l(() => [
|
|
283
287
|
i(),
|
|
284
288
|
o.card ? null : i("wrapper"),
|
|
285
289
|
i("adaptive"),
|
|
286
|
-
i(`size-${
|
|
290
|
+
i(`size-${f.value}`)
|
|
287
291
|
].filter(Boolean)), Be = l(() => ({
|
|
288
292
|
height: "100%",
|
|
289
293
|
...o.tableStyle || {}
|
|
@@ -296,7 +300,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
296
300
|
}
|
|
297
301
|
function ke(e, t) {
|
|
298
302
|
var r;
|
|
299
|
-
(r =
|
|
303
|
+
(r = w.value) == null || r.ensureIndexVisible(e, t);
|
|
300
304
|
}
|
|
301
305
|
return k(
|
|
302
306
|
() => o.dataSource,
|
|
@@ -307,10 +311,10 @@ const Do = /* @__PURE__ */ ze({
|
|
|
307
311
|
), k(
|
|
308
312
|
() => o.size,
|
|
309
313
|
(e) => {
|
|
310
|
-
|
|
314
|
+
f.value = e;
|
|
311
315
|
}
|
|
312
316
|
), k(
|
|
313
|
-
() => a(
|
|
317
|
+
() => a(p).loading,
|
|
314
318
|
(e) => {
|
|
315
319
|
var t;
|
|
316
320
|
(t = o.onLoadingChange) == null || t.call(o, e);
|
|
@@ -329,7 +333,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
329
333
|
clearAll: M
|
|
330
334
|
},
|
|
331
335
|
scrollToRow: ke,
|
|
332
|
-
getDataSource: () => a(
|
|
336
|
+
getDataSource: () => a(p.records),
|
|
333
337
|
getPaging: ie,
|
|
334
338
|
setPaging: de,
|
|
335
339
|
getSearchFormSorterItems: O,
|
|
@@ -348,7 +352,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
348
352
|
}, [
|
|
349
353
|
z(a(qe).SearchForm, U(e.searchForm || {}, {
|
|
350
354
|
ref_key: "formRef",
|
|
351
|
-
ref:
|
|
355
|
+
ref: m,
|
|
352
356
|
"custom-reset": "",
|
|
353
357
|
"submit-loading": a(N).loading,
|
|
354
358
|
onSubmit: a(C),
|
|
@@ -389,7 +393,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
389
393
|
}, [
|
|
390
394
|
z(a(We), {
|
|
391
395
|
style: b(Be.value),
|
|
392
|
-
"row-data": a(
|
|
396
|
+
"row-data": a(p).records,
|
|
393
397
|
"column-defs": a(ae),
|
|
394
398
|
"default-col-def": a(te),
|
|
395
399
|
"locale-text": {
|
|
@@ -406,7 +410,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
406
410
|
"enable-browser-tooltips": e.browserTooltips,
|
|
407
411
|
"tooltip-interaction": "",
|
|
408
412
|
onSortChanged: ne,
|
|
409
|
-
onGridReady: t[0] || (t[0] = (s) =>
|
|
413
|
+
onGridReady: t[0] || (t[0] = (s) => w.value = s.api),
|
|
410
414
|
onRowDataUpdated: P,
|
|
411
415
|
onRowSelected: ve,
|
|
412
416
|
onFirstDataRendered: be
|
|
@@ -151,7 +151,6 @@ export type ApFormListProps = {
|
|
|
151
151
|
initialValue?: any[];
|
|
152
152
|
transform?: ApFormItemTransformType;
|
|
153
153
|
};
|
|
154
|
-
type AllowCountPerRowType = 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24;
|
|
155
154
|
export type ApFormSearchFormProps = ApFormProps & {
|
|
156
155
|
collapse?: boolean;
|
|
157
156
|
defaultCollapse?: boolean;
|
|
@@ -163,7 +162,7 @@ export type ApFormSearchFormProps = ApFormProps & {
|
|
|
163
162
|
customReset?: boolean;
|
|
164
163
|
extraInAction?: boolean;
|
|
165
164
|
forceExpand?: boolean;
|
|
166
|
-
countPerRow?:
|
|
165
|
+
countPerRow?: number;
|
|
167
166
|
submitLoading?: boolean;
|
|
168
167
|
/**
|
|
169
168
|
* 最大显示的行(超出后将会收起进入更多筛选)
|
|
@@ -1,35 +1,38 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useResizeObserver as
|
|
3
|
-
import { isUndefined as
|
|
4
|
-
const
|
|
5
|
-
(
|
|
6
|
-
),
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
(
|
|
10
|
-
const
|
|
11
|
-
const m =
|
|
12
|
-
|
|
1
|
+
import { ref as a, watchEffect as d, computed as r, unref as f } from "vue";
|
|
2
|
+
import { useResizeObserver as w } from "@vueuse/core";
|
|
3
|
+
import { isUndefined as h } from "lodash-unified";
|
|
4
|
+
const l = { xs: 0, sm: 768, md: 1280, lg: 1728 }, z = Object.entries(l).sort(
|
|
5
|
+
(e, n) => n[1] - e[1]
|
|
6
|
+
), p = (e) => {
|
|
7
|
+
const n = a(0);
|
|
8
|
+
d(
|
|
9
|
+
(t) => {
|
|
10
|
+
const o = h(e.resizeTarget) ? document.documentElement : e.resizeTarget, { stop: c } = w(o, (i) => {
|
|
11
|
+
const m = i[0], { width: u } = m.contentRect;
|
|
12
|
+
n.value = u;
|
|
13
13
|
});
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
t(() => {
|
|
15
|
+
c();
|
|
16
16
|
});
|
|
17
17
|
},
|
|
18
18
|
{ flush: "post" }
|
|
19
19
|
);
|
|
20
|
-
const
|
|
21
|
-
for (const [
|
|
22
|
-
if (
|
|
23
|
-
return
|
|
20
|
+
const s = r(() => {
|
|
21
|
+
for (const [t, o] of z)
|
|
22
|
+
if (f(n) > o)
|
|
23
|
+
return t;
|
|
24
24
|
return "md";
|
|
25
25
|
});
|
|
26
|
-
return
|
|
27
|
-
const e =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
return r(() => {
|
|
27
|
+
const t = e.countPerRow, o = {
|
|
28
|
+
xs: t - 2,
|
|
29
|
+
sm: t - 1,
|
|
30
|
+
md: t,
|
|
31
|
+
lg: t + 1
|
|
32
|
+
};
|
|
33
|
+
return Math.max(1, o[s.value]);
|
|
31
34
|
});
|
|
32
35
|
};
|
|
33
36
|
export {
|
|
34
|
-
|
|
37
|
+
p as useCountPerRow
|
|
35
38
|
};
|
|
@@ -851,7 +851,7 @@ declare const __VLS_component: DefineComponent<ApFormSearchFormProps, {
|
|
|
851
851
|
validateTrigger: string | string[];
|
|
852
852
|
hideRequiredMark: boolean;
|
|
853
853
|
validateOnRuleChange: boolean;
|
|
854
|
-
countPerRow:
|
|
854
|
+
countPerRow: number;
|
|
855
855
|
defaultCollapse: boolean;
|
|
856
856
|
customReset: boolean;
|
|
857
857
|
extraInAction: boolean;
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { Col 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
|
+
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
|
-
import { genRealChildren as
|
|
5
|
+
import { genRealChildren as q } from "../item-group/helper.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { isArray as
|
|
8
|
-
import { isDef as
|
|
9
|
-
import { execFunc as
|
|
7
|
+
import { isArray as he, isBoolean as xe, omit as ye } from "lodash-unified";
|
|
8
|
+
import { isDef as H } from "../../utils/index.mjs";
|
|
9
|
+
import { execFunc as G, diffFormItem as ge } from "./utils.mjs";
|
|
10
10
|
import "./components/popover-filter.vue.mjs";
|
|
11
|
-
import { useCountPerRow as
|
|
11
|
+
import { useCountPerRow as ve } from "./hooks/use-count-per-row.mjs";
|
|
12
12
|
import "./components/popover-sorter/index.vue.mjs";
|
|
13
|
-
import { useSorter as
|
|
14
|
-
import { getTargetNode as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
import { useSorter as Ce } from "./hooks/use-sorter.mjs";
|
|
14
|
+
import { getTargetNode as Se } from "./hooks/use-collapse-input-count.mjs";
|
|
15
|
+
import { floorWith as J } from "@fruits-chain/utils";
|
|
16
|
+
import { useNamespace as _e } from "../../config-provider/hooks/use-namespace.mjs";
|
|
17
|
+
import { useLocale as we } from "../../config-provider/hooks/use-locale.mjs";
|
|
18
|
+
import K from "../item/index.vue.mjs";
|
|
19
|
+
import Re from "./components/popover-filter.vue2.mjs";
|
|
20
|
+
import be from "./components/popover-sorter/index.vue2.mjs";
|
|
21
|
+
import Fe from "../ap-form.vue2.mjs";
|
|
22
|
+
function Ne(f) {
|
|
23
|
+
return typeof f == "function" || Object.prototype.toString.call(f) === "[object Object]" && !se(f);
|
|
23
24
|
}
|
|
24
|
-
const s =
|
|
25
|
+
const s = 100, Xe = /* @__PURE__ */ ie({
|
|
25
26
|
name: "ApFormSearchForm",
|
|
26
27
|
__name: "index",
|
|
27
28
|
props: {
|
|
@@ -99,7 +100,7 @@ const s = 24, He = /* @__PURE__ */ le({
|
|
|
99
100
|
default: !1
|
|
100
101
|
},
|
|
101
102
|
countPerRow: {
|
|
102
|
-
default:
|
|
103
|
+
default: 5
|
|
103
104
|
},
|
|
104
105
|
submitLoading: {
|
|
105
106
|
type: Boolean
|
|
@@ -116,152 +117,158 @@ const s = 24, He = /* @__PURE__ */ le({
|
|
|
116
117
|
default: 300
|
|
117
118
|
}
|
|
118
119
|
},
|
|
119
|
-
setup(
|
|
120
|
-
expose:
|
|
120
|
+
setup(f, {
|
|
121
|
+
expose: Q
|
|
121
122
|
}) {
|
|
122
|
-
var
|
|
123
|
-
const i =
|
|
124
|
-
b:
|
|
125
|
-
} =
|
|
126
|
-
t:
|
|
127
|
-
} =
|
|
128
|
-
function
|
|
123
|
+
var W;
|
|
124
|
+
const i = ue(), t = f, {
|
|
125
|
+
b: m
|
|
126
|
+
} = _e("ap-form-search-form"), {
|
|
127
|
+
t: T
|
|
128
|
+
} = we(), X = ve(t), v = D(), Y = D();
|
|
129
|
+
function P() {
|
|
129
130
|
var a;
|
|
130
|
-
const e = (a =
|
|
131
|
-
|
|
131
|
+
const e = (a = v.value) == null ? void 0 : a.getFieldsValueTransformed(!0);
|
|
132
|
+
G(t.onSubmit, e);
|
|
132
133
|
}
|
|
133
|
-
function
|
|
134
|
+
function Z() {
|
|
134
135
|
var e, a;
|
|
135
|
-
t.customReset || (a = (e =
|
|
136
|
+
t.customReset || (a = (e = v.value) == null ? void 0 : e.resetFields) == null || a.call(e), G(t.onReset);
|
|
136
137
|
}
|
|
137
|
-
const
|
|
138
|
+
const ee = (e) => H(e) ? (he(e) ? e : [e]).join("") : Date.now();
|
|
138
139
|
let E = [];
|
|
139
|
-
const h = U(
|
|
140
|
-
items:
|
|
141
|
-
sorted:
|
|
142
|
-
handleClickConfirm:
|
|
143
|
-
} =
|
|
144
|
-
|
|
145
|
-
E = h.value, h.value =
|
|
146
|
-
}),
|
|
140
|
+
const h = U(q(i.default())), p = U((W = i.extra) == null ? void 0 : W.call(i)), O = _(() => J(s / n(X), 4)), {
|
|
141
|
+
items: b,
|
|
142
|
+
sorted: L,
|
|
143
|
+
handleClickConfirm: F
|
|
144
|
+
} = Ce(h);
|
|
145
|
+
z(() => i.default(), (e) => {
|
|
146
|
+
E = h.value, h.value = ge(E, q(e)), L.value = !1;
|
|
147
|
+
}), z(() => {
|
|
147
148
|
var e;
|
|
148
149
|
return (e = i.extra) == null ? void 0 : e.call(i);
|
|
149
150
|
}, (e) => {
|
|
150
|
-
|
|
151
|
+
p.value = e;
|
|
151
152
|
});
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
e.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
153
|
+
function te(e) {
|
|
154
|
+
return J(e * (s / 24), 4);
|
|
155
|
+
}
|
|
156
|
+
const l = _(() => {
|
|
157
|
+
const e = h.value, a = [], r = [], y = [], u = n(O);
|
|
158
|
+
let C = 0, N = 0;
|
|
159
|
+
const ne = s * t.maxRows - u * (n(p) && !t.extraInAction ? 2 : 1);
|
|
160
|
+
e.forEach((A) => {
|
|
161
|
+
const c = Se(A).props;
|
|
162
|
+
if (xe(c.hidden) ? !!c.hidden : H(c.hidden))
|
|
163
|
+
a.push(A);
|
|
160
164
|
else {
|
|
161
|
-
let
|
|
162
|
-
const
|
|
163
|
-
node:
|
|
164
|
-
span:
|
|
165
|
-
key: `ApFormSearchFormItem-${
|
|
166
|
-
},
|
|
167
|
-
|
|
165
|
+
let S = c.span ? te(c.span) : u;
|
|
166
|
+
const j = {
|
|
167
|
+
node: A,
|
|
168
|
+
span: S,
|
|
169
|
+
key: `ApFormSearchFormItem-${ee(c.name)}-${c._signal}`
|
|
170
|
+
}, V = s - C % s;
|
|
171
|
+
V < S && (S += V), C += S, C > ne ? r.push(j) : (N = C, y.push(j));
|
|
168
172
|
}
|
|
169
173
|
});
|
|
170
|
-
const
|
|
174
|
+
const $ = s - (N + u) % s, le = Math.ceil(N) % s < u, re = $ < u ? s : $;
|
|
171
175
|
return {
|
|
172
|
-
hideNode: o(
|
|
173
|
-
nodes:
|
|
176
|
+
hideNode: o(w, null, [a]),
|
|
177
|
+
nodes: y,
|
|
174
178
|
collapseNodes: r,
|
|
175
|
-
extraSpan:
|
|
176
|
-
lastRowOnlyIncludeActionAndExtra:
|
|
179
|
+
extraSpan: re,
|
|
180
|
+
lastRowOnlyIncludeActionAndExtra: le
|
|
177
181
|
};
|
|
178
|
-
}),
|
|
182
|
+
}), x = (e) => `${e}%`, oe = _(() => {
|
|
179
183
|
let e;
|
|
180
|
-
const a = l.value.collapseNodes.length || t.sortable && h.value.length, r = o(
|
|
181
|
-
|
|
184
|
+
const a = l.value.collapseNodes.length || t.sortable && h.value.length, r = o(R, {
|
|
185
|
+
flex: x(n(O)),
|
|
182
186
|
key: "actionWrapper"
|
|
183
187
|
}, {
|
|
184
|
-
default: () => [o(
|
|
185
|
-
default: () => [o(
|
|
188
|
+
default: () => [o(K, null, {
|
|
189
|
+
default: () => [o(k, {
|
|
186
190
|
wrap: "wrap",
|
|
187
|
-
justify: l.value.lastRowOnlyIncludeActionAndExtra && !(n(
|
|
191
|
+
justify: l.value.lastRowOnlyIncludeActionAndExtra && !(n(p) && t.extraInAction) ? "flex-end" : "space-between"
|
|
188
192
|
}, {
|
|
189
|
-
default: () => [o(
|
|
193
|
+
default: () => [o(k, {
|
|
190
194
|
gap: 8,
|
|
191
195
|
wrap: "wrap"
|
|
192
196
|
}, {
|
|
193
197
|
default: () => [a ? o("div", {
|
|
194
|
-
class:
|
|
195
|
-
}, [l.value.collapseNodes.length ? o(
|
|
196
|
-
onSubmit:
|
|
198
|
+
class: m("column-setting-trigger-wrapper")
|
|
199
|
+
}, [l.value.collapseNodes.length ? o(Re, {
|
|
200
|
+
onSubmit: P,
|
|
197
201
|
config: l.value.collapseNodes,
|
|
198
202
|
submitLoading: t.submitLoading
|
|
199
|
-
}, null) : null, t.sortable &&
|
|
203
|
+
}, null) : null, t.sortable && b.value.length ? o(be, {
|
|
200
204
|
ref: "sorterIns",
|
|
201
|
-
items:
|
|
202
|
-
onClickConfirm:
|
|
203
|
-
sorted:
|
|
205
|
+
items: b.value,
|
|
206
|
+
onClickConfirm: F,
|
|
207
|
+
sorted: L.value
|
|
204
208
|
}, null) : null]) : null, o(M, {
|
|
205
209
|
type: "primary",
|
|
206
|
-
onClick:
|
|
210
|
+
onClick: P,
|
|
207
211
|
loading: t.submitLoading ? {
|
|
208
212
|
delay: t.loadingDelay
|
|
209
213
|
} : !1,
|
|
210
214
|
htmlType: "submit",
|
|
211
|
-
class:
|
|
215
|
+
class: m("action-btn")
|
|
212
216
|
}, {
|
|
213
|
-
default: () => [t.searchText ||
|
|
217
|
+
default: () => [t.searchText || T("ap.apForm.search.search")]
|
|
214
218
|
}), o(M, {
|
|
215
|
-
onClick:
|
|
219
|
+
onClick: Z,
|
|
216
220
|
type: "text",
|
|
217
|
-
class: [
|
|
221
|
+
class: [m("action-btn"), m("action-btn-reset")]
|
|
218
222
|
}, {
|
|
219
|
-
default: () => [t.resetText ||
|
|
223
|
+
default: () => [t.resetText || T("ap.apForm.search.reset")]
|
|
220
224
|
})]
|
|
221
|
-
}), t.extraInAction ? n(
|
|
225
|
+
}), t.extraInAction ? n(p) : null]
|
|
222
226
|
})]
|
|
223
227
|
})]
|
|
224
|
-
}),
|
|
225
|
-
|
|
228
|
+
}), y = !t.extraInAction && n(p) ? o(R, {
|
|
229
|
+
flex: x(l.value.extraSpan),
|
|
226
230
|
key: "extraNode"
|
|
227
231
|
}, {
|
|
228
|
-
default: () => [o(
|
|
229
|
-
default: () => [o(
|
|
232
|
+
default: () => [o(K, null, {
|
|
233
|
+
default: () => [o(k, {
|
|
230
234
|
justify: l.value.extraSpan === s || l.value.lastRowOnlyIncludeActionAndExtra ? "start" : "flex-end"
|
|
231
|
-
},
|
|
235
|
+
}, Ne(e = n(p)) ? e : {
|
|
232
236
|
default: () => [e]
|
|
233
237
|
})]
|
|
234
238
|
})]
|
|
235
|
-
}) : null, u = o(
|
|
236
|
-
|
|
239
|
+
}) : null, u = o(R, {
|
|
240
|
+
flex: x(l.value.extraSpan)
|
|
237
241
|
}, null);
|
|
238
|
-
return l.value.lastRowOnlyIncludeActionAndExtra ? o(
|
|
242
|
+
return l.value.lastRowOnlyIncludeActionAndExtra ? o(w, null, [y || u, r]) : o(w, null, [r, y]);
|
|
239
243
|
});
|
|
240
|
-
function
|
|
244
|
+
function ae() {
|
|
241
245
|
var a;
|
|
242
|
-
const e = (a =
|
|
243
|
-
|
|
246
|
+
const e = (a = Y.value) == null ? void 0 : a.getCachedList();
|
|
247
|
+
F(e);
|
|
244
248
|
}
|
|
245
|
-
return
|
|
246
|
-
apForm:
|
|
247
|
-
getSorterItems: () =>
|
|
248
|
-
setSorterItems:
|
|
249
|
-
resetSorterItems:
|
|
250
|
-
}), (e, a) => (d(),
|
|
249
|
+
return Q({
|
|
250
|
+
apForm: _(() => n(v)),
|
|
251
|
+
getSorterItems: () => b.value,
|
|
252
|
+
setSorterItems: F,
|
|
253
|
+
resetSorterItems: ae
|
|
254
|
+
}), (e, a) => (d(), g(Fe, ce({
|
|
251
255
|
ref_key: "apForm",
|
|
252
|
-
ref:
|
|
253
|
-
class: n(
|
|
254
|
-
}, n(
|
|
255
|
-
default:
|
|
256
|
+
ref: v,
|
|
257
|
+
class: n(m)()
|
|
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), {
|
|
256
260
|
gutter: 8
|
|
257
261
|
}, {
|
|
258
|
-
default:
|
|
262
|
+
default: B(() => [(d(!0), pe(w, null, de(l.value.nodes, (r) => (d(), g(n(R), {
|
|
259
263
|
key: r.key,
|
|
260
|
-
|
|
264
|
+
flex: x(r.span),
|
|
265
|
+
style: fe({
|
|
266
|
+
maxWidth: x(r.span)
|
|
267
|
+
})
|
|
261
268
|
}, {
|
|
262
|
-
default:
|
|
269
|
+
default: B(() => [(d(), g(I(r.node)))]),
|
|
263
270
|
_: 2
|
|
264
|
-
}, 1032, ["
|
|
271
|
+
}, 1032, ["flex", "style"]))), 128)), (d(), g(I(oe.value)))]),
|
|
265
272
|
_: 1
|
|
266
273
|
})]),
|
|
267
274
|
_: 1
|
|
@@ -269,5 +276,5 @@ const s = 24, He = /* @__PURE__ */ le({
|
|
|
269
276
|
}
|
|
270
277
|
});
|
|
271
278
|
export {
|
|
272
|
-
|
|
279
|
+
Xe as default
|
|
273
280
|
};
|