@aplus-frontend/ui 6.11.0 → 6.13.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/ap-descriptions/interface.d.ts +1 -1
- package/es/src/ap-form/ap-form.vue2.mjs +118 -108
- package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/select/index.vue.d.ts +4 -4
- package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +4 -4
- package/es/src/ap-form/search-form/hooks/use-collapse-input-count.d.ts +8 -1
- package/es/src/ap-form/search-form/hooks/use-collapse-input-count.mjs +27 -19
- package/es/src/ap-form/search-form/hooks/use-sorter.mjs +31 -30
- package/es/src/ap-form/search-form/index.vue.d.ts +6 -2
- package/es/src/ap-form/search-form/index.vue.mjs +35 -35
- package/es/src/ap-grid/index.vue.mjs +221 -225
- package/es/src/ap-modal/interface.d.ts +8 -0
- package/es/src/ap-modal/utils/createModalStream.mjs +69 -66
- package/es/src/ap-table/ap-table.vue2.mjs +107 -111
- package/es/src/ap-table/constants.d.ts +7 -7
- package/es/src/ap-table/context.d.ts +1 -0
- package/es/src/ap-table/context.mjs +6 -5
- package/es/src/ap-table/utils.d.ts +5 -3247
- package/es/src/ap-table/utils.mjs +107 -121
- package/es/src/business/ap-card/ApCard.vue2.mjs +17 -17
- package/es/src/business/ap-summary/interface.d.ts +1 -1
- package/es/src/business/ap-view/ap-view.vue2.mjs +76 -74
- package/es/src/business/ap-view/interface.d.ts +1 -0
- package/es/src/business/batch-input-group/index.vue.d.ts +2 -1
- package/es/src/business/batch-input-group/index.vue.mjs +56 -52
- package/es/src/business/batch-input-group/interface.d.ts +5 -0
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +36 -32
- package/es/src/business/batch-input-group/utils.d.ts +8 -0
- package/es/src/business/batch-input-group/utils.mjs +10 -0
- package/es/src/config-provider/config-provider-props.d.ts +5 -1
- package/es/src/config-provider/config-provider-props.mjs +4 -0
- package/es/src/config-provider/config-provider.d.ts +14 -5
- package/es/src/config-provider/config-provider.mjs +19 -18
- package/es/src/config-provider/constants.d.ts +3 -0
- package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/es/src/config-provider/index.d.ts +28 -13
- package/es/src/utils/config-provider-preset.d.ts +6 -6
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-descriptions/interface.d.ts +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/select/index.vue.d.ts +4 -4
- package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +4 -4
- package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.d.ts +8 -1
- package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.js +1 -1
- package/lib/src/ap-form/search-form/hooks/use-sorter.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +6 -2
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-modal/interface.d.ts +8 -0
- package/lib/src/ap-modal/utils/createModalStream.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +7 -7
- package/lib/src/ap-table/context.d.ts +1 -0
- package/lib/src/ap-table/context.js +1 -1
- package/lib/src/ap-table/utils.d.ts +5 -3247
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-card/ApCard.vue2.js +1 -1
- package/lib/src/business/ap-summary/interface.d.ts +1 -1
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/business/ap-view/interface.d.ts +1 -0
- package/lib/src/business/batch-input-group/index.vue.d.ts +2 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/business/batch-input-group/interface.d.ts +5 -0
- package/lib/src/business/batch-input-group/popover-input/index.vue2.js +3 -2
- package/lib/src/business/batch-input-group/utils.d.ts +8 -0
- package/lib/src/business/batch-input-group/utils.js +1 -0
- package/lib/src/config-provider/config-provider-props.d.ts +5 -1
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +14 -5
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/constants.d.ts +3 -0
- package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/lib/src/config-provider/index.d.ts +28 -13
- package/lib/src/utils/config-provider-preset.d.ts +6 -6
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
- package/theme/ap-grid/index.css +3 -0
- package/theme/ap-grid/index.less +3 -4
- package/theme/index.css +3 -0
- package/es/src/ap-table/components/dynamic-component/index.vue.d.ts +0 -4
- package/es/src/ap-table/components/dynamic-component/index.vue.mjs +0 -4
- package/es/src/ap-table/components/dynamic-component/index.vue2.mjs +0 -15
- package/lib/src/ap-table/components/dynamic-component/index.vue.d.ts +0 -4
- package/lib/src/ap-table/components/dynamic-component/index.vue.js +0 -1
- package/lib/src/ap-table/components/dynamic-component/index.vue2.js +0 -1
|
@@ -71,6 +71,14 @@ export type ModalStreamNextFunc<ModalType extends ModalStreamTypeKey = ModalStre
|
|
|
71
71
|
* 本次弹框的实例方法
|
|
72
72
|
*/
|
|
73
73
|
modalExample: ModalStreamTypeExample[ModalType]) => any | Promise<any>;
|
|
74
|
+
/**
|
|
75
|
+
* 处理当前弹框流中存在的弹框
|
|
76
|
+
* @param option.getModal 根据modalId获取弹框实例
|
|
77
|
+
* @returns
|
|
78
|
+
*/
|
|
79
|
+
handleModal?: (option: {
|
|
80
|
+
getModal: (modalId: string) => CreateModalFuncReturn;
|
|
81
|
+
}) => any | Promise<any>;
|
|
74
82
|
}) => any | Promise<any>;
|
|
75
83
|
export type ModalStreamType = {
|
|
76
84
|
createModal: CreateModalStream<'createModal'>;
|
|
@@ -1,99 +1,102 @@
|
|
|
1
1
|
import { isValid as L } from "@aplus-frontend/utils";
|
|
2
2
|
import { createModal as P } from "./createModal.mjs";
|
|
3
3
|
import { Modal as V } from "@aplus-frontend/antdv";
|
|
4
|
-
import { ModalMessage as
|
|
5
|
-
const
|
|
6
|
-
var
|
|
7
|
-
const
|
|
8
|
-
let
|
|
9
|
-
const
|
|
10
|
-
modalId:
|
|
11
|
-
params:
|
|
12
|
-
handleCurrentModal:
|
|
4
|
+
import { ModalMessage as y } from "../enums/modalMessage.mjs";
|
|
5
|
+
const H = (d, F) => {
|
|
6
|
+
var A;
|
|
7
|
+
const g = F ?? (Array.isArray(d) ? (A = d[0]) == null ? void 0 : A.modalId : void 0), o = /* @__PURE__ */ new Map();
|
|
8
|
+
let k, I, m = 1e3;
|
|
9
|
+
const T = async ({
|
|
10
|
+
modalId: i,
|
|
11
|
+
params: E,
|
|
12
|
+
handleCurrentModal: n,
|
|
13
|
+
handleModal: w
|
|
13
14
|
}) => {
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
let
|
|
17
|
-
if (
|
|
18
|
-
const
|
|
19
|
-
...
|
|
15
|
+
k = E;
|
|
16
|
+
const s = d.find((t) => t.modalId === i);
|
|
17
|
+
let a = !1;
|
|
18
|
+
if (I) {
|
|
19
|
+
const t = o.get(I), c = {
|
|
20
|
+
...t,
|
|
20
21
|
destroy: () => {
|
|
21
|
-
var
|
|
22
|
-
(
|
|
22
|
+
var N;
|
|
23
|
+
(N = t == null ? void 0 : t.destroy) == null || N.call(t), o.delete(I);
|
|
23
24
|
},
|
|
24
25
|
open: () => {
|
|
25
|
-
|
|
26
|
+
a = !0;
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
|
-
await (
|
|
29
|
+
await (n == null ? void 0 : n(c)), await (w == null ? void 0 : w({
|
|
30
|
+
getModal: o.get.bind(o)
|
|
31
|
+
}));
|
|
29
32
|
}
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
}),
|
|
33
|
-
},
|
|
34
|
-
var
|
|
35
|
-
for (const [
|
|
36
|
-
(
|
|
37
|
-
},
|
|
38
|
-
var
|
|
33
|
+
return s && setTimeout(() => {
|
|
34
|
+
D(s);
|
|
35
|
+
}), a;
|
|
36
|
+
}, C = () => {
|
|
37
|
+
var i;
|
|
38
|
+
for (const [E, n] of o)
|
|
39
|
+
(i = n == null ? void 0 : n.destroy) == null || i.call(n);
|
|
40
|
+
}, D = async (i) => {
|
|
41
|
+
var N, z, S, b;
|
|
39
42
|
const {
|
|
40
|
-
modalId:
|
|
41
|
-
modalType:
|
|
43
|
+
modalId: E,
|
|
44
|
+
modalType: n = "createModal",
|
|
42
45
|
props: w
|
|
43
|
-
} =
|
|
44
|
-
|
|
45
|
-
const s =
|
|
46
|
-
|
|
47
|
-
let
|
|
48
|
-
if (
|
|
49
|
-
const e =
|
|
50
|
-
|
|
46
|
+
} = i;
|
|
47
|
+
I = E;
|
|
48
|
+
const s = o.get(E), a = await (w == null ? void 0 : w(k, async (e) => (c = !0, await T(e))));
|
|
49
|
+
m = Math.max((a == null ? void 0 : a.zIndex) ?? 0, m), m += 1;
|
|
50
|
+
let t, c = !1;
|
|
51
|
+
if (n === "createModal") {
|
|
52
|
+
const e = a, u = async (r) => (c = !0, await T(r));
|
|
53
|
+
t = {
|
|
51
54
|
...e,
|
|
52
55
|
destroyOnClose: !1,
|
|
53
|
-
zIndex:
|
|
56
|
+
zIndex: m,
|
|
54
57
|
onOk: async (r) => {
|
|
55
|
-
var
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
58
|
-
throw new Error(
|
|
58
|
+
var _;
|
|
59
|
+
const f = await ((_ = e == null ? void 0 : e.onOk) == null ? void 0 : _.call(e, r, u));
|
|
60
|
+
if (c || C(), f)
|
|
61
|
+
throw new Error(y.NOT_NEED_CLOSE);
|
|
59
62
|
},
|
|
60
63
|
onCancel: async (r) => {
|
|
61
|
-
var
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
64
|
-
throw new Error(
|
|
64
|
+
var _;
|
|
65
|
+
const f = await ((_ = e == null ? void 0 : e.onCancel) == null ? void 0 : _.call(e, r, u));
|
|
66
|
+
if (c || C(), f)
|
|
67
|
+
throw new Error(y.NOT_NEED_CLOSE);
|
|
65
68
|
}
|
|
66
69
|
};
|
|
67
70
|
} else {
|
|
68
|
-
const e =
|
|
69
|
-
|
|
71
|
+
const e = a, u = async (r) => (c = !0, await T(r));
|
|
72
|
+
t = {
|
|
70
73
|
...e,
|
|
71
|
-
zIndex:
|
|
74
|
+
zIndex: m,
|
|
72
75
|
onOk: async () => {
|
|
73
|
-
var
|
|
74
|
-
const r = await ((
|
|
75
|
-
if (
|
|
76
|
-
throw new Error(
|
|
76
|
+
var f;
|
|
77
|
+
const r = await ((f = e == null ? void 0 : e.onOk) == null ? void 0 : f.call(e, u));
|
|
78
|
+
if (c || C(), r)
|
|
79
|
+
throw new Error(y.NOT_NEED_CLOSE);
|
|
77
80
|
},
|
|
78
81
|
onCancel: async () => {
|
|
79
|
-
var
|
|
80
|
-
const r = await ((
|
|
81
|
-
if (
|
|
82
|
-
throw new Error(
|
|
82
|
+
var f;
|
|
83
|
+
const r = await ((f = e == null ? void 0 : e.onCancel) == null ? void 0 : f.call(e, u));
|
|
84
|
+
if (c || C(), r)
|
|
85
|
+
throw new Error(y.NOT_NEED_CLOSE);
|
|
83
86
|
}
|
|
84
87
|
};
|
|
85
88
|
}
|
|
86
89
|
if (s) {
|
|
87
|
-
s == null || s.update(
|
|
90
|
+
s == null || s.update(t), (N = s == null ? void 0 : s.open) == null || N.call(s);
|
|
88
91
|
return;
|
|
89
|
-
} else if (
|
|
90
|
-
const e = P(
|
|
91
|
-
(
|
|
92
|
+
} else if (n === "createModal") {
|
|
93
|
+
const e = P(t);
|
|
94
|
+
(z = e == null ? void 0 : e.open) == null || z.call(e), o.set(E, e);
|
|
92
95
|
} else
|
|
93
|
-
(
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
+
(b = (S = V) == null ? void 0 : S[n]) == null || b.call(S, t);
|
|
97
|
+
}, O = d.find((i) => L(g) && i.modalId === g);
|
|
98
|
+
O !== void 0 && D(O);
|
|
96
99
|
};
|
|
97
100
|
export {
|
|
98
|
-
|
|
101
|
+
H as createModalStream
|
|
99
102
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as je, useSlots as We, ref as v, computed as s, unref as l, toRef as
|
|
1
|
+
import { defineComponent as je, useSlots as We, ref as v, computed as s, unref as l, toRef as He, createVNode as y, Fragment as le, watch as k, createElementBlock as B, openBlock as g, normalizeStyle as K, normalizeClass as b, createCommentVNode as ne, createElementVNode as L, mergeProps as I, createSlots as se, withCtx as R, renderList as de, createBlock as ue, resolveDynamicComponent as _e, renderSlot as C, normalizeProps as Ue, guardReactiveProps as qe } from "vue";
|
|
2
2
|
import { Divider as Me, Table as Ge } from "@aplus-frontend/antdv";
|
|
3
3
|
import { useToken as Je } from "@aplus-frontend/antdv/es/theme/internal";
|
|
4
4
|
import { ApForm as Qe } from "../ap-form/index.mjs";
|
|
5
|
-
import { noRenderAsFormItemValueList as
|
|
5
|
+
import { noRenderAsFormItemValueList as ie } from "./constants.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
7
|
import { useTablePaging as Xe } from "./hooks/use-table-paging-ng.mjs";
|
|
8
|
-
import { isUndefined as S, omit as
|
|
9
|
-
import { getColumnOrder as
|
|
8
|
+
import { isUndefined as S, omit as ce, isBoolean as Ye } from "lodash-unified";
|
|
9
|
+
import { getColumnOrder as fe, updateFormProps as Ze, getFieldProps as er, getSearchFormItemRenderNode as rr, recursionApColumns as pe, getTableTitle as or, getTableRenderType as tr, getTableRenderProps as ar, getTableCellRenderNode as lr, apColumnToColumn as nr, falseToUndefined as sr, objectToString as dr } from "./utils.mjs";
|
|
10
10
|
import ur from "./hooks/use-table-content-height.mjs";
|
|
11
11
|
import ir from "./hooks/use-table-row-selection.mjs";
|
|
12
|
-
import { getScrollbarSize as cr, isDef as
|
|
12
|
+
import { getScrollbarSize as cr, isDef as me } from "../utils/index.mjs";
|
|
13
13
|
import "./components/setting/modal/index.vue.mjs";
|
|
14
14
|
import "./components/paragraph-ellipsis/index.vue.mjs";
|
|
15
15
|
import { useProvideApTable as fr } from "./context.mjs";
|
|
@@ -21,7 +21,7 @@ import { useGlobalConfig as gr } from "../config-provider/hooks/use-global-confi
|
|
|
21
21
|
import br from "./components/paragraph-ellipsis/index.vue2.mjs";
|
|
22
22
|
import Sr from "./components/setting/modal/index.vue2.mjs";
|
|
23
23
|
import hr from "../scroll-bar/index.vue.mjs";
|
|
24
|
-
const
|
|
24
|
+
const Hr = /* @__PURE__ */ je({
|
|
25
25
|
name: "ApTable",
|
|
26
26
|
__name: "ap-table",
|
|
27
27
|
props: {
|
|
@@ -145,27 +145,27 @@ const _r = /* @__PURE__ */ je({
|
|
|
145
145
|
default: void 0
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
|
-
setup(
|
|
149
|
-
expose:
|
|
148
|
+
setup(ye, {
|
|
149
|
+
expose: ge
|
|
150
150
|
}) {
|
|
151
|
-
const r =
|
|
151
|
+
const r = ye;
|
|
152
152
|
let O = 0;
|
|
153
|
-
const c = We(), [,
|
|
153
|
+
const c = We(), [, be] = Je(), {
|
|
154
154
|
e: z,
|
|
155
155
|
b: f,
|
|
156
156
|
be: A,
|
|
157
|
-
m:
|
|
158
|
-
cssVar:
|
|
157
|
+
m: Se,
|
|
158
|
+
cssVar: he
|
|
159
159
|
} = yr("ap-table"), $ = gr("valueTypeMap"), {
|
|
160
|
-
height:
|
|
161
|
-
contentRef:
|
|
160
|
+
height: we,
|
|
161
|
+
contentRef: ve
|
|
162
162
|
} = ur(), D = v(), j = v(), {
|
|
163
163
|
isStickyMode: W,
|
|
164
164
|
scrollBarRef: i
|
|
165
|
-
} = pr(D), N = v(r.size), u = v([]),
|
|
165
|
+
} = pr(D), N = v(r.size), u = v([]), H = v([]), _ = cr();
|
|
166
166
|
fr({
|
|
167
167
|
columns: s(() => u.value),
|
|
168
|
-
columnsBackup: s(() =>
|
|
168
|
+
columnsBackup: s(() => H.value),
|
|
169
169
|
size: s(() => N.value),
|
|
170
170
|
updateColumns(e) {
|
|
171
171
|
u.value = e;
|
|
@@ -174,19 +174,20 @@ const _r = /* @__PURE__ */ je({
|
|
|
174
174
|
N.value = e;
|
|
175
175
|
},
|
|
176
176
|
dataSource: s(() => l(h).records),
|
|
177
|
-
getSearchFormValues:
|
|
178
|
-
setSearchFormValues:
|
|
177
|
+
getSearchFormValues: X,
|
|
178
|
+
setSearchFormValues: Q,
|
|
179
179
|
submit: () => P(),
|
|
180
180
|
reset: () => V(),
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
181
|
+
refresh: () => M(),
|
|
182
|
+
getSearchFormSorterItems: Y,
|
|
183
|
+
setSearchFormSorterItems: Z,
|
|
184
|
+
resetSearchFormSorterItems: ee
|
|
184
185
|
});
|
|
185
186
|
const U = s(() => {
|
|
186
187
|
var e, o, t;
|
|
187
|
-
return O++, ((t = (o = (e = r.columns) == null ? void 0 : e.filter((a) => !a.hideInSearch && a.dataIndex && (a.valueType || a.customRenderFormItem) && !
|
|
188
|
-
let n =
|
|
189
|
-
return
|
|
188
|
+
return O++, ((t = (o = (e = r.columns) == null ? void 0 : e.filter((a) => !a.hideInSearch && a.dataIndex && (a.valueType || a.customRenderFormItem) && !ie.includes(a.valueType))) == null ? void 0 : o.sort((a, d) => {
|
|
189
|
+
let n = fe(a.order);
|
|
190
|
+
return fe(d.order) - n;
|
|
190
191
|
})) == null ? void 0 : t.map((a) => {
|
|
191
192
|
const d = Ze(a, er(a.fieldProps, {})), n = {
|
|
192
193
|
...a,
|
|
@@ -202,36 +203,36 @@ const _r = /* @__PURE__ */ je({
|
|
|
202
203
|
};
|
|
203
204
|
return n.renderNode = rr(n, l($)), n;
|
|
204
205
|
})) || [];
|
|
205
|
-
}),
|
|
206
|
+
}), Re = s(() => pe(l(u), (e) => {
|
|
206
207
|
if (e.sorter === !0)
|
|
207
208
|
return e.key || (e == null ? void 0 : e.dataIndex);
|
|
208
|
-
}).filter(Boolean)),
|
|
209
|
+
}).filter(Boolean)), Ce = s(() => pe(l(u), (e) => {
|
|
209
210
|
if (e.filters && !e.onFilter)
|
|
210
211
|
return e.key || (e == null ? void 0 : e.dataIndex);
|
|
211
|
-
}).filter(Boolean)),
|
|
212
|
+
}).filter(Boolean)), Te = s(() => S(r.dataSource) ? h.records : r.dataSource), Fe = s(() => {
|
|
212
213
|
var o;
|
|
213
|
-
return
|
|
214
|
+
return me(r.manual) ? r.manual : mr(((o = c.searchFormExtra) == null ? void 0 : o.call(c)) || []).some((t) => {
|
|
214
215
|
var a;
|
|
215
216
|
return ((a = t.type) == null ? void 0 : a.name) === "ApView";
|
|
216
217
|
});
|
|
217
218
|
}), {
|
|
218
|
-
rowSelection:
|
|
219
|
-
selectedRows:
|
|
220
|
-
...
|
|
219
|
+
rowSelection: T,
|
|
220
|
+
selectedRows: F,
|
|
221
|
+
...x
|
|
221
222
|
} = ir({
|
|
222
223
|
fixed: !0,
|
|
223
224
|
...r.rowSelection === !0 ? {} : r.rowSelection,
|
|
224
225
|
rowKey: r.rowKey,
|
|
225
|
-
dataSource:
|
|
226
|
+
dataSource: Te
|
|
226
227
|
}), {
|
|
227
228
|
formRef: p,
|
|
228
229
|
submit: P,
|
|
229
230
|
reset: V,
|
|
230
231
|
tableProps: q,
|
|
231
|
-
refresh:
|
|
232
|
+
refresh: M,
|
|
232
233
|
data: h,
|
|
233
234
|
setDataSource: xe,
|
|
234
|
-
getColumnSFConfig:
|
|
235
|
+
getColumnSFConfig: G,
|
|
235
236
|
sortedInfo: ke,
|
|
236
237
|
filteredInfo: Be,
|
|
237
238
|
setPaging: Ie,
|
|
@@ -239,7 +240,7 @@ const _r = /* @__PURE__ */ je({
|
|
|
239
240
|
} = Xe({
|
|
240
241
|
async request(e) {
|
|
241
242
|
var t, a;
|
|
242
|
-
if (!
|
|
243
|
+
if (!T.value.preserveSelectedRowKeys && S(r.dataSource) && x.clearAll(), !S(r.dataSource))
|
|
243
244
|
return {
|
|
244
245
|
data: r.dataSource || [],
|
|
245
246
|
total: r.dataSource.length || 0
|
|
@@ -250,11 +251,11 @@ const _r = /* @__PURE__ */ je({
|
|
|
250
251
|
total: (o == null ? void 0 : o.total) || 0
|
|
251
252
|
};
|
|
252
253
|
},
|
|
253
|
-
filterFields:
|
|
254
|
-
sortFields:
|
|
255
|
-
params:
|
|
254
|
+
filterFields: Ce,
|
|
255
|
+
sortFields: Re,
|
|
256
|
+
params: He(r, "params"),
|
|
256
257
|
defaultData: r.defaultData,
|
|
257
|
-
manual: l(
|
|
258
|
+
manual: l(Fe),
|
|
258
259
|
formatParams: r.beforeSearchSubmit,
|
|
259
260
|
pagination: r.pagination
|
|
260
261
|
}), Ne = () => {
|
|
@@ -262,37 +263,37 @@ const _r = /* @__PURE__ */ je({
|
|
|
262
263
|
let e = ((t = r.columns) == null ? void 0 : t.filter((a) => !a.hideInTable)) || [];
|
|
263
264
|
function o(a, d) {
|
|
264
265
|
return a.map((n) => ({
|
|
265
|
-
resizable:
|
|
266
|
-
...
|
|
266
|
+
resizable: me(n.resizable) ? n.resizable : r.columnResizable,
|
|
267
|
+
...ce(nr(n), ["ellipsis"]),
|
|
267
268
|
// tips: 此函数内部依赖查询&筛选的相应式值
|
|
268
|
-
...
|
|
269
|
+
...G(n),
|
|
269
270
|
fixed: d ? d.fixed : n.fixed,
|
|
270
|
-
title: or(n, A("table-header", "title"), c.headerCell, l(
|
|
271
|
+
title: or(n, A("table-header", "title"), c.headerCell, l(be).colorTextTertiary),
|
|
271
272
|
customRender({
|
|
272
273
|
value: m,
|
|
273
274
|
...w
|
|
274
275
|
}) {
|
|
275
|
-
var
|
|
276
|
-
const
|
|
276
|
+
var te, ae;
|
|
277
|
+
const re = tr(n), Ae = ar({
|
|
277
278
|
...n,
|
|
278
|
-
valueType:
|
|
279
|
+
valueType: re
|
|
279
280
|
}, {
|
|
280
281
|
value: m,
|
|
281
282
|
...w
|
|
282
|
-
}), $e = lr(
|
|
283
|
+
}), $e = lr(re, Ae, w.record, l($)), oe = ((te = n.renderText) == null ? void 0 : te.call(n, {
|
|
283
284
|
value: m,
|
|
284
285
|
...w
|
|
285
|
-
})) || m, De = n.renderText ? y(
|
|
286
|
+
})) || m, De = n.renderText ? y(le, null, [(ae = n.renderText) == null ? void 0 : ae.call(n, {
|
|
286
287
|
value: m,
|
|
287
288
|
...w
|
|
288
289
|
})]) : $e;
|
|
289
|
-
let E = Le(n,
|
|
290
|
+
let E = Le(n, oe, De);
|
|
290
291
|
return n.customRender && (E = n.customRender({
|
|
291
292
|
value: m,
|
|
292
293
|
...w,
|
|
293
294
|
column: n,
|
|
294
295
|
originalNode: E,
|
|
295
|
-
originalText:
|
|
296
|
+
originalText: oe
|
|
296
297
|
})), E;
|
|
297
298
|
},
|
|
298
299
|
children: o(n.children || [], d || n)
|
|
@@ -303,17 +304,17 @@ const _r = /* @__PURE__ */ je({
|
|
|
303
304
|
function e(o) {
|
|
304
305
|
var t;
|
|
305
306
|
for (const a of o)
|
|
306
|
-
(t = a.children) != null && t.length ? e(a.children) :
|
|
307
|
+
(t = a.children) != null && t.length ? e(a.children) : G(a, !0);
|
|
307
308
|
}
|
|
308
309
|
e(u.value);
|
|
309
310
|
};
|
|
310
|
-
|
|
311
|
+
k(() => [r.columns, r.columnResizable], () => {
|
|
311
312
|
const e = Ne();
|
|
312
|
-
u.value = e,
|
|
313
|
+
u.value = e, H.value = e;
|
|
313
314
|
}, {
|
|
314
315
|
deep: !0,
|
|
315
316
|
immediate: !0
|
|
316
|
-
}),
|
|
317
|
+
}), k(() => [ke.value, Be.value], () => {
|
|
317
318
|
Pe();
|
|
318
319
|
}, {
|
|
319
320
|
deep: !0
|
|
@@ -322,7 +323,7 @@ const _r = /* @__PURE__ */ je({
|
|
|
322
323
|
var o, t;
|
|
323
324
|
if (r.adaptive && (h.total > 0 || ((o = r.dataSource) == null ? void 0 : o.length)))
|
|
324
325
|
return {
|
|
325
|
-
y: l(
|
|
326
|
+
y: l(we),
|
|
326
327
|
x: ((t = r.scroll) == null ? void 0 : t.x) || "100%"
|
|
327
328
|
};
|
|
328
329
|
if (r.scroll)
|
|
@@ -333,9 +334,9 @@ const _r = /* @__PURE__ */ je({
|
|
|
333
334
|
return r.tableLayout;
|
|
334
335
|
if ((e = r.columns) != null && e.some((o) => o.ellipsis))
|
|
335
336
|
return "fixed";
|
|
336
|
-
}),
|
|
337
|
+
}), J = s(() => {
|
|
337
338
|
var t;
|
|
338
|
-
const e = l(q), o = l(
|
|
339
|
+
const e = l(q), o = l(T);
|
|
339
340
|
return {
|
|
340
341
|
...r,
|
|
341
342
|
...e,
|
|
@@ -350,10 +351,10 @@ const _r = /* @__PURE__ */ je({
|
|
|
350
351
|
};
|
|
351
352
|
}), Ke = s(() => {
|
|
352
353
|
var e;
|
|
353
|
-
return [f(), r.card ? null : f("wrapper"), r.adaptive ? f("adaptive") : null, W.value && ((e = i.value) != null && e.visible) ?
|
|
354
|
+
return [f(), r.card ? null : f("wrapper"), r.adaptive ? f("adaptive") : null, W.value && ((e = i.value) != null && e.visible) ? Se(`sticky-${_ === 0 ? "absolute" : "relative"}`) : null].filter(Boolean);
|
|
354
355
|
});
|
|
355
356
|
function Le(e, o, t) {
|
|
356
|
-
if (
|
|
357
|
+
if (ie.includes(e.valueType))
|
|
357
358
|
return t;
|
|
358
359
|
const a = dr(o);
|
|
359
360
|
return e.copyable || e.ellipsis ? y(br, {
|
|
@@ -369,51 +370,51 @@ const _r = /* @__PURE__ */ je({
|
|
|
369
370
|
content: t
|
|
370
371
|
}, null) : t;
|
|
371
372
|
}
|
|
372
|
-
|
|
373
|
+
k(() => l(h).loading, (e) => {
|
|
373
374
|
var o;
|
|
374
375
|
(o = r.onLoadingChange) == null || o.call(r, e);
|
|
375
|
-
}),
|
|
376
|
+
}), k(() => r.dataSource, (e) => {
|
|
376
377
|
xe(e);
|
|
377
378
|
}, {
|
|
378
379
|
immediate: !0
|
|
379
380
|
});
|
|
380
|
-
function
|
|
381
|
+
function Q(e) {
|
|
381
382
|
var o, t, a;
|
|
382
383
|
(a = (t = (o = p.value) == null ? void 0 : o.apForm) == null ? void 0 : t.setFieldsValue) == null || a.call(t, e);
|
|
383
384
|
}
|
|
384
|
-
function
|
|
385
|
+
function X(e = !1) {
|
|
385
386
|
var t, a, d;
|
|
386
387
|
const o = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
387
388
|
return (d = (a = (t = p.value) == null ? void 0 : t.apForm) == null ? void 0 : a[o]) == null ? void 0 : d.call(a, !0);
|
|
388
389
|
}
|
|
389
|
-
function
|
|
390
|
+
function Y() {
|
|
390
391
|
var e;
|
|
391
392
|
return ((e = p.value) == null ? void 0 : e.getSorterItems()) || [];
|
|
392
393
|
}
|
|
393
|
-
function
|
|
394
|
+
function Z(e) {
|
|
394
395
|
var o;
|
|
395
396
|
(o = p.value) == null || o.setSorterItems(e);
|
|
396
397
|
}
|
|
397
|
-
function
|
|
398
|
+
function ee() {
|
|
398
399
|
var e;
|
|
399
400
|
(e = p.value) == null || e.resetSorterItems();
|
|
400
401
|
}
|
|
401
402
|
function Oe() {
|
|
402
403
|
return l(u);
|
|
403
404
|
}
|
|
404
|
-
return
|
|
405
|
+
return ge({
|
|
405
406
|
submit: () => P(),
|
|
406
407
|
reset: () => V(),
|
|
407
|
-
refresh: () =>
|
|
408
|
-
setSearchFormValues:
|
|
409
|
-
getSearchFormValues:
|
|
408
|
+
refresh: () => M(),
|
|
409
|
+
setSearchFormValues: Q,
|
|
410
|
+
getSearchFormValues: X,
|
|
410
411
|
setPaging: Ie,
|
|
411
412
|
getPaging: ze,
|
|
412
413
|
getShownColumns: Oe,
|
|
413
414
|
dataSource: s(() => l(h).records),
|
|
414
415
|
rowSelection: {
|
|
415
|
-
selectedRows: s(() => l(
|
|
416
|
-
...
|
|
416
|
+
selectedRows: s(() => l(F)),
|
|
417
|
+
...x
|
|
417
418
|
},
|
|
418
419
|
scrollBar: {
|
|
419
420
|
x: {
|
|
@@ -428,86 +429,81 @@ const _r = /* @__PURE__ */ je({
|
|
|
428
429
|
},
|
|
429
430
|
y: void 0
|
|
430
431
|
},
|
|
431
|
-
getSearchFormSorterItems:
|
|
432
|
-
setSearchFormSorterItems:
|
|
433
|
-
resetSearchFormSorterItems:
|
|
434
|
-
}), (e, o) => (g(),
|
|
432
|
+
getSearchFormSorterItems: Y,
|
|
433
|
+
setSearchFormSorterItems: Z,
|
|
434
|
+
resetSearchFormSorterItems: ee
|
|
435
|
+
}), (e, o) => (g(), B("div", {
|
|
435
436
|
ref_key: "tableWrapperRef",
|
|
436
437
|
ref: D,
|
|
437
438
|
class: b(Ke.value),
|
|
438
|
-
style: K(l(
|
|
439
|
-
"scroll-bar-width": `${l(
|
|
439
|
+
style: K(l(he)({
|
|
440
|
+
"scroll-bar-width": `${l(_)}px`
|
|
440
441
|
}))
|
|
441
|
-
}, [l(S)(e.dataSource) && e.searchForm !== !1 && U.value.length > 0 ? (g(),
|
|
442
|
+
}, [l(S)(e.dataSource) && e.searchForm !== !1 && U.value.length > 0 ? (g(), B("div", {
|
|
442
443
|
key: 0,
|
|
443
444
|
class: b(e.card ? l(z)("search-wrapper") : null),
|
|
444
445
|
style: K(e.searchFormWrapperStyle)
|
|
445
|
-
}, [y(l(Qe).SearchForm,
|
|
446
|
+
}, [y(l(Qe).SearchForm, I(e.searchForm || {}, {
|
|
446
447
|
ref_key: "formRef",
|
|
447
448
|
ref: p,
|
|
448
449
|
"custom-reset": "",
|
|
449
450
|
"submit-loading": l(q).loading,
|
|
450
451
|
onSubmit: l(P),
|
|
451
452
|
onReset: l(V)
|
|
452
|
-
}),
|
|
453
|
-
default:
|
|
454
|
-
key: t.dataIndex
|
|
455
|
-
|
|
456
|
-
ref_for: !0
|
|
457
|
-
}, t.fieldProps || {}, {
|
|
458
|
-
span: t.span,
|
|
459
|
-
"custom-render": t.renderNode.render
|
|
460
|
-
}), null, 16, ["item", "span", "custom-render"]))), 128))]),
|
|
453
|
+
}), se({
|
|
454
|
+
default: R(() => [(g(!0), B(le, null, de(U.value, (t) => (g(), ue(_e(t.renderNode), {
|
|
455
|
+
key: t.dataIndex
|
|
456
|
+
}))), 128))]),
|
|
461
457
|
_: 2
|
|
462
458
|
}, [c.searchFormExtra ? {
|
|
463
459
|
name: "extra",
|
|
464
|
-
fn:
|
|
460
|
+
fn: R(() => [C(e.$slots, "searchFormExtra")]),
|
|
465
461
|
key: "0"
|
|
466
|
-
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) :
|
|
462
|
+
} : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : ne("", !0), L("div", {
|
|
467
463
|
ref_key: "contentRef",
|
|
468
|
-
ref:
|
|
464
|
+
ref: ve,
|
|
469
465
|
class: b([l(z)("table-wrapper"), e.card ? l(z)("table-wrapper-card") : null]),
|
|
470
466
|
style: K(e.tableWrapperStyle)
|
|
471
467
|
}, [L("div", {
|
|
472
468
|
class: b(l(f)("header-wrapper"))
|
|
473
|
-
}, [e.settings ? (g(),
|
|
469
|
+
}, [e.settings ? (g(), B("div", {
|
|
474
470
|
key: 0,
|
|
475
471
|
class: b(l(f)("header"))
|
|
476
472
|
}, [L("div", {
|
|
477
473
|
class: b(l(A)("header", "title"))
|
|
478
|
-
}, [
|
|
479
|
-
selectedRows: l(
|
|
480
|
-
selectedRowKeys: l(
|
|
474
|
+
}, [C(e.$slots, "title", I({
|
|
475
|
+
selectedRows: l(F),
|
|
476
|
+
selectedRowKeys: l(T).selectedRowKeys,
|
|
481
477
|
shownColumns: u.value
|
|
482
|
-
},
|
|
478
|
+
}, x))], 2), c.title ? (g(), ue(l(Me), {
|
|
483
479
|
key: 0,
|
|
484
480
|
type: "vertical"
|
|
485
|
-
})) :
|
|
481
|
+
})) : ne("", !0), y(Sr, {
|
|
486
482
|
config: e.settings === !0 ? {} : e.settings
|
|
487
|
-
}, null, 8, ["config"])], 2)) :
|
|
483
|
+
}, null, 8, ["config"])], 2)) : C(e.$slots, "title", I({
|
|
488
484
|
key: 1,
|
|
489
|
-
selectedRows: l(
|
|
490
|
-
selectedRowKeys: l(
|
|
485
|
+
selectedRows: l(F),
|
|
486
|
+
selectedRowKeys: l(T).selectedRowKeys,
|
|
491
487
|
shownColumns: u.value
|
|
492
|
-
},
|
|
488
|
+
}, x))], 2), y(l(Ge), I({
|
|
493
489
|
ref_key: "antdTableRef",
|
|
494
490
|
ref: j,
|
|
495
491
|
class: l(f)("table")
|
|
496
|
-
},
|
|
492
|
+
}, J.value, {
|
|
497
493
|
size: N.value,
|
|
498
494
|
"table-layout": Ee.value,
|
|
499
495
|
columns: u.value,
|
|
500
496
|
onResizeColumn: o[0] || (o[0] = (t, a) => a.width = t)
|
|
501
|
-
}),
|
|
502
|
-
summary:
|
|
497
|
+
}), se({
|
|
498
|
+
summary: R(() => [C(e.$slots, "summary", {
|
|
503
499
|
columns: u.value,
|
|
504
|
-
records:
|
|
505
|
-
selectedRows: l(
|
|
500
|
+
records: J.value.dataSource,
|
|
501
|
+
selectedRows: l(F)
|
|
506
502
|
})]),
|
|
507
503
|
_: 2
|
|
508
504
|
}, [l(W) ? {
|
|
509
505
|
name: "bottomPaginationTop",
|
|
510
|
-
fn:
|
|
506
|
+
fn: R(() => {
|
|
511
507
|
var t, a;
|
|
512
508
|
return [y(l(hr), {
|
|
513
509
|
ref_key: "scrollBarRef",
|
|
@@ -519,12 +515,12 @@ const _r = /* @__PURE__ */ je({
|
|
|
519
515
|
}, null, 8, ["scroll-container"])];
|
|
520
516
|
}),
|
|
521
517
|
key: "0"
|
|
522
|
-
} : void 0,
|
|
518
|
+
} : void 0, de(l(ce)(c, ["title", "searchFormExtra", "headerCell", "summary"]), (t, a) => ({
|
|
523
519
|
name: a,
|
|
524
|
-
fn:
|
|
520
|
+
fn: R((d) => [C(e.$slots, a, Ue(qe(d || {})))])
|
|
525
521
|
}))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 6));
|
|
526
522
|
}
|
|
527
523
|
});
|
|
528
524
|
export {
|
|
529
|
-
|
|
525
|
+
Hr as default
|
|
530
526
|
};
|