@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
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VxeUI as
|
|
1
|
+
import { defineComponent as He, useSlots as Ue, getCurrentInstance as Ge, ref as I, computed as l, unref as a, toRef as Xe, nextTick as ae, watch as B, createElementBlock as P, openBlock as d, normalizeStyle as _, normalizeClass as h, createCommentVNode as S, createElementVNode as R, createVNode as K, mergeProps as b, createSlots as re, withCtx as C, Fragment as ne, renderList as V, createBlock as f, resolveDynamicComponent as L, renderSlot as D, normalizeProps as Je, guardReactiveProps as Qe } from "vue";
|
|
2
|
+
import { VxeUI as le, VxeTable as Ye, VxeColumn as se } from "vxe-table";
|
|
3
3
|
import "vxe-table/es/style.css";
|
|
4
|
-
import { isUndefined as x, isFunction as
|
|
5
|
-
import { ApForm as
|
|
4
|
+
import { isUndefined as x, isFunction as $, isArray as Ze, omit as et } from "lodash-unified";
|
|
5
|
+
import { ApForm as tt } from "../ap-form/index.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
|
-
import { noRenderAsFormItemValueList as
|
|
8
|
-
import { getColumnOrder as
|
|
9
|
-
import { useTablePaging as
|
|
10
|
-
import { Spin as
|
|
11
|
-
import { useInnerParams as
|
|
12
|
-
import { toVxeProps as
|
|
13
|
-
import
|
|
14
|
-
import { useProvideApTable as
|
|
15
|
-
import { sizeReverseMap as
|
|
16
|
-
import { useRenderColumns as
|
|
17
|
-
import { useToken as
|
|
7
|
+
import { noRenderAsFormItemValueList as ot } from "../ap-table/constants.mjs";
|
|
8
|
+
import { getColumnOrder as ie, updateFormProps as at, getFieldProps as rt, getSearchFormItemRenderNode as nt, recursionApColumns as de } from "../ap-table/utils.mjs";
|
|
9
|
+
import { useTablePaging as lt } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
10
|
+
import { Spin as st, Empty as ue, Pagination as it } from "@aplus-frontend/antdv";
|
|
11
|
+
import { useInnerParams as dt } from "./hooks/use-inner-params.mjs";
|
|
12
|
+
import { toVxeProps as ut, getRowExpandProps as ct, getRowSelectionProps as ft } from "./utils/table.mjs";
|
|
13
|
+
import pt from "./hooks/use-row-selection.mjs";
|
|
14
|
+
import { useProvideApTable as mt } from "../ap-table/context.mjs";
|
|
15
|
+
import { sizeReverseMap as gt, sizeMap as ht, ROW_SELECTION_FIELD as Ct } from "./constants.mjs";
|
|
16
|
+
import { useRenderColumns as yt } from "./hooks/use-render-columns.mjs";
|
|
17
|
+
import { useToken as vt } from "@aplus-frontend/antdv/es/theme/internal";
|
|
18
18
|
import "../scroll-bar/index.mjs";
|
|
19
|
-
import { isDef as
|
|
20
|
-
import { getValidVNodeList as
|
|
21
|
-
import { useTableStyle as
|
|
22
|
-
import { useNamespace as
|
|
23
|
-
import { useGlobalConfig as
|
|
24
|
-
import { useLocale as
|
|
25
|
-
import
|
|
26
|
-
const
|
|
19
|
+
import { isDef as wt } from "../utils/index.mjs";
|
|
20
|
+
import { getValidVNodeList as St } from "../utils/slot.mjs";
|
|
21
|
+
import { useTableStyle as Rt } from "./hooks/use-table-style.mjs";
|
|
22
|
+
import { useNamespace as bt } from "../config-provider/hooks/use-namespace.mjs";
|
|
23
|
+
import { useGlobalConfig as xt } from "../config-provider/hooks/use-global-config.mjs";
|
|
24
|
+
import { useLocale as kt } from "../config-provider/hooks/use-locale.mjs";
|
|
25
|
+
import Ft from "../scroll-bar/index.vue.mjs";
|
|
26
|
+
const Yt = /* @__PURE__ */ He({
|
|
27
27
|
name: "ApGrid",
|
|
28
28
|
__name: "index",
|
|
29
29
|
props: {
|
|
@@ -112,83 +112,84 @@ const Gt = /* @__PURE__ */ $e({
|
|
|
112
112
|
expandable: {},
|
|
113
113
|
value: {},
|
|
114
114
|
rowHighlightable: { type: [Boolean, Function], default: !1 },
|
|
115
|
-
treeConfig: {}
|
|
115
|
+
treeConfig: {},
|
|
116
|
+
onReady: {}
|
|
116
117
|
},
|
|
117
|
-
setup(
|
|
118
|
-
var
|
|
119
|
-
const v =
|
|
120
|
-
k && !k.__VXE_PC_UI_INSTALLED__ && (k.use(
|
|
121
|
-
const { e: F, b:
|
|
122
|
-
|
|
123
|
-
i18n: (e, t) =>
|
|
118
|
+
setup(ce, { expose: fe }) {
|
|
119
|
+
var te;
|
|
120
|
+
const v = Ue(), o = ce, k = (te = Ge()) == null ? void 0 : te.appContext.app;
|
|
121
|
+
k && !k.__VXE_PC_UI_INSTALLED__ && (k.use(le), k.__VXE_PC_UI_INSTALLED__ = !0);
|
|
122
|
+
const { e: F, b: c, be: pe } = bt("ap-grid"), me = xt("valueTypeMap"), i = I([]), O = I([]), s = I(), E = I(o.size), ge = Rt(), [, he] = vt(), { t: Ce } = kt();
|
|
123
|
+
le.setConfig({
|
|
124
|
+
i18n: (e, t) => Ce(`ap.${e}`, t)
|
|
124
125
|
});
|
|
125
|
-
const { renderConfig:
|
|
126
|
-
let
|
|
127
|
-
const
|
|
126
|
+
const { renderConfig: ye, updateSignal: ve } = yt(i);
|
|
127
|
+
let W = 0;
|
|
128
|
+
const we = l(() => {
|
|
128
129
|
if (s.value)
|
|
129
130
|
return s.value.$el.querySelector(
|
|
130
131
|
".vxe-table--header-inner-wrapper"
|
|
131
132
|
);
|
|
132
|
-
}),
|
|
133
|
-
var e, t,
|
|
134
|
-
return
|
|
135
|
-
(r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !
|
|
136
|
-
)) == null ? void 0 : t.sort((r,
|
|
137
|
-
let
|
|
138
|
-
return
|
|
139
|
-
})) == null ? void 0 :
|
|
140
|
-
const
|
|
133
|
+
}), M = l(() => {
|
|
134
|
+
var e, t, n;
|
|
135
|
+
return W++, ((n = (t = (e = o.columns) == null ? void 0 : e.filter(
|
|
136
|
+
(r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !ot.includes(r.valueType)
|
|
137
|
+
)) == null ? void 0 : t.sort((r, u) => {
|
|
138
|
+
let g = ie(r.order);
|
|
139
|
+
return ie(u.order) - g;
|
|
140
|
+
})) == null ? void 0 : n.map((r) => {
|
|
141
|
+
const u = at(
|
|
141
142
|
r,
|
|
142
|
-
|
|
143
|
-
),
|
|
143
|
+
rt(r.fieldProps, {})
|
|
144
|
+
), g = {
|
|
144
145
|
...r,
|
|
145
146
|
fieldProps: {
|
|
146
147
|
label: r.title,
|
|
147
148
|
name: r.dataIndex,
|
|
148
149
|
// tips: 在表格中的查询表单项默认是带边框的
|
|
149
150
|
bordered: !0,
|
|
150
|
-
...
|
|
151
|
-
_signal:
|
|
151
|
+
...u || {},
|
|
152
|
+
_signal: W
|
|
152
153
|
},
|
|
153
154
|
renderNode: void 0
|
|
154
155
|
};
|
|
155
|
-
return
|
|
156
|
-
|
|
157
|
-
a(
|
|
158
|
-
),
|
|
156
|
+
return g.renderNode = nt(
|
|
157
|
+
g,
|
|
158
|
+
a(me)
|
|
159
|
+
), g;
|
|
159
160
|
})) || [];
|
|
160
|
-
}),
|
|
161
|
+
}), Se = l(() => {
|
|
161
162
|
var t;
|
|
162
|
-
return
|
|
163
|
+
return wt(o.manual) ? o.manual : St(((t = v.searchFormExtra) == null ? void 0 : t.call(v)) || []).some((n) => {
|
|
163
164
|
var r;
|
|
164
|
-
return ((r =
|
|
165
|
+
return ((r = n.type) == null ? void 0 : r.name) === "ApView";
|
|
165
166
|
});
|
|
166
|
-
}),
|
|
167
|
-
|
|
168
|
-
o.card ? null :
|
|
169
|
-
o.adaptive ?
|
|
170
|
-
o.sticky ?
|
|
171
|
-
].filter(Boolean)),
|
|
167
|
+
}), Re = l(() => [
|
|
168
|
+
c(),
|
|
169
|
+
o.card ? null : c("wrapper"),
|
|
170
|
+
o.adaptive ? c("adaptive") : null,
|
|
171
|
+
o.sticky ? c("sticky") : null
|
|
172
|
+
].filter(Boolean)), j = l(() => de(a(i), (e) => {
|
|
172
173
|
if (e.sorter === !0)
|
|
173
174
|
return e.key || e.dataIndex;
|
|
174
|
-
}).filter(Boolean)),
|
|
175
|
+
}).filter(Boolean)), q = l(() => de(a(i), (e) => {
|
|
175
176
|
if (e.filters && !e.onFilter)
|
|
176
177
|
return e.key || e.dataIndex;
|
|
177
178
|
}).filter(Boolean)), {
|
|
178
|
-
formRef:
|
|
179
|
+
formRef: y,
|
|
179
180
|
submit: T,
|
|
180
181
|
reset: N,
|
|
181
182
|
refresh: H,
|
|
182
183
|
data: p,
|
|
183
|
-
tableProps:
|
|
184
|
-
setDataSource:
|
|
185
|
-
handleTableChangeOptional:
|
|
186
|
-
getPaging:
|
|
187
|
-
setPaging:
|
|
188
|
-
submitWith:
|
|
189
|
-
} =
|
|
184
|
+
tableProps: U,
|
|
185
|
+
setDataSource: be,
|
|
186
|
+
handleTableChangeOptional: xe,
|
|
187
|
+
getPaging: ke,
|
|
188
|
+
setPaging: Fe,
|
|
189
|
+
submitWith: G
|
|
190
|
+
} = lt({
|
|
190
191
|
async request(e) {
|
|
191
|
-
var
|
|
192
|
+
var n;
|
|
192
193
|
if (!m.value.preserveSelectedRowKeys && x(o.dataSource) && A(), !x(o.dataSource)) {
|
|
193
194
|
const r = e.pageSize * (e.current - 1);
|
|
194
195
|
return {
|
|
@@ -196,139 +197,139 @@ const Gt = /* @__PURE__ */ $e({
|
|
|
196
197
|
total: o.dataSource.length || 0
|
|
197
198
|
};
|
|
198
199
|
}
|
|
199
|
-
const t = await ((
|
|
200
|
+
const t = await ((n = o.request) == null ? void 0 : n.call(o, e));
|
|
200
201
|
return {
|
|
201
202
|
data: (t == null ? void 0 : t.data) || [],
|
|
202
203
|
total: (t == null ? void 0 : t.total) || 0
|
|
203
204
|
};
|
|
204
205
|
},
|
|
205
206
|
namespace: "ap-grid",
|
|
206
|
-
filterFields:
|
|
207
|
-
sortFields:
|
|
208
|
-
params:
|
|
207
|
+
filterFields: q,
|
|
208
|
+
sortFields: j,
|
|
209
|
+
params: Xe(o, "params"),
|
|
209
210
|
defaultData: o.defaultData,
|
|
210
|
-
manual: a(
|
|
211
|
+
manual: a(Se),
|
|
211
212
|
formatParams: o.beforeSearchSubmit,
|
|
212
213
|
pagination: o.pagination,
|
|
213
|
-
onClickReset:
|
|
214
|
-
onAfterRequest:
|
|
215
|
-
}), { sortChangeEvent:
|
|
216
|
-
|
|
217
|
-
columns:
|
|
218
|
-
columnsBackup:
|
|
219
|
-
size:
|
|
214
|
+
onClickReset: Oe,
|
|
215
|
+
onAfterRequest: We
|
|
216
|
+
}), { sortChangeEvent: Ee, filterChangeEvent: Ie, paginationChangeEvent: Be } = dt(xe);
|
|
217
|
+
mt({
|
|
218
|
+
columns: l(() => i.value),
|
|
219
|
+
columnsBackup: l(() => O.value),
|
|
220
|
+
size: l(() => ht[E.value]),
|
|
220
221
|
updateColumns(e) {
|
|
221
222
|
var t;
|
|
222
223
|
i.value = e, (t = o.onShownColumnsChange) == null || t.call(o, e);
|
|
223
224
|
},
|
|
224
225
|
updateSize(e) {
|
|
225
|
-
|
|
226
|
+
E.value = gt[e];
|
|
226
227
|
},
|
|
227
|
-
renderConfig:
|
|
228
|
-
className:
|
|
229
|
-
color:
|
|
228
|
+
renderConfig: l(() => ({
|
|
229
|
+
className: pe("table-header", "title"),
|
|
230
|
+
color: he.value.colorTextTertiary
|
|
230
231
|
})),
|
|
231
|
-
dataSource:
|
|
232
|
-
getSearchFormValues:
|
|
233
|
-
setSearchFormValues:
|
|
232
|
+
dataSource: l(() => a(p).records),
|
|
233
|
+
getSearchFormValues: J,
|
|
234
|
+
setSearchFormValues: X,
|
|
234
235
|
submit: T,
|
|
235
|
-
submitWith:
|
|
236
|
+
submitWith: G,
|
|
236
237
|
reset: N,
|
|
237
238
|
refresh: H,
|
|
238
|
-
getSearchFormSorterItems:
|
|
239
|
-
setSearchFormSorterItems:
|
|
240
|
-
resetSearchFormSorterItems:
|
|
239
|
+
getSearchFormSorterItems: Q,
|
|
240
|
+
setSearchFormSorterItems: Y,
|
|
241
|
+
resetSearchFormSorterItems: Z
|
|
241
242
|
});
|
|
242
|
-
const
|
|
243
|
+
const Pe = l(
|
|
243
244
|
() => i.value.some(
|
|
244
245
|
(e) => e.fixed === "left" || e.fixed === !0
|
|
245
246
|
) ? "left" : void 0
|
|
246
|
-
),
|
|
247
|
+
), Te = l(
|
|
247
248
|
() => x(o.loading) ? p.loading : o.loading
|
|
248
|
-
),
|
|
249
|
+
), Ne = l(
|
|
249
250
|
() => x(o.dataSource) ? p.records : o.dataSource
|
|
250
|
-
), { selectedRows: z, rowSelection: m, ...
|
|
251
|
+
), { selectedRows: z, rowSelection: m, ...w } = pt({
|
|
251
252
|
...o.rowSelection === !0 ? {} : o.rowSelection,
|
|
252
|
-
dataSource:
|
|
253
|
+
dataSource: Ne,
|
|
253
254
|
rowKey: o.rowKey
|
|
254
|
-
}),
|
|
255
|
+
}), ze = ({
|
|
255
256
|
checked: e
|
|
256
257
|
}) => {
|
|
257
258
|
const t = s.value;
|
|
258
|
-
t && t &&
|
|
259
|
+
t && t && w.selectChange(
|
|
259
260
|
e,
|
|
260
261
|
t.getCheckboxRecords(),
|
|
261
262
|
t.getCheckboxReserveRecords()
|
|
262
263
|
);
|
|
263
|
-
},
|
|
264
|
+
}, Ae = ({
|
|
264
265
|
checked: e
|
|
265
266
|
}) => {
|
|
266
267
|
const t = s.value;
|
|
267
|
-
t &&
|
|
268
|
+
t && w.selectAllChange(e, [
|
|
268
269
|
...t.getCheckboxReserveRecords(),
|
|
269
270
|
...t.getCheckboxRecords()
|
|
270
271
|
]);
|
|
271
|
-
},
|
|
272
|
+
}, _e = () => {
|
|
272
273
|
const e = s.value;
|
|
273
|
-
e &&
|
|
274
|
+
e && w.selectRangeChange(e.getCheckboxRecords(), [
|
|
274
275
|
...e.getCheckboxReserveRecords(),
|
|
275
276
|
...e.getCheckboxRecords()
|
|
276
277
|
]);
|
|
277
|
-
},
|
|
278
|
+
}, Ke = () => {
|
|
278
279
|
const e = s.value;
|
|
279
280
|
e && (z.value = [e.getRadioRecord()]);
|
|
280
281
|
}, Ve = ({
|
|
281
282
|
row: e
|
|
282
283
|
}) => {
|
|
283
284
|
const t = o.rowHighlightable;
|
|
284
|
-
|
|
285
|
+
$(t) && t(e);
|
|
285
286
|
};
|
|
286
|
-
function
|
|
287
|
+
function Le() {
|
|
287
288
|
var e;
|
|
288
289
|
return ((e = o.columns) == null ? void 0 : e.filter((t) => !t.hideInTable)) || [];
|
|
289
290
|
}
|
|
290
|
-
function
|
|
291
|
-
var t,
|
|
292
|
-
(r = (
|
|
291
|
+
function X(e) {
|
|
292
|
+
var t, n, r;
|
|
293
|
+
(r = (n = (t = y.value) == null ? void 0 : t.apForm) == null ? void 0 : n.setFieldsValue) == null || r.call(n, e);
|
|
293
294
|
}
|
|
294
|
-
function
|
|
295
|
-
var
|
|
295
|
+
function J(e = !1) {
|
|
296
|
+
var n, r, u;
|
|
296
297
|
const t = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
297
|
-
return (
|
|
298
|
+
return (u = (r = (n = y.value) == null ? void 0 : n.apForm) == null ? void 0 : r[t]) == null ? void 0 : u.call(r, !0);
|
|
298
299
|
}
|
|
299
|
-
function
|
|
300
|
+
function Q() {
|
|
300
301
|
var e;
|
|
301
|
-
return ((e =
|
|
302
|
+
return ((e = y.value) == null ? void 0 : e.getSorterItems()) || [];
|
|
302
303
|
}
|
|
303
|
-
function
|
|
304
|
+
function Y(e) {
|
|
304
305
|
var t;
|
|
305
|
-
(t =
|
|
306
|
+
(t = y.value) == null || t.setSorterItems(e);
|
|
306
307
|
}
|
|
307
|
-
function
|
|
308
|
+
function Z() {
|
|
308
309
|
var e;
|
|
309
|
-
(e =
|
|
310
|
+
(e = y.value) == null || e.resetSorterItems();
|
|
310
311
|
}
|
|
311
312
|
function A() {
|
|
312
|
-
|
|
313
|
+
w.clearAll();
|
|
313
314
|
const e = s.value;
|
|
314
315
|
e && (m.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
|
|
315
316
|
}
|
|
316
|
-
function
|
|
317
|
-
|
|
317
|
+
function De(e) {
|
|
318
|
+
$(o.rowKey) || (w.selectMultiByKeys(e), ee());
|
|
318
319
|
}
|
|
319
|
-
function
|
|
320
|
+
function $e(e) {
|
|
320
321
|
const t = s.value;
|
|
321
322
|
if (!t)
|
|
322
323
|
return;
|
|
323
|
-
const
|
|
324
|
+
const n = String(e[o.rowKey]), r = t.getRowById(n);
|
|
324
325
|
t.setCurrentRow(r);
|
|
325
326
|
}
|
|
326
|
-
function
|
|
327
|
+
function Oe() {
|
|
327
328
|
const e = s.value;
|
|
328
329
|
e && (e.clearSort(), e.clearFilter());
|
|
329
330
|
}
|
|
330
|
-
function
|
|
331
|
-
|
|
331
|
+
function ee() {
|
|
332
|
+
ae(() => {
|
|
332
333
|
var e, t;
|
|
333
334
|
m.value.type === "radio" ? (e = s.value) == null || e.setRadioRowKey(m.value.selectedRowKeys[0]) : (t = s.value) == null || t.setCheckboxRowKey(
|
|
334
335
|
m.value.selectedRowKeys,
|
|
@@ -336,17 +337,32 @@ const Gt = /* @__PURE__ */ $e({
|
|
|
336
337
|
);
|
|
337
338
|
});
|
|
338
339
|
}
|
|
339
|
-
|
|
340
|
+
function We(e) {
|
|
341
|
+
ee(), o.onReady && ae(() => {
|
|
342
|
+
o.onReady(e);
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
async function Me(e, t) {
|
|
340
346
|
var r;
|
|
341
|
-
const
|
|
342
|
-
if (
|
|
343
|
-
return (r = s.value) == null ? void 0 : r.scrollToRow(
|
|
347
|
+
const n = p.records[e];
|
|
348
|
+
if (n)
|
|
349
|
+
return (r = s.value) == null ? void 0 : r.scrollToRow(n, t);
|
|
350
|
+
}
|
|
351
|
+
const je = (e) => $(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
|
|
352
|
+
async function qe(e, t = !0) {
|
|
353
|
+
const n = s.value;
|
|
354
|
+
if (!n)
|
|
355
|
+
return;
|
|
356
|
+
const r = Ze(e) ? e : [e], g = (n.getData() || []).filter(
|
|
357
|
+
(oe) => r.includes(je(oe))
|
|
358
|
+
);
|
|
359
|
+
n.setRowExpand(g, t);
|
|
344
360
|
}
|
|
345
361
|
return B(
|
|
346
362
|
() => [o.columnResizable, o.columns],
|
|
347
363
|
() => {
|
|
348
364
|
var t;
|
|
349
|
-
const e =
|
|
365
|
+
const e = Le();
|
|
350
366
|
i.value = e, (t = o.onShownColumnsChange) == null || t.call(o, e), O.value = e;
|
|
351
367
|
},
|
|
352
368
|
{
|
|
@@ -356,7 +372,7 @@ const Gt = /* @__PURE__ */ $e({
|
|
|
356
372
|
), B(
|
|
357
373
|
() => o.dataSource,
|
|
358
374
|
(e) => {
|
|
359
|
-
|
|
375
|
+
be(e);
|
|
360
376
|
},
|
|
361
377
|
{ immediate: !0, deep: !0 }
|
|
362
378
|
), B(
|
|
@@ -368,68 +384,69 @@ const Gt = /* @__PURE__ */ $e({
|
|
|
368
384
|
), B(
|
|
369
385
|
() => o.size,
|
|
370
386
|
(e) => {
|
|
371
|
-
|
|
387
|
+
E.value = e;
|
|
372
388
|
}
|
|
373
|
-
),
|
|
389
|
+
), fe({
|
|
374
390
|
submit: T,
|
|
375
391
|
reset: N,
|
|
376
392
|
refresh: H,
|
|
377
|
-
submitWith:
|
|
378
|
-
setSearchFormValues:
|
|
379
|
-
getSearchFormValues:
|
|
393
|
+
submitWith: G,
|
|
394
|
+
setSearchFormValues: X,
|
|
395
|
+
getSearchFormValues: J,
|
|
380
396
|
getShowColumns: () => a(i),
|
|
381
397
|
rowSelection: {
|
|
382
|
-
selectedRows:
|
|
383
|
-
setSelectedRowKeys:
|
|
398
|
+
selectedRows: l(() => z.value),
|
|
399
|
+
setSelectedRowKeys: De,
|
|
384
400
|
clearAll: A
|
|
385
401
|
},
|
|
386
|
-
scrollToRow:
|
|
402
|
+
scrollToRow: Me,
|
|
387
403
|
getDataSource: () => a(p.records),
|
|
388
|
-
setCurrentRow:
|
|
389
|
-
getPaging:
|
|
390
|
-
setPaging:
|
|
391
|
-
getSearchFormSorterItems:
|
|
392
|
-
setSearchFormSorterItems:
|
|
393
|
-
resetSearchFormSorterItems:
|
|
404
|
+
setCurrentRow: $e,
|
|
405
|
+
getPaging: ke,
|
|
406
|
+
setPaging: Fe,
|
|
407
|
+
getSearchFormSorterItems: Q,
|
|
408
|
+
setSearchFormSorterItems: Y,
|
|
409
|
+
resetSearchFormSorterItems: Z,
|
|
410
|
+
setRowExpand: qe
|
|
394
411
|
}), (e, t) => (d(), P("div", {
|
|
395
|
-
class:
|
|
396
|
-
style:
|
|
412
|
+
class: h(Re.value),
|
|
413
|
+
style: _(e.wrapperStyle)
|
|
397
414
|
}, [
|
|
398
|
-
a(x)(e.dataSource) && e.searchForm !== !1 &&
|
|
415
|
+
a(x)(e.dataSource) && e.searchForm !== !1 && M.value.length > 0 ? (d(), P("div", {
|
|
399
416
|
key: 0,
|
|
400
|
-
class:
|
|
401
|
-
style:
|
|
417
|
+
class: h(e.card ? a(F)("search-wrapper") : null),
|
|
418
|
+
style: _(e.searchFormWrapperStyle)
|
|
402
419
|
}, [
|
|
403
|
-
|
|
420
|
+
K(a(tt).SearchForm, b(e.searchForm || {}, {
|
|
404
421
|
ref_key: "formRef",
|
|
405
|
-
ref:
|
|
422
|
+
ref: y,
|
|
406
423
|
"custom-reset": "",
|
|
407
|
-
"submit-loading": a(
|
|
424
|
+
"submit-loading": a(U).loading,
|
|
408
425
|
onSubmit: a(T),
|
|
409
426
|
onReset: a(N)
|
|
410
|
-
}),
|
|
411
|
-
default:
|
|
412
|
-
(d(!0), P(
|
|
413
|
-
key:
|
|
427
|
+
}), re({
|
|
428
|
+
default: C(() => [
|
|
429
|
+
(d(!0), P(ne, null, V(M.value, (n) => (d(), f(L(n.renderNode), {
|
|
430
|
+
key: n.dataIndex
|
|
414
431
|
}))), 128))
|
|
415
432
|
]),
|
|
416
433
|
_: 2
|
|
417
434
|
}, [
|
|
418
435
|
v.searchFormExtra ? {
|
|
419
436
|
name: "extra",
|
|
420
|
-
fn:
|
|
437
|
+
fn: C(() => [
|
|
421
438
|
D(e.$slots, "searchFormExtra")
|
|
422
439
|
]),
|
|
423
440
|
key: "0"
|
|
424
441
|
} : void 0
|
|
425
442
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
426
|
-
], 6)) :
|
|
427
|
-
|
|
428
|
-
class:
|
|
429
|
-
style:
|
|
443
|
+
], 6)) : S("", !0),
|
|
444
|
+
R("div", {
|
|
445
|
+
class: h([a(F)("table-wrapper"), e.card ? a(F)("table-wrapper-card") : null]),
|
|
446
|
+
style: _(e.tableWrapperStyle)
|
|
430
447
|
}, [
|
|
431
|
-
|
|
432
|
-
class:
|
|
448
|
+
R("div", {
|
|
449
|
+
class: h(a(c)("header-wrapper"))
|
|
433
450
|
}, [
|
|
434
451
|
D(e.$slots, "title", {
|
|
435
452
|
selectedRows: a(z),
|
|
@@ -438,93 +455,93 @@ const Gt = /* @__PURE__ */ $e({
|
|
|
438
455
|
clearAll: A
|
|
439
456
|
})
|
|
440
457
|
], 2),
|
|
441
|
-
|
|
442
|
-
class:
|
|
458
|
+
R("div", {
|
|
459
|
+
class: h(a(c)("vxe-wrapper"))
|
|
443
460
|
}, [
|
|
444
|
-
(d(), f(a(
|
|
461
|
+
(d(), f(a(Ye), b(a(ut)(o), {
|
|
445
462
|
ref_key: "tableRef",
|
|
446
463
|
ref: s,
|
|
447
|
-
key: a(
|
|
464
|
+
key: a(ve),
|
|
448
465
|
data: a(p).records,
|
|
449
466
|
"sort-config": {
|
|
450
|
-
remote:
|
|
467
|
+
remote: j.value.length > 0,
|
|
451
468
|
trigger: "cell"
|
|
452
469
|
},
|
|
453
470
|
"filter-config": {
|
|
454
|
-
remote:
|
|
471
|
+
remote: q.value.length > 0
|
|
455
472
|
},
|
|
456
|
-
loading:
|
|
457
|
-
style: a(
|
|
458
|
-
size:
|
|
459
|
-
onSortChange: a(
|
|
460
|
-
onFilterChange: a(
|
|
461
|
-
onCheckboxChange:
|
|
462
|
-
onCheckboxRangeChange:
|
|
463
|
-
onCheckboxAll:
|
|
464
|
-
onRadioChange:
|
|
473
|
+
loading: Te.value,
|
|
474
|
+
style: a(ge),
|
|
475
|
+
size: E.value,
|
|
476
|
+
onSortChange: a(Ee),
|
|
477
|
+
onFilterChange: a(Ie),
|
|
478
|
+
onCheckboxChange: ze,
|
|
479
|
+
onCheckboxRangeChange: _e,
|
|
480
|
+
onCheckboxAll: Ae,
|
|
481
|
+
onRadioChange: Ke,
|
|
465
482
|
onCurrentRowChange: Ve
|
|
466
|
-
}),
|
|
467
|
-
empty:
|
|
468
|
-
|
|
469
|
-
image: a(
|
|
483
|
+
}), re({
|
|
484
|
+
empty: C(() => [
|
|
485
|
+
K(a(ue), {
|
|
486
|
+
image: a(ue).PRESENTED_IMAGE_SIMPLE
|
|
470
487
|
}, null, 8, ["image"])
|
|
471
488
|
]),
|
|
472
|
-
loading:
|
|
473
|
-
|
|
474
|
-
class:
|
|
489
|
+
loading: C(() => [
|
|
490
|
+
R("div", {
|
|
491
|
+
class: h(a(F)("table-loading-wrapper"))
|
|
475
492
|
}, [
|
|
476
|
-
|
|
493
|
+
K(a(st))
|
|
477
494
|
], 2)
|
|
478
495
|
]),
|
|
479
|
-
default:
|
|
480
|
-
o.expandable && i.value.length ? (d(), f(a(
|
|
481
|
-
content:
|
|
482
|
-
(d(), f(L(o.expandable.renderContent(
|
|
496
|
+
default: C(() => [
|
|
497
|
+
o.expandable && i.value.length ? (d(), f(a(se), b({ key: 0 }, a(ct)(e.expandable), { fixed: Pe.value }), {
|
|
498
|
+
content: C((n) => [
|
|
499
|
+
(d(), f(L(o.expandable.renderContent(n))))
|
|
483
500
|
]),
|
|
484
501
|
_: 1
|
|
485
|
-
}, 16, ["fixed"])) :
|
|
486
|
-
o.rowSelection && i.value.length ? (d(), f(a(
|
|
502
|
+
}, 16, ["fixed"])) : S("", !0),
|
|
503
|
+
o.rowSelection && i.value.length ? (d(), f(a(se), b(
|
|
487
504
|
{ key: 1 },
|
|
488
|
-
a(
|
|
505
|
+
a(ft)(a(m), i.value, o.size),
|
|
489
506
|
{
|
|
490
507
|
resizable: !1,
|
|
491
|
-
field: a(
|
|
508
|
+
field: a(Ct)
|
|
492
509
|
}
|
|
493
|
-
), null, 16, ["field"])) :
|
|
494
|
-
(d(!0), P(
|
|
495
|
-
key:
|
|
510
|
+
), null, 16, ["field"])) : S("", !0),
|
|
511
|
+
(d(!0), P(ne, null, V(a(ye), (n) => (d(), f(L(n), {
|
|
512
|
+
key: n.props.colId
|
|
496
513
|
}))), 128))
|
|
497
514
|
]),
|
|
498
515
|
_: 2
|
|
499
516
|
}, [
|
|
500
|
-
|
|
517
|
+
V(a(et)(v, ["searchFormExtra"]), (n, r) => ({
|
|
501
518
|
name: r,
|
|
502
|
-
fn:
|
|
503
|
-
D(e.$slots, r,
|
|
519
|
+
fn: C((u) => [
|
|
520
|
+
D(e.$slots, r, Je(Qe(u || {})))
|
|
504
521
|
])
|
|
505
522
|
}))
|
|
506
523
|
]), 1040, ["data", "sort-config", "filter-config", "loading", "style", "size", "onSortChange", "onFilterChange"]))
|
|
507
524
|
], 2),
|
|
508
|
-
|
|
509
|
-
class:
|
|
525
|
+
R("div", {
|
|
526
|
+
class: h(a(c)("pagination-wrapper"))
|
|
510
527
|
}, [
|
|
511
|
-
e.sticky ? (d(), f(a(
|
|
528
|
+
e.sticky ? (d(), f(a(Ft), {
|
|
512
529
|
key: 0,
|
|
513
530
|
direction: "horizontal",
|
|
514
|
-
"scroll-container":
|
|
531
|
+
"scroll-container": we.value,
|
|
515
532
|
"extra-size": -4.2,
|
|
516
533
|
"bar-color": "var(--ap-scrollbar-thumb-color-base)",
|
|
517
534
|
"track-color": "var(--ap-table-header-bg, #f2f6f9)"
|
|
518
|
-
}, null, 8, ["scroll-container"])) :
|
|
519
|
-
e.pagination !== !1 ? (d(), f(a(
|
|
535
|
+
}, null, 8, ["scroll-container"])) : S("", !0),
|
|
536
|
+
e.pagination !== !1 ? (d(), f(a(it), b({
|
|
520
537
|
key: 1,
|
|
521
|
-
class: a(
|
|
522
|
-
}, a(
|
|
538
|
+
class: a(c)("pagination")
|
|
539
|
+
}, a(U).pagination, { onChange: a(Be) }), null, 16, ["class", "onChange"])) : S("", !0)
|
|
523
540
|
], 2)
|
|
524
541
|
], 6)
|
|
525
542
|
], 6));
|
|
526
543
|
}
|
|
527
544
|
});
|
|
528
545
|
export {
|
|
529
|
-
|
|
546
|
+
Yt as default
|
|
530
547
|
};
|