@aplus-frontend/ui 0.1.39 → 0.1.40
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/index.mjs +136 -134
- package/es/src/ap-form/index.d.ts +3 -1
- package/es/src/ap-form/index.mjs +8 -4
- package/es/src/ap-form/interface.d.ts +1 -0
- package/es/src/ap-form/modal-form/drawer.vue.d.ts +830 -0
- package/es/src/ap-form/modal-form/drawer.vue.mjs +288 -0
- package/es/src/ap-form/modal-form/drawer.vue2.mjs +4 -0
- package/es/src/ap-table/ap-table.vue.mjs +40 -40
- package/es/src/ap-table/hooks/use-table-paging.d.ts +1 -1
- package/es/src/ap-table/hooks/use-table-paging.mjs +74 -74
- package/es/src/index.mjs +107 -105
- package/lib/index.js +1 -1
- package/lib/src/ap-form/index.d.ts +3 -1
- package/lib/src/ap-form/index.js +1 -1
- package/lib/src/ap-form/interface.d.ts +1 -0
- package/lib/src/ap-form/modal-form/drawer.vue.d.ts +830 -0
- package/lib/src/ap-form/modal-form/drawer.vue.js +1 -0
- package/lib/src/ap-form/modal-form/drawer.vue2.js +1 -0
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +1 -1
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { isVNode as H, defineComponent as J, useSlots as K, ref as h, computed as O, watch as R, unref as s, cloneVNode as Q, createVNode as d, mergeProps as v, openBlock as b, createElementBlock as P, Fragment as Y, withCtx as g, renderSlot as M, createTextVNode as Z, toDisplayString as ee, createBlock as N, resolveDynamicComponent as S, normalizeClass as te, withModifiers as ie, createCommentVNode as _ } from "vue";
|
|
2
|
+
import { Button as V, Flex as ne, Space as oe, Drawer as le } from "ant-design-vue";
|
|
3
|
+
import "../ap-form.vue.mjs";
|
|
4
|
+
import "../../hooks/index.mjs";
|
|
5
|
+
import { getSingleVNode as ae } from "../../utils/slot.mjs";
|
|
6
|
+
import "../../config-provider/index.mjs";
|
|
7
|
+
import { isBoolean as se, isUndefined as re, omit as ue } from "lodash-unified";
|
|
8
|
+
import "../style/drawer-form.css";
|
|
9
|
+
import { convertReactiveToRaw as de } from "../../utils/index.mjs";
|
|
10
|
+
import { useControllableValue as ce } from "../../hooks/useControllableValue.mjs";
|
|
11
|
+
import { useLocale as me } from "../../config-provider/hooks/use-locale.mjs";
|
|
12
|
+
import { useNamespace as fe } from "../../config-provider/hooks/use-namespace.mjs";
|
|
13
|
+
import pe from "../ap-form.vue2.mjs";
|
|
14
|
+
function L(c) {
|
|
15
|
+
return typeof c == "function" || Object.prototype.toString.call(c) === "[object Object]" && !H(c);
|
|
16
|
+
}
|
|
17
|
+
const je = /* @__PURE__ */ J({
|
|
18
|
+
__name: "drawer",
|
|
19
|
+
props: {
|
|
20
|
+
layout: {
|
|
21
|
+
default: "horizontal"
|
|
22
|
+
},
|
|
23
|
+
labelCol: {},
|
|
24
|
+
wrapperCol: {},
|
|
25
|
+
colon: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !0
|
|
28
|
+
},
|
|
29
|
+
labelAlign: {
|
|
30
|
+
default: "right"
|
|
31
|
+
},
|
|
32
|
+
labelWrap: {
|
|
33
|
+
type: Boolean
|
|
34
|
+
},
|
|
35
|
+
prefixCls: {},
|
|
36
|
+
requiredMark: {},
|
|
37
|
+
hideRequiredMark: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !1
|
|
40
|
+
},
|
|
41
|
+
rules: {},
|
|
42
|
+
validateMessages: {},
|
|
43
|
+
validateOnRuleChange: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !0
|
|
46
|
+
},
|
|
47
|
+
scrollToFirstError: {},
|
|
48
|
+
onSubmit: {},
|
|
49
|
+
name: {},
|
|
50
|
+
validateTrigger: {
|
|
51
|
+
default: "change"
|
|
52
|
+
},
|
|
53
|
+
size: {},
|
|
54
|
+
disabled: {
|
|
55
|
+
type: Boolean
|
|
56
|
+
},
|
|
57
|
+
onValuesChange: {},
|
|
58
|
+
onFieldsChange: {},
|
|
59
|
+
onFinishFailed: {},
|
|
60
|
+
onValidate: {},
|
|
61
|
+
initialValues: {},
|
|
62
|
+
open: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: void 0
|
|
65
|
+
},
|
|
66
|
+
"onUpdate:open": {},
|
|
67
|
+
drawerProps: {
|
|
68
|
+
default: () => ({})
|
|
69
|
+
},
|
|
70
|
+
title: {},
|
|
71
|
+
width: {
|
|
72
|
+
default: 378
|
|
73
|
+
},
|
|
74
|
+
onFinish: {},
|
|
75
|
+
submitter: {
|
|
76
|
+
type: [Boolean, Object],
|
|
77
|
+
default: () => ({
|
|
78
|
+
resetButtonProps: !1
|
|
79
|
+
})
|
|
80
|
+
},
|
|
81
|
+
showCancel: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: !0
|
|
84
|
+
},
|
|
85
|
+
submitTimeout: {},
|
|
86
|
+
resize: {
|
|
87
|
+
type: [Object, Boolean],
|
|
88
|
+
default: !1
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
emits: ["update:open"],
|
|
92
|
+
setup(c, {
|
|
93
|
+
expose: j,
|
|
94
|
+
emit: E
|
|
95
|
+
}) {
|
|
96
|
+
const n = c, F = K(), U = E, l = h(), m = h(), u = h(!1), {
|
|
97
|
+
value: z,
|
|
98
|
+
updateValue: f
|
|
99
|
+
} = ce(n, U, {
|
|
100
|
+
valuePropName: "open",
|
|
101
|
+
defaultValue: !1
|
|
102
|
+
}), p = O(() => {
|
|
103
|
+
var t, i, a, r;
|
|
104
|
+
const e = {
|
|
105
|
+
onResize: () => {
|
|
106
|
+
},
|
|
107
|
+
minWidth: 300,
|
|
108
|
+
maxWidth: window.innerWidth * 0.8,
|
|
109
|
+
resizeOnOpen: !0
|
|
110
|
+
};
|
|
111
|
+
return se(n.resize) ? n.resize ? e : {} : {
|
|
112
|
+
minWidth: ((t = n.resize) == null ? void 0 : t.minWidth) ?? e.minWidth,
|
|
113
|
+
maxWidth: ((i = n.resize) == null ? void 0 : i.maxWidth) ?? e.maxWidth,
|
|
114
|
+
onResize: ((a = n.resize) == null ? void 0 : a.onResize) ?? e.onResize,
|
|
115
|
+
resizeOnOpen: re((r = n.resize) == null ? void 0 : r.resizeOnOpen) ? e.onResize : n.resize.resizeOnOpen
|
|
116
|
+
};
|
|
117
|
+
}), y = h(C()), {
|
|
118
|
+
t: w
|
|
119
|
+
} = me(), {
|
|
120
|
+
e: D
|
|
121
|
+
} = fe("ap-form-drawer-form");
|
|
122
|
+
R(() => l.value, (e) => {
|
|
123
|
+
var t;
|
|
124
|
+
e && m.value && ((t = e.setFieldsValue) == null || t.call(e, m.value), m.value = void 0);
|
|
125
|
+
}), R(() => s(z), (e) => {
|
|
126
|
+
var t;
|
|
127
|
+
e && (t = s(p)) != null && t.resizeOnOpen && (y.value = C());
|
|
128
|
+
});
|
|
129
|
+
function C() {
|
|
130
|
+
var t;
|
|
131
|
+
const e = (t = s(p)) == null ? void 0 : t.minWidth;
|
|
132
|
+
return !e || e && e < n.width ? n.width : e;
|
|
133
|
+
}
|
|
134
|
+
const W = ae(F.trigger), B = W ? Q(W, {
|
|
135
|
+
onClick: () => {
|
|
136
|
+
f(!0);
|
|
137
|
+
}
|
|
138
|
+
}) : null, $ = O(() => {
|
|
139
|
+
var t, i, a, r;
|
|
140
|
+
const e = [];
|
|
141
|
+
if (n.submitter === !1)
|
|
142
|
+
return null;
|
|
143
|
+
if (n.showCancel) {
|
|
144
|
+
let o;
|
|
145
|
+
e.push(d(V, {
|
|
146
|
+
onClick: x,
|
|
147
|
+
disabled: u.value
|
|
148
|
+
}, L(o = w("ap.common.cancelText")) ? o : {
|
|
149
|
+
default: () => [o]
|
|
150
|
+
}));
|
|
151
|
+
}
|
|
152
|
+
return ((t = n.submitter) == null ? void 0 : t.resetButtonProps) !== !1 && e.push(d(V, v(((i = n.submitter) == null ? void 0 : i.resetButtonProps) || {}, {
|
|
153
|
+
key: "submit",
|
|
154
|
+
disabled: u.value,
|
|
155
|
+
onClick: I
|
|
156
|
+
}), {
|
|
157
|
+
default: () => {
|
|
158
|
+
var o;
|
|
159
|
+
return [((o = n.submitter) == null ? void 0 : o.resetText) || w("ap.common.resetText")];
|
|
160
|
+
}
|
|
161
|
+
})), ((a = n.submitter) == null ? void 0 : a.submitButtonProps) !== !1 && e.push(d(V, v({
|
|
162
|
+
type: "primary",
|
|
163
|
+
key: "submit"
|
|
164
|
+
}, ((r = n.submitter) == null ? void 0 : r.submitButtonProps) || {}, {
|
|
165
|
+
loading: u.value,
|
|
166
|
+
onClick: A
|
|
167
|
+
}), {
|
|
168
|
+
default: () => {
|
|
169
|
+
var o;
|
|
170
|
+
return [((o = n.submitter) == null ? void 0 : o.submitText) || w("ap.common.okText")];
|
|
171
|
+
}
|
|
172
|
+
})), d(ne, {
|
|
173
|
+
justify: "flex-end"
|
|
174
|
+
}, {
|
|
175
|
+
default: () => [F.submitter ? F.submitter(e) : d(oe, null, L(e) ? e : {
|
|
176
|
+
default: () => [e]
|
|
177
|
+
})]
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
function q() {
|
|
181
|
+
var e, t;
|
|
182
|
+
(t = (e = p.value) == null ? void 0 : e.onResize) == null || t.call(e), document.addEventListener("mousemove", k), document.addEventListener("mouseup", T);
|
|
183
|
+
}
|
|
184
|
+
function k(e) {
|
|
185
|
+
const t = s(p), i = (document.body.offsetWidth || 1e3) - (e.clientX - document.body.offsetLeft), a = (t == null ? void 0 : t.minWidth) ?? (n.width || 800), r = (t == null ? void 0 : t.maxWidth) ?? window.innerWidth * 0.8;
|
|
186
|
+
let o = i;
|
|
187
|
+
i < a && (o = a), i > r && (o = r), y.value = o;
|
|
188
|
+
}
|
|
189
|
+
function T() {
|
|
190
|
+
document.removeEventListener("mousemove", k), document.removeEventListener("mouseup", T);
|
|
191
|
+
}
|
|
192
|
+
function I() {
|
|
193
|
+
var e, t, i;
|
|
194
|
+
n.submitter !== !1 && ((e = l.value) == null || e.resetFields(), (i = (t = n.submitter) == null ? void 0 : t.onReset) == null || i.call(t));
|
|
195
|
+
}
|
|
196
|
+
async function A() {
|
|
197
|
+
var e, t, i, a;
|
|
198
|
+
if (n.submitter !== !1)
|
|
199
|
+
try {
|
|
200
|
+
const r = await ((e = l.value) == null ? void 0 : e.validateFields());
|
|
201
|
+
(i = (t = n.submitter) == null ? void 0 : t.onSubmit) == null || i.call(t), u.value = !0;
|
|
202
|
+
const o = (a = n.onFinish) == null ? void 0 : a.call(n, de(r));
|
|
203
|
+
if (n.submitTimeout && o instanceof Promise) {
|
|
204
|
+
const G = setTimeout(() => u.value = !1, n.submitTimeout);
|
|
205
|
+
o.finally(() => {
|
|
206
|
+
clearTimeout(G), u.value = !1;
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
await o && f(!1);
|
|
210
|
+
} finally {
|
|
211
|
+
u.value = !1;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
function x() {
|
|
215
|
+
s(u) || f(!1);
|
|
216
|
+
}
|
|
217
|
+
function X(e) {
|
|
218
|
+
!e && s(u) || f(e);
|
|
219
|
+
}
|
|
220
|
+
return j({
|
|
221
|
+
resetFields: () => {
|
|
222
|
+
var e;
|
|
223
|
+
(e = l.value) == null || e.resetFields();
|
|
224
|
+
},
|
|
225
|
+
clearValidate: (e) => {
|
|
226
|
+
var t;
|
|
227
|
+
(t = l.value) == null || t.clearValidate(e);
|
|
228
|
+
},
|
|
229
|
+
validateFields: (e, t) => {
|
|
230
|
+
var i;
|
|
231
|
+
return (i = l.value) == null ? void 0 : i.validateFields(e, t);
|
|
232
|
+
},
|
|
233
|
+
getFieldsValue: (e) => {
|
|
234
|
+
var t;
|
|
235
|
+
return (t = l.value) == null ? void 0 : t.getFieldsValue(e);
|
|
236
|
+
},
|
|
237
|
+
validate: (e, t) => {
|
|
238
|
+
var i;
|
|
239
|
+
return (i = l.value) == null ? void 0 : i.validate(e, t);
|
|
240
|
+
},
|
|
241
|
+
scrollToField: (e, t = {}) => {
|
|
242
|
+
var i;
|
|
243
|
+
(i = l.value) == null || i.scrollToField(e, t);
|
|
244
|
+
},
|
|
245
|
+
setFieldValue: (e, t) => {
|
|
246
|
+
var i, a;
|
|
247
|
+
(a = (i = l.value) == null ? void 0 : i.setFieldValue) == null || a.call(i, e, t);
|
|
248
|
+
},
|
|
249
|
+
setFieldsValue: (e) => {
|
|
250
|
+
var t, i;
|
|
251
|
+
if (!l.value) {
|
|
252
|
+
m.value = e;
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
(i = (t = l.value) == null ? void 0 : t.setFieldsValue) == null || i.call(t, e);
|
|
256
|
+
},
|
|
257
|
+
getInternalInstance: (e) => {
|
|
258
|
+
var t;
|
|
259
|
+
return (t = l.value) == null ? void 0 : t.getInternalInstance(e);
|
|
260
|
+
}
|
|
261
|
+
}), (e, t) => (b(), P(Y, null, [d(s(le), v(e.drawerProps, {
|
|
262
|
+
open: s(z),
|
|
263
|
+
"onUpdate:open": X,
|
|
264
|
+
onCancel: x,
|
|
265
|
+
width: y.value
|
|
266
|
+
}), {
|
|
267
|
+
title: g(() => [M(e.$slots, "title", {}, () => [Z(ee(n.title), 1)])]),
|
|
268
|
+
footer: g(() => [(b(), N(S($.value)))]),
|
|
269
|
+
default: g(() => [d(pe, v({
|
|
270
|
+
ref_key: "formRef",
|
|
271
|
+
ref: l
|
|
272
|
+
}, s(ue)(n, ["drawerProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
|
|
273
|
+
default: g(() => [M(e.$slots, "default")]),
|
|
274
|
+
_: 3
|
|
275
|
+
}, 16), e.resize ? (b(), P("div", {
|
|
276
|
+
key: 0,
|
|
277
|
+
class: te(s(D)("resize-bar")),
|
|
278
|
+
onMousedown: ie(q, ["stop", "prevent"])
|
|
279
|
+
}, null, 34)) : _("", !0)]),
|
|
280
|
+
_: 3
|
|
281
|
+
}, 16, ["open", "width"]), s(B) ? (b(), N(S(s(B)), {
|
|
282
|
+
key: 0
|
|
283
|
+
})) : _("", !0)], 64));
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
export {
|
|
287
|
+
je as default
|
|
288
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Ce, useSlots as Te, ref as P, computed as s, unref as t, createVNode as f, Fragment as U, watchEffect as Fe, watch as G, openBlock as m, createElementBlock as T, normalizeClass as c, normalizeStyle as M, mergeProps as h, createSlots as J, withCtx as w, renderList as Q, createBlock as X, resolveDynamicComponent as
|
|
1
|
+
import { defineComponent as Ce, useSlots as Te, ref as P, computed as s, unref as t, createVNode as f, Fragment as U, watchEffect as Fe, watch as G, openBlock as m, createElementBlock as T, normalizeClass as c, normalizeStyle as M, mergeProps as h, createSlots as J, withCtx as w, renderList as Q, createBlock as X, resolveDynamicComponent as xe, renderSlot as S, createCommentVNode as Y, createElementVNode as I, h as Be, normalizeProps as ke, guardReactiveProps as ze } from "vue";
|
|
2
2
|
import { Typography as Pe, Divider as Ie, Button as Ne, Table as Le } from "ant-design-vue";
|
|
3
3
|
import { useToken as Ee } from "ant-design-vue/es/theme/internal";
|
|
4
4
|
import { ApForm as Ke } from "../ap-form/index.mjs";
|
|
@@ -7,7 +7,7 @@ import "../config-provider/index.mjs";
|
|
|
7
7
|
import { useTablePaging as Oe } from "./hooks/use-table-paging.mjs";
|
|
8
8
|
import { omit as _, isUndefined as g, isBoolean as Ve } from "lodash-unified";
|
|
9
9
|
import "./style/ap-table.css";
|
|
10
|
-
import { apColumnToColumn as
|
|
10
|
+
import { apColumnToColumn as De, getTableTitle as je, getTableRenderType as Ae, getTableRenderProps as We, getTableCellRenderNode as $e, getColumnOrder as ee, updateFormProps as He, getFieldProps as qe, getPlaceholder as Ue, getSearchFormItemRenderNode as Ge, objectToString as Me } from "./utils.mjs";
|
|
11
11
|
import Je from "./hooks/use-table-content-height.mjs";
|
|
12
12
|
import { getRawDisplayValue as Qe } from "../editable-table/utils.mjs";
|
|
13
13
|
import Xe from "./hooks/use-table-row-selection.mjs";
|
|
@@ -148,7 +148,7 @@ const Fa = /* @__PURE__ */ Ce({
|
|
|
148
148
|
}) {
|
|
149
149
|
const a = ae;
|
|
150
150
|
let N = 0;
|
|
151
|
-
const
|
|
151
|
+
const b = Te(), [, te] = Ee(), {
|
|
152
152
|
t: re
|
|
153
153
|
} = ea(), {
|
|
154
154
|
e: F,
|
|
@@ -157,16 +157,16 @@ const Fa = /* @__PURE__ */ Ce({
|
|
|
157
157
|
} = aa("ap-table"), E = oa("valueTypeMap"), {
|
|
158
158
|
height: le,
|
|
159
159
|
contentRef: ne
|
|
160
|
-
} = Je(),
|
|
160
|
+
} = Je(), x = P(a.size), u = P([]), K = P([]);
|
|
161
161
|
_e({
|
|
162
162
|
columns: s(() => u.value),
|
|
163
163
|
columnsBackup: s(() => K.value),
|
|
164
|
-
size: s(() =>
|
|
164
|
+
size: s(() => x.value),
|
|
165
165
|
updateColumns(e) {
|
|
166
166
|
u.value = e;
|
|
167
167
|
},
|
|
168
168
|
updateSize(e) {
|
|
169
|
-
|
|
169
|
+
x.value = e;
|
|
170
170
|
}
|
|
171
171
|
});
|
|
172
172
|
const se = () => {
|
|
@@ -175,34 +175,34 @@ const Fa = /* @__PURE__ */ Ce({
|
|
|
175
175
|
function o(l, d) {
|
|
176
176
|
return l.map((n) => ({
|
|
177
177
|
resizable: Ye(n.resizable) ? n.resizable : a.columnResizable,
|
|
178
|
-
..._(
|
|
178
|
+
..._(De(n), ["ellipsis"]),
|
|
179
179
|
fixed: d ? d.fixed : n.fixed,
|
|
180
|
-
title:
|
|
180
|
+
title: je(n, L("table-header", "title"), b.headerCell, t(te).colorPrimary),
|
|
181
181
|
customRender({
|
|
182
182
|
value: p,
|
|
183
183
|
...y
|
|
184
184
|
}) {
|
|
185
185
|
var H, q;
|
|
186
|
-
const
|
|
186
|
+
const W = Ae(n), be = We({
|
|
187
187
|
...n,
|
|
188
|
-
valueType:
|
|
188
|
+
valueType: W
|
|
189
189
|
}, {
|
|
190
190
|
value: p,
|
|
191
191
|
...y
|
|
192
|
-
}), Re =
|
|
192
|
+
}), Re = $e(W, be, y.record, t(E)), $ = ((H = n.renderText) == null ? void 0 : H.call(n, {
|
|
193
193
|
value: p,
|
|
194
194
|
...y
|
|
195
195
|
})) || p, ve = n.renderText ? f(U, null, [(q = n.renderText) == null ? void 0 : q.call(n, {
|
|
196
196
|
value: p,
|
|
197
197
|
...y
|
|
198
198
|
})]) : Re;
|
|
199
|
-
let z = ye(n,
|
|
199
|
+
let z = ye(n, $, ve);
|
|
200
200
|
return n.customRender && (z = n.customRender({
|
|
201
201
|
value: p,
|
|
202
202
|
...y,
|
|
203
203
|
column: n,
|
|
204
204
|
originalNode: z,
|
|
205
|
-
originalText:
|
|
205
|
+
originalText: $
|
|
206
206
|
})), z;
|
|
207
207
|
},
|
|
208
208
|
children: o(n.children || [], d || n)
|
|
@@ -236,7 +236,7 @@ const Fa = /* @__PURE__ */ Ce({
|
|
|
236
236
|
})) || [];
|
|
237
237
|
}), de = s(() => t(u).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), ue = s(() => t(u).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), ie = s(() => g(a.dataSource) ? C.value.records : a.dataSource), {
|
|
238
238
|
rowSelection: R,
|
|
239
|
-
selectedRows:
|
|
239
|
+
selectedRows: B,
|
|
240
240
|
...v
|
|
241
241
|
} = Xe({
|
|
242
242
|
...a.rowSelection === !0 ? {} : a.rowSelection,
|
|
@@ -245,8 +245,8 @@ const Fa = /* @__PURE__ */ Ce({
|
|
|
245
245
|
}), {
|
|
246
246
|
formRef: k,
|
|
247
247
|
submit: V,
|
|
248
|
-
reset:
|
|
249
|
-
tableProps:
|
|
248
|
+
reset: D,
|
|
249
|
+
tableProps: j,
|
|
250
250
|
refresh: ce,
|
|
251
251
|
data: C,
|
|
252
252
|
setDataSource: pe
|
|
@@ -289,9 +289,9 @@ const Fa = /* @__PURE__ */ Ce({
|
|
|
289
289
|
return a.tableLayout;
|
|
290
290
|
if ((e = a.columns) != null && e.some((o) => o.ellipsis))
|
|
291
291
|
return "fixed";
|
|
292
|
-
}),
|
|
292
|
+
}), A = s(() => {
|
|
293
293
|
var r;
|
|
294
|
-
const e = t(
|
|
294
|
+
const e = t(j), o = t(R);
|
|
295
295
|
return {
|
|
296
296
|
...a,
|
|
297
297
|
...e,
|
|
@@ -327,7 +327,7 @@ const Fa = /* @__PURE__ */ Ce({
|
|
|
327
327
|
var o;
|
|
328
328
|
(o = a.onLoadingChange) == null || o.call(a, e);
|
|
329
329
|
}), G(() => a.dataSource, (e) => {
|
|
330
|
-
|
|
330
|
+
pe(e);
|
|
331
331
|
}, {
|
|
332
332
|
immediate: !0
|
|
333
333
|
});
|
|
@@ -339,19 +339,19 @@ const Fa = /* @__PURE__ */ Ce({
|
|
|
339
339
|
var e, o, r;
|
|
340
340
|
return (r = (o = (e = k.value) == null ? void 0 : e.apForm) == null ? void 0 : o.getFieldsValue) == null ? void 0 : r.call(o, !0);
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function Se() {
|
|
343
343
|
return t(u);
|
|
344
344
|
}
|
|
345
345
|
return oe({
|
|
346
346
|
submit: () => V(),
|
|
347
|
-
reset: () =>
|
|
347
|
+
reset: () => D(),
|
|
348
348
|
refresh: () => ce(),
|
|
349
349
|
setSearchFormValues: he,
|
|
350
350
|
getSearchFormValues: we,
|
|
351
|
-
getShownColumns:
|
|
351
|
+
getShownColumns: Se,
|
|
352
352
|
dataSource: s(() => t(C).records),
|
|
353
353
|
rowSelection: {
|
|
354
|
-
selectedRows: s(() => t(
|
|
354
|
+
selectedRows: s(() => t(B)),
|
|
355
355
|
...v
|
|
356
356
|
}
|
|
357
357
|
}), (e, o) => (m(), T("div", {
|
|
@@ -365,19 +365,19 @@ const Fa = /* @__PURE__ */ Ce({
|
|
|
365
365
|
ref: k,
|
|
366
366
|
"custom-reset": "",
|
|
367
367
|
onSubmit: t(V),
|
|
368
|
-
onReset: t(
|
|
369
|
-
"submit-loading": t(
|
|
368
|
+
onReset: t(D),
|
|
369
|
+
"submit-loading": t(j).loading
|
|
370
370
|
}), J({
|
|
371
|
-
default: w(() => [(m(!0), T(U, null, Q(O.value, (r) => (m(), X(
|
|
371
|
+
default: w(() => [(m(!0), T(U, null, Q(O.value, (r) => (m(), X(xe(r.renderNode), h({
|
|
372
372
|
key: r.dataIndex,
|
|
373
373
|
ref_for: !0
|
|
374
374
|
}, r.fieldProps || {}, {
|
|
375
375
|
span: r.span
|
|
376
376
|
}), null, 16, ["span"]))), 128))]),
|
|
377
377
|
_: 2
|
|
378
|
-
}, [
|
|
378
|
+
}, [b.searchFormExtra ? {
|
|
379
379
|
name: "extra",
|
|
380
|
-
fn: w(() => [
|
|
380
|
+
fn: w(() => [S(e.$slots, "searchFormExtra")]),
|
|
381
381
|
key: "0"
|
|
382
382
|
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : Y("", !0), I("div", {
|
|
383
383
|
ref_key: "contentRef",
|
|
@@ -391,11 +391,11 @@ const Fa = /* @__PURE__ */ Ce({
|
|
|
391
391
|
class: c(t(i)("header"))
|
|
392
392
|
}, [I("div", {
|
|
393
393
|
class: c(t(L)("header", "title"))
|
|
394
|
-
}, [
|
|
395
|
-
selectedRows: t(
|
|
394
|
+
}, [S(e.$slots, "title", h({
|
|
395
|
+
selectedRows: t(B),
|
|
396
396
|
selectedRowKeys: t(R).selectedRowKeys,
|
|
397
397
|
shownColumns: u.value
|
|
398
|
-
}, v))], 2),
|
|
398
|
+
}, v))], 2), b.title ? (m(), X(t(Ie), {
|
|
399
399
|
key: 0,
|
|
400
400
|
type: "vertical"
|
|
401
401
|
})) : Y("", !0), f(ta, {
|
|
@@ -403,30 +403,30 @@ const Fa = /* @__PURE__ */ Ce({
|
|
|
403
403
|
}, {
|
|
404
404
|
trigger: w(() => [f(t(Ne), {
|
|
405
405
|
class: c(t(i)("setting-trigger-button")),
|
|
406
|
-
icon:
|
|
406
|
+
icon: Be(t(Ze))
|
|
407
407
|
}, null, 8, ["class", "icon"])]),
|
|
408
408
|
_: 1
|
|
409
|
-
}, 8, ["config"])], 2)) :
|
|
409
|
+
}, 8, ["config"])], 2)) : S(e.$slots, "title", h({
|
|
410
410
|
key: 1,
|
|
411
|
-
selectedRows: t(
|
|
411
|
+
selectedRows: t(B),
|
|
412
412
|
selectedRowKeys: t(R).selectedRowKeys,
|
|
413
413
|
shownColumns: u.value
|
|
414
414
|
}, v))], 2), f(t(Le), h({
|
|
415
415
|
class: t(i)("table")
|
|
416
|
-
},
|
|
417
|
-
size:
|
|
416
|
+
}, A.value, {
|
|
417
|
+
size: x.value,
|
|
418
418
|
"table-layout": me.value,
|
|
419
419
|
columns: u.value,
|
|
420
420
|
onResizeColumn: o[0] || (o[0] = (r, l) => l.width = r)
|
|
421
421
|
}), J({
|
|
422
|
-
summary: w(() => [
|
|
422
|
+
summary: w(() => [S(e.$slots, "summary", {
|
|
423
423
|
columns: u.value,
|
|
424
|
-
records:
|
|
424
|
+
records: A.value.dataSource
|
|
425
425
|
})]),
|
|
426
426
|
_: 2
|
|
427
|
-
}, [Q(t(_)(
|
|
427
|
+
}, [Q(t(_)(b, ["title", "searchFormExtra", "headerCell", "summary"]), (r, l) => ({
|
|
428
428
|
name: l,
|
|
429
|
-
fn: w((d) => [
|
|
429
|
+
fn: w((d) => [S(e.$slots, l, ke(ze(d || {})))])
|
|
430
430
|
}))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 2));
|
|
431
431
|
}
|
|
432
432
|
});
|