@aplus-frontend/ui 6.34.0 → 6.35.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/components/tooltip/index.vue2.mjs +1 -1
- package/es/src/ag-grid/hooks/use-selection-col-def.mjs +28 -22
- package/es/src/ag-grid/index.vue.mjs +77 -72
- package/es/src/ag-grid/interface.d.ts +5 -1
- package/es/src/ap-form/ap-form.vue.d.ts +2 -6
- package/es/src/ap-form/ap-form.vue2.mjs +71 -69
- package/es/src/ap-grid/editable/form-item.vue.mjs +74 -71
- package/es/src/ap-grid/editable/index.vue.mjs +94 -91
- package/es/src/ap-grid/index.vue.mjs +74 -69
- package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
- package/es/src/ap-table/ap-table.vue2.mjs +72 -69
- package/es/src/ap-tag/ap-tag-group.vue.mjs +33 -30
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +103 -103
- package/es/src/business/ap-attachment/ApAttachment.mjs +16 -15
- package/es/src/business/ap-copy/ApCopy.mjs +5 -6
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +176 -175
- package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +4 -4
- package/es/src/business/ap-label/ApLabel.d.ts +1 -1
- package/es/src/business/ap-label/index.d.ts +3 -3
- package/es/src/business/hooks/usePageListApTable.mjs +10 -9
- package/es/src/editable-table/form-item.vue.mjs +75 -72
- package/es/src/editable-table/hooks/use-get-columns.mjs +35 -34
- package/es/src/editable-table/index.vue.mjs +68 -65
- package/es/src/utils/warning.d.ts +25 -0
- package/es/src/utils/warning.mjs +74 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -1
- package/lib/src/ag-grid/hooks/use-selection-col-def.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +5 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +2 -6
- package/lib/src/ap-form/ap-form.vue2.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-pro-card/components/statistic/index.vue.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-copy/ApCopy.js +1 -1
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
- package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -1
- package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
- package/lib/src/business/ap-label/index.d.ts +3 -3
- package/lib/src/business/hooks/usePageListApTable.js +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/utils/warning.d.ts +25 -0
- package/lib/src/utils/warning.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as I, useSlots as W, ref as y, watch as C, unref as r, createBlock as U, openBlock as $, withCtx as p, createVNode as w, mergeProps as q, createSlots as J, renderList as Q, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
|
|
2
2
|
import { ApForm as m } from "../../ap-form/index.mjs";
|
|
3
|
-
import { isEqual as M, isArray as c, isUndefined as ee, isNumber as
|
|
3
|
+
import { isEqual as M, isArray as c, isUndefined as ee, isNumber as g, cloneDeep as ae, omit as te } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import "../../hooks/index.mjs";
|
|
6
|
-
import { isDef as
|
|
6
|
+
import { isDef as b } from "../../utils/index.mjs";
|
|
7
7
|
import { useGetEditableColumns as oe } from "../hooks/use-editable-columns.mjs";
|
|
8
8
|
import "../index.vue2.mjs";
|
|
9
|
+
import { useDevWarning as ne } from "../../utils/warning.mjs";
|
|
9
10
|
import { useNamespace as le } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
|
-
import { useControllableValue as
|
|
11
|
-
import { useGlobalConfig as
|
|
12
|
-
import
|
|
13
|
-
const
|
|
11
|
+
import { useControllableValue as se } from "../../hooks/useControllableValue.mjs";
|
|
12
|
+
import { useGlobalConfig as re } from "../../config-provider/hooks/use-global-config.mjs";
|
|
13
|
+
import ie from "../index.vue.mjs";
|
|
14
|
+
const Re = /* @__PURE__ */ I({
|
|
14
15
|
name: "EditableGrid",
|
|
15
16
|
__name: "index",
|
|
16
17
|
props: {
|
|
@@ -162,124 +163,126 @@ const ve = /* @__PURE__ */ W({
|
|
|
162
163
|
onFieldChange: {}
|
|
163
164
|
},
|
|
164
165
|
emits: ["update:value"],
|
|
165
|
-
setup(
|
|
166
|
-
expose:
|
|
166
|
+
setup(v, {
|
|
167
|
+
expose: x,
|
|
167
168
|
emit: R
|
|
168
169
|
}) {
|
|
169
|
-
const B =
|
|
170
|
+
const B = W(), a = v, {
|
|
170
171
|
b: F
|
|
171
|
-
} = le("editable-grid"), S = R
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
172
|
+
} = le("editable-grid"), S = R;
|
|
173
|
+
ne("EditableGrid")(!1, "breaking", "EditableGrid has been EOL, Please use EditableAgGrid(https://aplus.aplnk.com/aplus-ui/components/ag-grid/editable/) instead.");
|
|
174
|
+
const h = y(), {
|
|
175
|
+
value: u,
|
|
176
|
+
updateValue: E
|
|
177
|
+
} = se(a, S), i = y(), N = re("valueTypeMap"), f = m.useWatch(a.name, i);
|
|
178
|
+
C(() => f.value, (e) => {
|
|
179
|
+
E(e), a.onChange?.(e);
|
|
177
180
|
}, {
|
|
178
181
|
deep: !0,
|
|
179
182
|
flush: "post"
|
|
180
|
-
}), C(
|
|
181
|
-
e !== r(
|
|
183
|
+
}), C(u, (e) => {
|
|
184
|
+
e !== r(f) && (M(e, r(f)) || i.value?.setFieldValue(a.name, e));
|
|
182
185
|
}, {
|
|
183
186
|
deep: !0
|
|
184
187
|
});
|
|
185
|
-
const
|
|
186
|
-
function
|
|
187
|
-
|
|
188
|
+
const V = oe(a, N);
|
|
189
|
+
function k() {
|
|
190
|
+
i.value?.resetFields();
|
|
188
191
|
}
|
|
189
|
-
function
|
|
190
|
-
return e ? (c(e) ? e : [e]).map((
|
|
192
|
+
function L(e) {
|
|
193
|
+
return e ? (c(e) ? e : [e]).map((l) => c(l) ? [a.name, ...l] : [a.name, l]) : void 0;
|
|
191
194
|
}
|
|
192
|
-
async function
|
|
193
|
-
return (await
|
|
195
|
+
async function _(e, n) {
|
|
196
|
+
return (await i.value?.validateFields(L(e), n))?.[a.name];
|
|
194
197
|
}
|
|
195
|
-
function
|
|
196
|
-
const
|
|
197
|
-
if (
|
|
198
|
+
function D(e, n) {
|
|
199
|
+
const l = r(u)?.length || 0;
|
|
200
|
+
if (b(a.maxLength) && l >= a.maxLength)
|
|
198
201
|
return;
|
|
199
|
-
const
|
|
202
|
+
const t = {
|
|
200
203
|
...e || {}
|
|
201
204
|
};
|
|
202
|
-
|
|
205
|
+
i.value?.setFieldValue?.(a.name, t, !0, (o, s) => {
|
|
203
206
|
if (!o[s]) {
|
|
204
|
-
o[s] = [
|
|
207
|
+
o[s] = [t];
|
|
205
208
|
return;
|
|
206
209
|
}
|
|
207
|
-
ee(
|
|
210
|
+
ee(n) ? o[s].push(t) : o[s].splice(n, 0, t);
|
|
208
211
|
});
|
|
209
212
|
}
|
|
210
|
-
function T(e,
|
|
211
|
-
const
|
|
212
|
-
if (
|
|
213
|
+
function T(e, n = "suffix") {
|
|
214
|
+
const l = r(u)?.length || 0, t = g(e) ? e : e.length;
|
|
215
|
+
if (b(a.maxLength) && l + t > a.maxLength)
|
|
213
216
|
return;
|
|
214
|
-
const o =
|
|
215
|
-
|
|
216
|
-
if (!s[
|
|
217
|
-
s[
|
|
217
|
+
const o = g(e) ? new Array(e).fill(0).map(() => ({})) : ae(e);
|
|
218
|
+
i.value?.setFieldValue?.(a.name, o, !0, (s, d) => {
|
|
219
|
+
if (!s[d]) {
|
|
220
|
+
s[d] = [...o];
|
|
218
221
|
return;
|
|
219
222
|
}
|
|
220
|
-
|
|
223
|
+
n === "suffix" ? s[d].push(...o) : s[d].unshift(...o);
|
|
221
224
|
});
|
|
222
225
|
}
|
|
223
|
-
function
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
|
|
226
|
+
function O(e) {
|
|
227
|
+
const n = new Set(g(e) ? [e] : e);
|
|
228
|
+
i.value?.setFieldValue?.(a.name, void 0, !0, (l, t) => {
|
|
229
|
+
l[t] = l[t].filter((o, s) => !n.has(s));
|
|
227
230
|
});
|
|
228
231
|
}
|
|
229
|
-
function
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
|
|
232
|
+
function j(e) {
|
|
233
|
+
const n = new Set(c(e) ? e : [e]);
|
|
234
|
+
n.size !== 0 && i.value?.setFieldValue?.(a.name, void 0, !0, (l, t) => {
|
|
235
|
+
l[t] = l[t].filter((o) => !n.has(o[a.rowKey]));
|
|
233
236
|
});
|
|
234
237
|
}
|
|
235
|
-
function
|
|
236
|
-
return r(
|
|
238
|
+
function A() {
|
|
239
|
+
return r(u);
|
|
237
240
|
}
|
|
238
|
-
function
|
|
239
|
-
|
|
241
|
+
function z(e) {
|
|
242
|
+
i.value?.setFieldValue(a.name, e);
|
|
240
243
|
}
|
|
241
|
-
function
|
|
242
|
-
return r(
|
|
244
|
+
function G(e) {
|
|
245
|
+
return r(u)?.[e];
|
|
243
246
|
}
|
|
244
|
-
function
|
|
245
|
-
|
|
246
|
-
if (!(!
|
|
247
|
-
if (!
|
|
248
|
-
const s = Object.keys(
|
|
249
|
-
for (const
|
|
250
|
-
|
|
247
|
+
function K(e, n, l = !0) {
|
|
248
|
+
i.value?.setFieldValue?.(a.name, void 0, !0, (t, o) => {
|
|
249
|
+
if (!(!t[o] || !t[o][e])) {
|
|
250
|
+
if (!l) {
|
|
251
|
+
const s = Object.keys(t[o][e]);
|
|
252
|
+
for (const d of s)
|
|
253
|
+
d !== a.rowKey && delete t[o][e][d];
|
|
251
254
|
}
|
|
252
|
-
Object.assign(
|
|
253
|
-
...
|
|
255
|
+
Object.assign(t[o][e], {
|
|
256
|
+
...n
|
|
254
257
|
});
|
|
255
258
|
}
|
|
256
259
|
});
|
|
257
260
|
}
|
|
258
|
-
function
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
+
function P(e) {
|
|
262
|
+
const n = e === "end" ? u.value.length - 1 : e;
|
|
263
|
+
h.value?.scrollToRow(n);
|
|
261
264
|
}
|
|
262
|
-
function
|
|
263
|
-
|
|
265
|
+
function H() {
|
|
266
|
+
i.value?.setFieldValue?.(a.name, []);
|
|
264
267
|
}
|
|
265
|
-
return
|
|
266
|
-
resetFields:
|
|
267
|
-
validateFields:
|
|
268
|
-
add:
|
|
269
|
-
remove:
|
|
270
|
-
getRowData:
|
|
271
|
-
getRowsData:
|
|
272
|
-
setRowData:
|
|
268
|
+
return x({
|
|
269
|
+
resetFields: k,
|
|
270
|
+
validateFields: _,
|
|
271
|
+
add: D,
|
|
272
|
+
remove: O,
|
|
273
|
+
getRowData: G,
|
|
274
|
+
getRowsData: A,
|
|
275
|
+
setRowData: K,
|
|
273
276
|
addMultiple: T,
|
|
274
|
-
scrollTo:
|
|
275
|
-
clear:
|
|
276
|
-
setTableData:
|
|
277
|
-
removeByKey:
|
|
278
|
-
}), (e,
|
|
277
|
+
scrollTo: P,
|
|
278
|
+
clear: H,
|
|
279
|
+
setTableData: z,
|
|
280
|
+
removeByKey: j
|
|
281
|
+
}), (e, n) => ($(), U(r(m), {
|
|
279
282
|
ref_key: "formRef",
|
|
280
|
-
ref:
|
|
283
|
+
ref: i,
|
|
281
284
|
"initial-values": {
|
|
282
|
-
[
|
|
285
|
+
[a.name]: r(u)
|
|
283
286
|
},
|
|
284
287
|
style: {
|
|
285
288
|
height: "100%"
|
|
@@ -289,18 +292,18 @@ const ve = /* @__PURE__ */ W({
|
|
|
289
292
|
name: e.name,
|
|
290
293
|
"no-style": ""
|
|
291
294
|
}, {
|
|
292
|
-
default: p(() => [w(
|
|
295
|
+
default: p(() => [w(ie, q(r(te)(a, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
|
|
293
296
|
ref_key: "tableRef",
|
|
294
|
-
ref:
|
|
297
|
+
ref: h,
|
|
295
298
|
class: r(F)(),
|
|
296
|
-
columns: r(
|
|
297
|
-
"data-source": r(
|
|
299
|
+
columns: r(V),
|
|
300
|
+
"data-source": r(u),
|
|
298
301
|
"search-form": !1
|
|
299
302
|
}), J({
|
|
300
303
|
_: 2
|
|
301
|
-
}, [Q(B, (
|
|
302
|
-
name:
|
|
303
|
-
fn: p((o) => [X(e.$slots,
|
|
304
|
+
}, [Q(B, (l, t) => ({
|
|
305
|
+
name: t,
|
|
306
|
+
fn: p((o) => [X(e.$slots, t, Y(Z(o || {})))])
|
|
304
307
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
305
308
|
_: 3
|
|
306
309
|
}, 8, ["name"])]),
|
|
@@ -309,5 +312,5 @@ const ve = /* @__PURE__ */ W({
|
|
|
309
312
|
}
|
|
310
313
|
});
|
|
311
314
|
export {
|
|
312
|
-
|
|
315
|
+
Re as default
|
|
313
316
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Xe, useSlots as Je, getCurrentInstance as Qe, ref as F, computed as n, unref as t, toRef as Ye, nextTick as oe, watch as E, createElementBlock as I, openBlock as s, normalizeStyle as _, normalizeClass as m, createCommentVNode as
|
|
1
|
+
import { defineComponent as Xe, useSlots as Je, getCurrentInstance as Qe, ref as F, computed as n, unref as t, toRef as Ye, nextTick as oe, watch as E, createElementBlock as I, openBlock as s, normalizeStyle as _, normalizeClass as m, createCommentVNode as y, createElementVNode as w, createVNode as K, mergeProps as R, createSlots as L, withCtx as c, Fragment as ae, renderList as V, createBlock as d, resolveDynamicComponent as B, renderSlot as O, normalizeProps as Ze, guardReactiveProps as et } from "vue";
|
|
2
2
|
import { VxeUI as re, VxeTable as tt, VxeColumn as ne } from "vxe-table";
|
|
3
3
|
import "vxe-table/es/style.css";
|
|
4
4
|
import { isUndefined as S, isFunction as D, isArray as ot, omit as at } from "lodash-unified";
|
|
@@ -12,18 +12,19 @@ import { useInnerParams as pt } from "./hooks/use-inner-params.mjs";
|
|
|
12
12
|
import { toVxeProps as ft, getRowExpandProps as mt, getRowSelectionProps as gt } from "./utils/table.mjs";
|
|
13
13
|
import ht from "./hooks/use-row-selection.mjs";
|
|
14
14
|
import { useProvideApTable as Ct } from "../ap-table/context.mjs";
|
|
15
|
-
import { DEFAULT_ROW_SELECTION_CONFIG as de, sizeReverseMap as
|
|
15
|
+
import { DEFAULT_ROW_SELECTION_CONFIG as de, sizeReverseMap as vt, sizeMap as yt, ROW_SELECTION_FIELD as wt } from "./constants.mjs";
|
|
16
16
|
import { useRenderColumns as Rt } from "./hooks/use-render-columns.mjs";
|
|
17
17
|
import { useToken as St } from "@aplus-frontend/antdv/es/theme/internal";
|
|
18
18
|
import "../scroll-bar/index.mjs";
|
|
19
19
|
import { isDef as bt } from "../utils/index.mjs";
|
|
20
20
|
import { getValidVNodeList as xt } from "../utils/slot.mjs";
|
|
21
21
|
import { useTableStyle as kt } from "./hooks/use-table-style.mjs";
|
|
22
|
-
import {
|
|
22
|
+
import { useDevWarning as Ft } from "../utils/warning.mjs";
|
|
23
|
+
import { useNamespace as Et } from "../config-provider/hooks/use-namespace.mjs";
|
|
23
24
|
import { useGlobalConfig as ue } from "../config-provider/hooks/use-global-config.mjs";
|
|
24
|
-
import { useLocale as
|
|
25
|
-
import
|
|
26
|
-
const
|
|
25
|
+
import { useLocale as It } from "../config-provider/hooks/use-locale.mjs";
|
|
26
|
+
import Bt from "../scroll-bar/index.vue.mjs";
|
|
27
|
+
const ao = /* @__PURE__ */ Xe({
|
|
27
28
|
name: "ApGrid",
|
|
28
29
|
__name: "index",
|
|
29
30
|
props: {
|
|
@@ -117,12 +118,16 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
117
118
|
},
|
|
118
119
|
setup(ce, { expose: pe }) {
|
|
119
120
|
const T = Je(), o = ce, b = Qe()?.appContext.app;
|
|
120
|
-
b && !b.__VXE_PC_UI_INSTALLED__ && (b.use(re), b.__VXE_PC_UI_INSTALLED__ = !0)
|
|
121
|
-
|
|
121
|
+
b && !b.__VXE_PC_UI_INSTALLED__ && (b.use(re), b.__VXE_PC_UI_INSTALLED__ = !0), Ft("ApGrid")(
|
|
122
|
+
!1,
|
|
123
|
+
"breaking",
|
|
124
|
+
"AgGrid has been EOL, Please use AgGrid(https://aplus.aplnk.com/aplus-ui/components/ag-grid/) instead."
|
|
125
|
+
);
|
|
126
|
+
const { e: x, b: u, be: fe } = Et("ap-grid"), me = ue("valueTypeMap"), ge = ue("apGrid"), i = F([]), $ = F([]), l = F(), k = F(o.size), he = kt(), [, Ce] = St(), { t: ve } = It();
|
|
122
127
|
re.setConfig({
|
|
123
|
-
i18n: (e, a) =>
|
|
128
|
+
i18n: (e, a) => ve(`ap.${e}`, a)
|
|
124
129
|
});
|
|
125
|
-
const { renderConfig:
|
|
130
|
+
const { renderConfig: ye, updateSignal: we } = Rt(i);
|
|
126
131
|
let W = 0;
|
|
127
132
|
const C = n(() => {
|
|
128
133
|
let e = o.rowSelection || ge.value?.rowSelection;
|
|
@@ -136,7 +141,7 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
136
141
|
return l.value.$el.querySelector(
|
|
137
142
|
".vxe-table--header-inner-wrapper"
|
|
138
143
|
);
|
|
139
|
-
}),
|
|
144
|
+
}), G = n(() => (W++, o.columns?.filter(
|
|
140
145
|
(e) => !e.hideInSearch && e.dataIndex && (e.valueType || e.customRenderFormItem) && !nt.includes(e.valueType)
|
|
141
146
|
)?.sort((e, a) => {
|
|
142
147
|
let r = le(e.order);
|
|
@@ -166,19 +171,19 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
166
171
|
o.card ? null : u("wrapper"),
|
|
167
172
|
o.adaptive ? u("adaptive") : null,
|
|
168
173
|
o.sticky ? u("sticky") : null
|
|
169
|
-
].filter(Boolean)),
|
|
174
|
+
].filter(Boolean)), M = n(() => se(t(i), (e) => {
|
|
170
175
|
if (e.sorter === !0)
|
|
171
176
|
return e.key || e.dataIndex;
|
|
172
|
-
}).filter(Boolean)),
|
|
177
|
+
}).filter(Boolean)), j = n(() => se(t(i), (e) => {
|
|
173
178
|
if (e.filters && !e.onFilter)
|
|
174
179
|
return e.key || e.dataIndex;
|
|
175
180
|
}).filter(Boolean)), {
|
|
176
181
|
formRef: g,
|
|
177
182
|
submit: N,
|
|
178
183
|
reset: P,
|
|
179
|
-
refresh:
|
|
184
|
+
refresh: q,
|
|
180
185
|
data: p,
|
|
181
|
-
tableProps:
|
|
186
|
+
tableProps: H,
|
|
182
187
|
setDataSource: xe,
|
|
183
188
|
handleTableChangeOptional: ke,
|
|
184
189
|
getPaging: Fe,
|
|
@@ -186,7 +191,7 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
186
191
|
submitWith: U
|
|
187
192
|
} = dt({
|
|
188
193
|
async request(e) {
|
|
189
|
-
if (C.value && !C.value.preserveSelectedRowKeys && S(o.dataSource) &&
|
|
194
|
+
if (C.value && !C.value.preserveSelectedRowKeys && S(o.dataSource) && z(), !S(o.dataSource)) {
|
|
190
195
|
const r = e.pageSize * (e.current - 1);
|
|
191
196
|
return {
|
|
192
197
|
data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(r, r + e.pageSize)) || [],
|
|
@@ -200,25 +205,25 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
200
205
|
};
|
|
201
206
|
},
|
|
202
207
|
namespace: "ap-grid",
|
|
203
|
-
filterFields:
|
|
204
|
-
sortFields:
|
|
208
|
+
filterFields: j,
|
|
209
|
+
sortFields: M,
|
|
205
210
|
params: Ye(o, "params"),
|
|
206
211
|
defaultData: o.defaultData,
|
|
207
212
|
manual: t(Se),
|
|
208
213
|
formatParams: o.beforeSearchSubmit,
|
|
209
214
|
pagination: o.pagination,
|
|
210
215
|
onClickReset: We,
|
|
211
|
-
onAfterRequest:
|
|
216
|
+
onAfterRequest: Ge
|
|
212
217
|
}), { sortChangeEvent: Ie, filterChangeEvent: Be, paginationChangeEvent: Te } = pt(ke);
|
|
213
218
|
Ct({
|
|
214
219
|
columns: n(() => i.value),
|
|
215
220
|
columnsBackup: n(() => $.value),
|
|
216
|
-
size: n(() =>
|
|
221
|
+
size: n(() => yt[k.value]),
|
|
217
222
|
updateColumns(e) {
|
|
218
223
|
i.value = e, o.onShownColumnsChange?.(e);
|
|
219
224
|
},
|
|
220
225
|
updateSize(e) {
|
|
221
|
-
k.value =
|
|
226
|
+
k.value = vt[e];
|
|
222
227
|
},
|
|
223
228
|
renderConfig: n(() => ({
|
|
224
229
|
className: fe("table-header", "title"),
|
|
@@ -230,7 +235,7 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
230
235
|
submit: N,
|
|
231
236
|
submitWith: U,
|
|
232
237
|
reset: P,
|
|
233
|
-
refresh:
|
|
238
|
+
refresh: q,
|
|
234
239
|
getSearchFormSorterItems: Q,
|
|
235
240
|
setSearchFormSorterItems: Y,
|
|
236
241
|
resetSearchFormSorterItems: Z
|
|
@@ -241,17 +246,17 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
241
246
|
) ? "left" : void 0
|
|
242
247
|
), Pe = n(
|
|
243
248
|
() => S(o.loading) ? p.loading : o.loading
|
|
244
|
-
),
|
|
249
|
+
), Ae = n(
|
|
245
250
|
() => S(o.dataSource) ? p.records : o.dataSource
|
|
246
|
-
), { selectedRows:
|
|
251
|
+
), { selectedRows: A, rowSelection: h, ...v } = ht({
|
|
247
252
|
...C.value,
|
|
248
|
-
dataSource:
|
|
253
|
+
dataSource: Ae,
|
|
249
254
|
rowKey: o.rowKey
|
|
250
|
-
}),
|
|
255
|
+
}), ze = ({
|
|
251
256
|
checked: e
|
|
252
257
|
}) => {
|
|
253
258
|
const a = l.value;
|
|
254
|
-
a && a &&
|
|
259
|
+
a && a && v.selectChange(
|
|
255
260
|
e,
|
|
256
261
|
a.getCheckboxRecords(),
|
|
257
262
|
a.getCheckboxReserveRecords()
|
|
@@ -260,20 +265,20 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
260
265
|
checked: e
|
|
261
266
|
}) => {
|
|
262
267
|
const a = l.value;
|
|
263
|
-
a &&
|
|
268
|
+
a && v.selectAllChange(e, [
|
|
264
269
|
...a.getCheckboxReserveRecords(),
|
|
265
270
|
...a.getCheckboxRecords()
|
|
266
271
|
]);
|
|
267
272
|
}, Ke = () => {
|
|
268
273
|
const e = l.value;
|
|
269
|
-
e &&
|
|
274
|
+
e && v.selectRangeChange(e.getCheckboxRecords(), [
|
|
270
275
|
...e.getCheckboxReserveRecords(),
|
|
271
276
|
...e.getCheckboxRecords()
|
|
272
277
|
]);
|
|
273
|
-
},
|
|
278
|
+
}, Le = () => {
|
|
274
279
|
const e = l.value;
|
|
275
|
-
e && (
|
|
276
|
-
},
|
|
280
|
+
e && (A.value = [e.getRadioRecord()]);
|
|
281
|
+
}, Ve = ({
|
|
277
282
|
row: e
|
|
278
283
|
}) => {
|
|
279
284
|
const a = o.rowHighlightable;
|
|
@@ -298,13 +303,13 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
298
303
|
function Z() {
|
|
299
304
|
g.value?.resetSorterItems();
|
|
300
305
|
}
|
|
301
|
-
function
|
|
302
|
-
|
|
306
|
+
function z() {
|
|
307
|
+
v.clearAll();
|
|
303
308
|
const e = l.value;
|
|
304
309
|
e && (h.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
|
|
305
310
|
}
|
|
306
311
|
function De(e) {
|
|
307
|
-
D(o.rowKey) || (
|
|
312
|
+
D(o.rowKey) || (v.selectMultiByKeys(e), ee());
|
|
308
313
|
}
|
|
309
314
|
function $e(e) {
|
|
310
315
|
const a = l.value;
|
|
@@ -325,25 +330,25 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
325
330
|
);
|
|
326
331
|
});
|
|
327
332
|
}
|
|
328
|
-
function
|
|
333
|
+
function Ge(e) {
|
|
329
334
|
ee(), o.onReady && oe(() => {
|
|
330
335
|
o.onReady(e);
|
|
331
336
|
});
|
|
332
337
|
}
|
|
333
|
-
async function
|
|
338
|
+
async function Me(e, a) {
|
|
334
339
|
const r = p.records[e];
|
|
335
340
|
if (r)
|
|
336
341
|
return l.value?.scrollToRow(r, a);
|
|
337
342
|
}
|
|
338
|
-
const
|
|
339
|
-
async function
|
|
343
|
+
const je = (e) => D(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
|
|
344
|
+
async function qe(e, a = !0) {
|
|
340
345
|
const r = l.value;
|
|
341
346
|
if (!r)
|
|
342
347
|
return;
|
|
343
|
-
const f = ot(e) ? e : [e],
|
|
344
|
-
(Ue) => f.includes(
|
|
348
|
+
const f = ot(e) ? e : [e], He = (r.getData() || []).filter(
|
|
349
|
+
(Ue) => f.includes(je(Ue))
|
|
345
350
|
);
|
|
346
|
-
r.setRowExpand(
|
|
351
|
+
r.setRowExpand(He, a);
|
|
347
352
|
}
|
|
348
353
|
return E(
|
|
349
354
|
() => [o.columnResizable, o.columns],
|
|
@@ -374,17 +379,17 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
374
379
|
), pe({
|
|
375
380
|
submit: N,
|
|
376
381
|
reset: P,
|
|
377
|
-
refresh:
|
|
382
|
+
refresh: q,
|
|
378
383
|
submitWith: U,
|
|
379
384
|
setSearchFormValues: X,
|
|
380
385
|
getSearchFormValues: J,
|
|
381
386
|
getShowColumns: () => t(i),
|
|
382
387
|
rowSelection: {
|
|
383
|
-
selectedRows: n(() =>
|
|
388
|
+
selectedRows: n(() => A.value),
|
|
384
389
|
setSelectedRowKeys: De,
|
|
385
|
-
clearAll:
|
|
390
|
+
clearAll: z
|
|
386
391
|
},
|
|
387
|
-
scrollToRow:
|
|
392
|
+
scrollToRow: Me,
|
|
388
393
|
getDataSource: () => t(p.records),
|
|
389
394
|
setCurrentRow: $e,
|
|
390
395
|
getPaging: Fe,
|
|
@@ -392,12 +397,12 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
392
397
|
getSearchFormSorterItems: Q,
|
|
393
398
|
setSearchFormSorterItems: Y,
|
|
394
399
|
resetSearchFormSorterItems: Z,
|
|
395
|
-
setRowExpand:
|
|
400
|
+
setRowExpand: qe
|
|
396
401
|
}), (e, a) => (s(), I("div", {
|
|
397
402
|
class: m(be.value),
|
|
398
403
|
style: _(e.wrapperStyle)
|
|
399
404
|
}, [
|
|
400
|
-
t(S)(e.dataSource) && e.searchForm !== !1 &&
|
|
405
|
+
t(S)(e.dataSource) && e.searchForm !== !1 && G.value.length > 0 ? (s(), I("div", {
|
|
401
406
|
key: 0,
|
|
402
407
|
class: m(e.card ? t(x)("search-wrapper") : null),
|
|
403
408
|
style: _(e.searchFormWrapperStyle)
|
|
@@ -406,12 +411,12 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
406
411
|
ref_key: "formRef",
|
|
407
412
|
ref: g,
|
|
408
413
|
"custom-reset": "",
|
|
409
|
-
"submit-loading": t(
|
|
414
|
+
"submit-loading": t(H).loading,
|
|
410
415
|
onSubmit: t(N),
|
|
411
416
|
onReset: t(P)
|
|
412
|
-
}),
|
|
417
|
+
}), L({
|
|
413
418
|
default: c(() => [
|
|
414
|
-
(s(!0), I(ae, null,
|
|
419
|
+
(s(!0), I(ae, null, V(G.value, (r) => (s(), d(B(r.renderNode), {
|
|
415
420
|
key: r.dataIndex
|
|
416
421
|
}))), 128))
|
|
417
422
|
]),
|
|
@@ -425,7 +430,7 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
425
430
|
key: "0"
|
|
426
431
|
} : void 0
|
|
427
432
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
428
|
-
], 6)) :
|
|
433
|
+
], 6)) : y("", !0),
|
|
429
434
|
w("div", {
|
|
430
435
|
class: m([t(x)("table-wrapper"), e.card ? t(x)("table-wrapper-card") : null]),
|
|
431
436
|
style: _(e.tableWrapperStyle)
|
|
@@ -434,10 +439,10 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
434
439
|
class: m(t(u)("header-wrapper"))
|
|
435
440
|
}, [
|
|
436
441
|
O(e.$slots, "title", {
|
|
437
|
-
selectedRows: t(
|
|
442
|
+
selectedRows: t(A),
|
|
438
443
|
selectedRowKeys: t(h).selectedRowKeys,
|
|
439
444
|
shownColumns: i.value,
|
|
440
|
-
clearAll:
|
|
445
|
+
clearAll: z
|
|
441
446
|
})
|
|
442
447
|
], 2),
|
|
443
448
|
w("div", {
|
|
@@ -449,23 +454,23 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
449
454
|
key: t(we),
|
|
450
455
|
data: t(p).records,
|
|
451
456
|
"sort-config": {
|
|
452
|
-
remote:
|
|
457
|
+
remote: M.value.length > 0,
|
|
453
458
|
trigger: "cell"
|
|
454
459
|
},
|
|
455
460
|
"filter-config": {
|
|
456
|
-
remote:
|
|
461
|
+
remote: j.value.length > 0
|
|
457
462
|
},
|
|
458
463
|
loading: Pe.value,
|
|
459
464
|
style: t(he),
|
|
460
465
|
size: k.value,
|
|
461
466
|
onSortChange: t(Ie),
|
|
462
467
|
onFilterChange: t(Be),
|
|
463
|
-
onCheckboxChange:
|
|
468
|
+
onCheckboxChange: ze,
|
|
464
469
|
onCheckboxRangeChange: Ke,
|
|
465
470
|
onCheckboxAll: _e,
|
|
466
|
-
onRadioChange:
|
|
467
|
-
onCurrentRowChange:
|
|
468
|
-
}),
|
|
471
|
+
onRadioChange: Le,
|
|
472
|
+
onCurrentRowChange: Ve
|
|
473
|
+
}), L({
|
|
469
474
|
empty: c(() => [
|
|
470
475
|
K(t(ie), {
|
|
471
476
|
image: t(ie).PRESENTED_IMAGE_SIMPLE
|
|
@@ -479,7 +484,7 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
479
484
|
], 2)
|
|
480
485
|
]),
|
|
481
486
|
default: c(() => [
|
|
482
|
-
o.expandable && i.value.length ? (s(), d(t(ne), R({ key: 0 }, t(mt)(e.expandable), { fixed: Ne.value }),
|
|
487
|
+
o.expandable && i.value.length ? (s(), d(t(ne), R({ key: 0 }, t(mt)(e.expandable), { fixed: Ne.value }), L({
|
|
483
488
|
content: c((r) => [
|
|
484
489
|
(s(), d(B(o.expandable.renderContent(r))))
|
|
485
490
|
]),
|
|
@@ -497,7 +502,7 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
497
502
|
]),
|
|
498
503
|
key: "0"
|
|
499
504
|
} : void 0
|
|
500
|
-
]), 1040, ["fixed"])) :
|
|
505
|
+
]), 1040, ["fixed"])) : y("", !0),
|
|
501
506
|
C.value && i.value.length ? (s(), d(t(ne), R(
|
|
502
507
|
{ key: 1 },
|
|
503
508
|
t(gt)(t(h), i.value, o.size),
|
|
@@ -505,14 +510,14 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
505
510
|
resizable: !1,
|
|
506
511
|
field: t(wt)
|
|
507
512
|
}
|
|
508
|
-
), null, 16, ["field"])) :
|
|
509
|
-
(s(!0), I(ae, null,
|
|
513
|
+
), null, 16, ["field"])) : y("", !0),
|
|
514
|
+
(s(!0), I(ae, null, V(t(ye), (r) => (s(), d(B(r), {
|
|
510
515
|
key: r.props.colId
|
|
511
516
|
}))), 128))
|
|
512
517
|
]),
|
|
513
518
|
_: 2
|
|
514
519
|
}, [
|
|
515
|
-
|
|
520
|
+
V(t(at)(T, ["searchFormExtra"]), (r, f) => ({
|
|
516
521
|
name: f,
|
|
517
522
|
fn: c((te) => [
|
|
518
523
|
O(e.$slots, f, Ze(et(te || {})))
|
|
@@ -523,23 +528,23 @@ const eo = /* @__PURE__ */ Xe({
|
|
|
523
528
|
w("div", {
|
|
524
529
|
class: m(t(u)("pagination-wrapper"))
|
|
525
530
|
}, [
|
|
526
|
-
e.sticky ? (s(), d(t(
|
|
531
|
+
e.sticky ? (s(), d(t(Bt), {
|
|
527
532
|
key: 0,
|
|
528
533
|
direction: "horizontal",
|
|
529
534
|
"scroll-container": Re.value,
|
|
530
535
|
"extra-size": -4.2,
|
|
531
536
|
"bar-color": "var(--ap-scrollbar-thumb-color-base)",
|
|
532
537
|
"track-color": "var(--ap-table-header-bg, #f2f6f9)"
|
|
533
|
-
}, null, 8, ["scroll-container"])) :
|
|
538
|
+
}, null, 8, ["scroll-container"])) : y("", !0),
|
|
534
539
|
e.pagination !== !1 ? (s(), d(t(ct), R({
|
|
535
540
|
key: 1,
|
|
536
541
|
class: t(u)("pagination")
|
|
537
|
-
}, t(
|
|
542
|
+
}, t(H).pagination, { onChange: t(Te) }), null, 16, ["class", "onChange"])) : y("", !0)
|
|
538
543
|
], 2)
|
|
539
544
|
], 6)
|
|
540
545
|
], 6));
|
|
541
546
|
}
|
|
542
547
|
});
|
|
543
548
|
export {
|
|
544
|
-
|
|
549
|
+
ao as default
|
|
545
550
|
};
|
|
@@ -30,7 +30,7 @@ declare const __VLS_component: DefineComponent<ApProCardStatisticProps, {}, {},
|
|
|
30
30
|
}> | null | undefined)[] | VNode<RendererNode, RendererElement, {
|
|
31
31
|
[key: string]: any;
|
|
32
32
|
}> | null;
|
|
33
|
-
status: "error" | "default" | "
|
|
33
|
+
status: "error" | "default" | "warning" | "success" | "processing";
|
|
34
34
|
prefix: string | number | boolean | void | VNode<RendererNode, RendererElement, {
|
|
35
35
|
[key: string]: any;
|
|
36
36
|
}> | (string | number | boolean | void | VNode<RendererNode, RendererElement, {
|